WL
- WL
- Alignment: enum
- AnimationState: enum
- Collider: enum
- CollisionEventType: enum
- ForceMode: enum
- InputType: enum
- LightType: enum
- LockAxis: enum
- LogLevel: enum
- LogTag: enum
- MaterialParamType: enum
- MeshAttribute: enum
- MeshIndexType: enum
- MeshSkinningType: enum
- Shape: enum
- TextEffect: enum
- TextWrapMode: enum
- Type: enum
- VerticalAlignment: enum
- .APIVersion: Version
- .DestroyedComponentInstance: { _ }
- .DestroyedObjectInstance: { _ }
- .DestroyedPrefabInstance: { _ }
.Justification: undefined- .Property: { (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (defaultValue: boolean) ⇒ ComponentProperty; (r: number, g: number, b: number, a: number) ⇒ ComponentProperty; (values: string[], defaultValue: string | number) ⇒ ComponentProperty; (defaultValue: number) ⇒ ComponentProperty; (defaultValue: number) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (defaultValue: string) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (x: number, y: number) ⇒ ComponentProperty; (x: number, y: number, z: number) ⇒ ComponentProperty; (x: number, y: number, z: number, w: number) ⇒ ComponentProperty; }
- .defaultPropertyCloner: DefaultPropertyCloner
- .checkRuntimeCompatibility(version) ⇒ void
- .loadRuntime(runtime, options) ⇒ Promise<WonderlandEngine>
.Alignment: enum
Alignment type enum for TextComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
Center | 1 | 1 | Text center is at object origin |
Left | 0 | 0 | Text start is at object origin |
Right | 2 | 2 | Text end is at object origin |
.AnimationState: enum
Animation state of AnimationComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
Paused | 1 | 1 | Animation is paused and will continue at current playback time on play |
Playing | 0 | 0 | Animation is currently playing |
Stopped | 2 | 2 | Animation is stopped |
.Collider: enum
Collider type enum for CollisionComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
AxisAlignedBox | 1 | 1 | Axis Aligned Bounding Box Collider: Box that is always aligned to XYZ axis. It cannot be rotated but is more efficient than Box. |
Box | 2 | 2 | Aligned Bounding Box Collider: Box that matches the object’s rotation and translation correctly. This is the least efficient collider and should only be chosen over Sphere and AxisAlignedBox if really necessary. |
Sphere | 0 | 0 | Sphere Collider: Simplest and most performant collision shape. If this type is set on a CollisionComponent, only the first component of extents will be used to determine the radius. |
.CollisionEventType: enum
Collision callback event type.
Properties
Name | Type | Default | Description |
---|---|---|---|
Touch | 0 | 0 | Touch/contact detected, collision |
TouchLost | 1 | 1 | Touch/contact lost, uncollide |
TriggerTouch | 2 | 2 | Touch/contact with trigger detected |
TriggerTouchLost | 3 | 3 | Touch/contact with trigger lost |
.ForceMode: enum
Rigid body force mode for addForce and addTorque.
Properties
Name | Type | Default | Description |
---|---|---|---|
Acceleration | 3 | 3 | Apply as mass dependent force |
Force | 0 | 0 | Apply as force |
Impulse | 1 | 1 | Apply as impulse |
VelocityChange | 2 | 2 | Apply as velocity change, mass dependent |
.InputType: enum
Input type enum for InputComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
ControllerLeft | 3 | 3 | Left controller input |
ControllerRight | 4 | 4 | Right controller input |
EyeLeft | 1 | 1 | Left eye input |
EyeRight | 2 | 2 | Right eye input |
Head | 0 | 0 | Head input |
RayLeft | 5 | 5 | Left ray input |
RayRight | 6 | 6 | Right ray input |
.LightType: enum
Light type enum for LightComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
Point | 0 | 0 | Point light |
Spot | 1 | 1 | Spot light |
Sun | 2 | 2 | Sun light / Directional light |
.LockAxis: enum
Enum for Physics axes locking
See angularLockAxis and linearLockAxis.
Properties
Name | Type | Default | Description |
---|---|---|---|
None | 0 | 0 | No axis selected. |
X | 1 | 1 | X axis: |
Y | 2 | 2 | Y axis: |
Z | 4 | 4 | Z axis: |
.LogLevel: enum
Logging levels supported by Logger.
Properties
Name | Type | Default | Description |
---|---|---|---|
Error | 2 | 2 | |
Info | 0 | 0 | |
Warn | 1 | 1 |
.LogTag: enum
Default set of logging tags used by the API.
Properties
Name | Type | Default | Description |
---|---|---|---|
Component | 2 | 2 | Component init, update, etc… |
Engine | 0 | 0 | Initialization, component registration, etc… |
Scene | 1 | 1 | Scene loading |
.MaterialParamType: enum
Material parameter type.
Properties
Name | Type | Default | Description |
---|---|---|---|
Float | 3 | 3 | Float parameter type. |
Font | 5 | 5 | Font resource parameter type. Note: Changing font isn’t exposed yet and will raise an error. |
HalfFloat | 2 | 2 | 16-bit float parameter type. |
Int | 1 | 1 | Integer parameter type. |
Sampler | 4 | 4 | Sampler resource parameter type, i.e., a Texture. |
UnsignedInt | 0 | 0 | Unsigned integer parameter type. |
.MeshAttribute: enum
0.9.0+Mesh attribute enum.
Properties
Name | Type | Default | Description |
---|---|---|---|
Color | 4 | 4 | Color attribute, 4 floats, RGBA, range 0 to 1 |
JointId | 5 | 5 | Joint id attribute, 8 unsigned ints |
JointWeight | 6 | 6 | Joint weights attribute, 8 floats |
Normal | 2 | 2 | Normal attribute, 3 floats |
Position | 0 | 0 | Position attribute, 3 floats |
Tangent | 1 | 1 | Tangent attribute, 4 floats |
TextureCoordinate | 3 | 3 | Texture coordinate attribute, 2 floats |
.MeshIndexType: enum
Mesh index type.
Properties
Name | Type | Default | Description |
---|---|---|---|
UnsignedByte | 1 | 1 | Single byte mesh index, range 0-255 |
UnsignedInt | 4 | 4 | Four byte mesh index, range 0-4294967295 |
UnsignedShort | 2 | 2 | Two byte mesh index, range 0-65535 |
.MeshSkinningType: enum
Mesh skinning type.
Properties
Name | Type | Default | Description |
---|---|---|---|
EightJoints | 2 | 2 | Skinned, 8 joints/weight per vertex |
FourJoints | 1 | 1 | Skinned, 4 joints/weight per vertex |
None | 0 | 0 | Not skinned |
.Shape: enum
Rigid body shape.
Properties
Name | Type | Default | Description |
---|---|---|---|
Box | 3 | 3 | Box shape. |
Capsule | 2 | 2 | Capsule shape. |
ConvexMesh | 5 | 5 | Convex mesh shape. |
None | 0 | 0 | No shape. |
Plane | 4 | 4 | Plane shape. |
Sphere | 1 | 1 | Sphere shape. |
TriangleMesh | 6 | 6 | Triangle mesh shape. |
.TextEffect: enum
Effect type enum for TextComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
None | 0 | 0 | Text is rendered normally |
Outline | 1 | 1 | Text is rendered with an outline |
.TextWrapMode: enum
1.2.1+Wrap mode enum for TextComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
Clip | 3 | 3 | Text is cut off |
Hard | 2 | 2 | Text wraps anywhere |
None | 0 | 0 | Text doesn’t wrap automatically, only with explicit newline |
Soft | 1 | 1 | Text wraps at word boundaries |
.Type: enum
Component property type.
Properties
Name | Type | Default | Description |
---|---|---|---|
Animation | 10 | 10 | Animation reference: Appears in the editor as an animation resource selection dropdown. Initial value is null . |
Bool | 1 | 1 | Bool: Appears in the editor as a checkbox. Initial value is false , unless overridden by the default property. |
Color | 12 | 12 | Color: Appears in the editor as a color widget. Initial value is [0.0, 0.0, 0.0, 1.0] , unless overridden by the default property. |
Enum | 5 | 5 | Enumeration: Appears in the editor as a dropdown with given values. The additional values parameter with selection options is mandatory. The property value is resolved to an index into the values array. Initial value is the first element in values , unless overridden by the default property. The default value can be a string or an index into values . Example: js camera: {type: Type.Enum, values: ['auto', 'back', 'front'], default: 'auto'}, |
Float | 3 | 3 | Float: Appears in the editor as a floating point input field. Initial value is 0.0 , unless overridden by the default property. |
Int | 2 | 2 | Int: Appears in the editor as an integer input field. Initial value is 0 , unless overridden by the default property. |
Material | 9 | 9 | Material reference: Appears in the editor as a material resource selection dropdown. Initial value is null . |
Mesh | 7 | 7 | Mesh reference: Appears in the editor as a mesh resource selection dropdown. Initial value is null . |
Object | 6 | 6 | Object reference: Appears in the editor as an object resource selection dropdown with object picker. Initial value is null . |
Skin | 11 | 11 | Skin reference: Appears in the editor as a skin resource selection dropdown. Initial value is null . |
String | 4 | 4 | String / Text: Appears in the editor as a single-line text input field. Initial value is an empty string, unless overridden by the default property. |
Texture | 8 | 8 | Texture reference: Appears in the editor as a texture resource selection dropdown. Initial value is null . |
Vector2 | 13 | 13 | Vector of two floats: Appears in the editor as a two-element floating point input field. Initial value is [0.0, 0.0] , unless overridden by the default property. |
Vector3 | 14 | 14 | Vector of three floats: Appears in the editor as a three-element floating point input field. Initial value is [0.0, 0.0, 0.0] , unless overridden by the default property. |
Vector4 | 15 | 15 | Vector of four floats: Appears in the editor as a four-element floating point input field. Initial value is [0.0, 0.0, 0.0, 0.0] , unless overridden by the default property. |
.VerticalAlignment: enum
Vertical alignment type enum for TextComponent.
Properties
Name | Type | Default | Description |
---|---|---|---|
Bottom | 3 | 3 | Text bottom is at object origin |
Line | 0 | 0 | Text line is at object origin |
Middle | 1 | 1 | Text middle is at object origin |
Top | 2 | 2 | Text top is at object origin |
.APIVersion: Version
Version of this API.
.DestroyedComponentInstance: { _ }
Proxy used to override prototypes of destroyed components.
.DestroyedObjectInstance: { _ }
Proxy used to override prototypes of destroyed objects.
.DestroyedPrefabInstance: { _ }
Proxy used to override prototypes of destroyed prefabs.
.Justification: undefined
Justification type enum for TextComponent.
Deprecated: Please use VerticalAlignment instead.
.Property: { (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (defaultValue: boolean) ⇒ ComponentProperty; (r: number, g: number, b: number, a: number) ⇒ ComponentProperty; (values: string[], defaultValue: string | number) ⇒ ComponentProperty; (defaultValue: number) ⇒ ComponentProperty; (defaultValue: number) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (defaultValue: string) ⇒ ComponentProperty; (opts: PropertyReferenceOptions) ⇒ ComponentProperty; (x: number, y: number) ⇒ ComponentProperty; (x: number, y: number, z: number) ⇒ ComponentProperty; (x: number, y: number, z: number, w: number) ⇒ ComponentProperty; }
Component property namespace.
Usage:
For TypeScript users, you can use the decorators instead.
.defaultPropertyCloner: DefaultPropertyCloner
Default cloner for property values.
.checkRuntimeCompatibility(version: Version) ⇒ void
Ensures that this API is compatible with the given runtime version.
We only enforce compatibility for major and minor components, i.e.,
the runtime and the API must both be of the form x.y.*
.
Throws: If the major or the minor components are different.
Param | Type | Description |
---|---|---|
version | Version | The target version |
.loadRuntime(runtime: string, options: Partial<LoadRuntimeOptions>) ⇒ Promise<WonderlandEngine>
Load the runtime using the WASM and JS files.
Returns: A promise that resolves when the engine is ready to be used.
Param | Type | Description |
---|---|---|
runtime | string | The runtime base string, e.g,: WonderlandRuntime-loader-physx . |
options | Partial<LoadRuntimeOptions> | Options to modify the loading behaviour. |