Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import {Mesh } from "@babylonjs/core";
import {gsap} from "gsap";
export default class CubeComponent extends Mesh {
public onStart(): void {
// other example
/*
gsap.to(this.rotation, {y:12, x:5, duration:4, repeat:-1, yoyo:true})
gsap.to(this.position, {x:5, duration:4, repeat:-1, yoyo:true})
gsap.to(this.scaling, {y:0.5, duration:2, repeat:-1, yoyo:true})
*/
var tl = gsap.timeline({repeat: 5, repeatDelay: 1});
tl.to(this.position, {x: 10, duration: 1});
tl.to(this.position, {y: 5, duration: 1});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.