Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Last active August 15, 2021 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/bb16a93478c4b1b5215417bf30e72c4b to your computer and use it in GitHub Desktop.
Save flushpot1125/bb16a93478c4b1b5215417bf30e72c4b to your computer and use it in GitHub Desktop.
const frameRate = 10;
//Animate box with a snippet done in Animation Curve Editor (ACE)
BABYLON.Animation.CreateFromSnippetAsync("VKRF2C").then(promiseAnim => {
//Load snippet that contains the animations edited and saved in ACE
if (promiseAnim.length > 0) {
promiseAnim.forEach(element => box.animations.push(element));
};
//Start box move animations
scene.beginAnimation(box, 0, frameRate * 43, true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment