Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hideModal () {
let { plane } = this.state
if (!plane) {
return
}
let keys = []
keys.push({ frame: 0, value: 1 })
keys.push({ frame: 10, value: 0 })
var animationClose = new Animation(
'tv-off-1984',
'scaling.x',
10,
Animation.ANIMATIONTYPE_FLOAT,
Animation.ANIMATIONLOOPMODE_CONSTANT
)
animationClose.setKeys(keys)
let easingFunction = new ExponentialEase(9.7) // BABYLON.QuarticEase()
easingFunction.setEasingMode(EasingFunction.EASINGMODE_EASEINOUT)
animationClose.setEasingFunction(easingFunction)
plane.animations.push(animationClose)
plane._scene.beginAnimation(plane, 0, 100, false, 1, () => {
plane.dispose()
this.setState((state) => ({
onScene({ name }) {
return new Animation(name, this.property, this.fps, this.animationType, this.animationLoopMode);
},