new Mote(): Moteconstructor | Don't make one with new: stage.spawn makes a mote of your class and puts it on the stage, and Studio makes the ones placed in the scene. |
setLocation(v: Place): voidmethod | Puts it somewhere. |
addOffset(v: { x?: number; y?: number; z?: number }): voidmethod | Moves it by so much. |
addLocalOffset(v: { x?: number; y?: number; z?: number }): voidmethod | Moves it by so much in its own turned frame (its yaw). |
setRotation(r: number | number[] | Rotator): voidmethod | Turns it. |
addRotation(degrees: number): voidmethod | Turns it by so much (its yaw). |
setScale(s: number | Place): voidmethod | Sizes it. |
moveTo(target: Place, options?: { seconds?: number; easing?: "linear" | "easeIn" | "easeOut" | "easeInOut" }): Promise<void>method | Moves it there over seconds, eased. |
setTimer(seconds: number, fn: () => void, options?: { looping?: boolean }): number +1 moremethod | Runs a function after seconds (and every seconds, looping): seconds first, as scene.every has them. |
clearTimer(id: number): voidmethod | Stops a timer. |
attachTo(parent: Mote | null): voidmethod | Makes it move with another (null: on its own again), keeping where it is now. |
detach(): voidmethod | On its own again. |
enableInput(): voidmethod | Hears the pointer again. |
disableInput(): voidmethod | Hears the pointer no more (clicks pass through it). |
hasTag(tag: string): booleanmethod | Whether it has a tag. |
addTag(tag: string): voidmethod | Gives it a tag (64 at most). |
removeTag(tag: string): voidmethod | Takes a tag away. |
component<C extends Component>(name: string): C | nullmethod | One of its components, by name. |
destroy(): voidmethod | Takes it out of the scene. |
setVelocity(v: Place): voidmethod | Gives its body a speed. |
applyImpulse(v: Place): voidmethod | Pushes its body: mass times the speed it gains. |
applyForce(v: Place): voidmethod | A force on its body for the next step: mass times the speed it gains a second. |
applyTorque(t: number | number[] | Rotator): voidmethod | A turning push on its body: the degrees a second it gains, times its inertia. |
sleep(): voidmethod | Puts its body to sleep: it rests until something touches or pushes it. |
wake(): voidmethod | Wakes its body. |
onStart(): voidmethod | It started (what a class overrides). |
onTick(dt: number): voidmethod | Each of its ticks (as often as its ticking says). |
onEnd(): voidmethod | It's being destroyed. |
onClicked(hit: MotionHit): voidmethod | It was clicked. |
onPointerEnter(): voidmethod | The pointer came over it. |
onPointerLeave(): voidmethod | The pointer left it. |
onHit(other: Mote): voidmethod | Its body started touching another's. |
onHitEnd(other: Mote): voidmethod | Its body stopped touching another's. |
onDragStart(): voidmethod | The pointer started dragging it (a DragComponent). |
onDrag(location: Vector3): voidmethod | The pointer dragged it. |
onDragEnd(): voidmethod | The pointer let it go. |