Motion
Get Motion

ReferenceScripting APIStagespawn

Stage.spawn

method

Makes a mote of a class.

Namespawn
Kindmethod of Stage
Called asstage.spawn(…)
As a nodeSpawn Mote (logic graph)
Since0.3

Syntax

spawn<M extends Mote>(    cls: string | () => M,    options?: { location?: Place; rotation?: number | number[] | Rotator; scale?: number | Place; name?: string; properties?: Record<string, unknown>; tags?: string[] }): M

Parameters

NameTypeDescription
clsstring | () => MThe class, or its name
options{ location?: Place; rotation?: number | number[] | Rotator; scale?: number | Place; name?: string; properties?: Record<string, unknown>; tags?: string[] }Optional. Its location, rotation, scale, name, properties and tags

Returns

M: the mote.

Remarks

Throws for a class there's none of, and past 8192 motes.

See also

Rotator · In examples: Constellations, Vent Garden