-
Notifications
You must be signed in to change notification settings - Fork 4
1. Custom Events
This page documents custom events and their usage.
Custom events events can be created using the following syntax.
new AnimateTrack(4);This creates a new AnimateTrack object with a time value of
4.You can add properties to it, such as
track: "trackName". Properties are added using methods in the following way.new AnimateTrack(4, { track: "trackName", duration: 1, easing: ease.Out.Sine, scale: [ [2, 2, 2, 0], [1, 1, 1, 1] ] })A custom event is pushed by calling the
push()method. Like so.new AnimateTrack(4, { track: "trackName", duration: 1, easing: ease.Out.Sine, scale: [ [2, 2, 2, 0], [1, 1, 1, 1] ] }).push();This is the base syntax for all objects/events.
Alternate syntax
You can also use an alternative syntax by doing the following:const scaleAnim = new AnimateTrack(); scaleAnim.time = 4; scaleAnim.data.track = "trackName"; scaleAnim.data.duration = 1; scaleAnim.data.easing = ease.Out.Sine; scaleAnim.data.scale = [ [2, 2, 2, 0], [1, 1, 1, 1] ];
AnimateTrack events are created with the following.
new AnimateTrack(time, data)You can also use a snippet to create one by typing
animTrackand pressingenter.
track: string|string[]Assigns the track of the animation.easing: stringAssigns the easing used for the animation.duration: numberAssigns the animation duration in beats.position: vec3|vec3[]Assigns the position animation.localPosition: vec3|vec3[]Assigns the localPosition animation.rotation: vec3|vec3[]Assigns the rotation animation.localRotation: vec3|vec3[]Assigns the localRotation animation.scale: vec3|vec3[]Assigns the scale animation.color: vec4|vec4[]Assigns the color animation.dissolve: vec1|vec1[]Assigns the dissolve animation.dissolveArrow: vec1|vec1[]Assigns the dissolveArrow animation.interactable: vec1|vec1[]Assigns the interactable animation.time: vec1|vec1[]Assigns the time animation. (Try to avoid using this)
AssignPathAnimation events are created with the following.
new AssignPathAnimation(time, data)You can also use a snippet to create one by typing
pathAnimand pressingenter.
track: string|string[]Assigns thetrackof the animation.easing: stringAssigns theeasingused for the animation.position: vec3|vec3[]Assigns thepositionanimation.definitePosition: vec3|vec3[]Assigns thedefinitePositionanimation.rotation: vec3|vec3[]Assigns therotationanimation.scale: vec3|vec3[]Assigns thescaleanimation.color: vec4|vec4[]Assigns thecoloranimation.dissolve: vec1|vec1[]Assigns thedissolveanimation.dissolveArrow: vec1|vec1[]Assigns thedissolveArrowanimation.interactable: vec1|vec1[]Assigns theinteractableanimation.
AssignPlayerToTrack events are created with the following.
new AssignPlayerToTrack(time, track)You can also use a snippet to create one by typing
playerTrackand pressingenter.
track: stringAssigns the track for the player.
AssignTrackParent events are created with the following.
new AssignTrackParent(time, data)You can also use a snippet to create one by typing
trackParentand pressingenter.
parentTrack: stringAssigns the parent track for the children tracks.childrenTracks: string[]Assigns the children for the parent track.
Functions
- Note Effects
- Wall Effects
- Other Effects