How to use the @babylonjs/core.Animation function in @babylonjs/core

To help you get started, we’ve selected a few @babylonjs/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brianzinn / react-babylonjs / stories / babylonjs / 2-withVR / with2DGUI.stories.js View on Github external
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) => ({
github Beg-in / vue-babylonjs / src / animation / index.js View on Github external
onScene({ name }) {
    return new Animation(name, this.property, this.fps, this.animationType, this.animationLoopMode);
  },