Namespace: WebSG
Table of contents
Classes
- Accessor
- Collider
- Collision
- CollisionIterator
- CollisionListener
- Component
- ComponentStore
- Image
- Interactable
- Light
- Material
- Matrix4
- Mesh
- MeshPrimitive
- Node
- NodeIterator
- PhysicsBody
- Quaternion
- RGB
- RGBA
- ReadonlyMatrix4
- Scene
- Texture
- UIButton
- UICanvas
- UIElement
- UIElementIterator
- UIText
- Vector2
- Vector3
- Vector4
- World
Interfaces
- AccessorFromProps
- BoxMeshProps
- ColliderProps
- LightProps
- MaterialProps
- MeshPrimitiveProps
- MeshProps
- NodeProps
- OrbitOptions
- PhysicsBodyProps
- SceneProps
- UIButtonProps
- UICanvasProps
- UIElementProps
- UITextProps
- UnlitMaterialProps
Type Aliases
- AccessorComponentType
- AccessorType
- AlphaMode
- ColliderType
- ElementPositionType
- ElementType
- FlexAlign
- FlexDirection
- FlexJustify
- FlexWrap
- InteractableProps
- InteractableType
- LightType
- MeshPrimitiveAttribute
- MeshPrimitiveMode
- PhysicsBodyType
Variables
- AccessorComponentType
- AccessorType
- AlphaMode
- ColliderType
- InteractableType
- MeshPrimitiveAttribute
- MeshPrimitiveMode
- PhysicsBodyType
Type Aliases
AccessorComponentType
Ƭ AccessorComponentType: 5120
| 5121
| 5122
| 5123
| 5125
| 5126
Description
The component type of an accessor, describing the data type of individual components in the data.
Defined in
AccessorType
Ƭ AccessorType: "SCALAR"
| "VEC2"
| "VEC3"
| "VEC4"
| "MAT2"
| "MAT3"
| "MAT4"
Description
The type of an accessor, describing the shape of the data it represents.
Defined in
AlphaMode
Ƭ AlphaMode: "OPAQUE"
| "BLEND"
| "MASK"
AlphaMode is a union type representing the available alpha modes.
Defined in
ColliderType
Ƭ ColliderType: "box"
| "sphere"
| "capsule"
| "cylinder"
| "hull"
| "trimesh"
A type representing the possible collider types in the physics system.
Defined in
ElementPositionType
Ƭ ElementPositionType: "relative"
| "absolute"
A type representing the possible values for the position property of a UIElement.
- "relative": The element is positioned relative to its normal position, without affecting the position of other elements.
- "absolute": The element is positioned relative to its nearest positioned ancestor (or the container if no positioned ancestor exists), and other elements are positioned as if the absolute element doesn't exist.
Defined in
ElementType
Ƭ ElementType: "flex"
| "text"
| "button"
Enum representing the type of a UIElement.
Defined in
FlexAlign
Ƭ FlexAlign: "auto"
| "flex-start"
| "center"
| "flex-end"
| "stretch"
| "baseline"
| "space-between"
| "space-around"
A type representing the possible values for the alignItems, alignContent, and alignSelf properties of a UIElement.
- "auto": The element's alignment is determined by its parent's alignItems property or by the default value if there is no parent.
- "flex-start": Items are aligned to the start of the container along the cross axis.
- "center": Items are centered within the container along the cross axis.
- "flex-end": Items are aligned to the end of the container along the cross axis.
- "stretch": Items are stretched to fill the container along the cross axis.
- "baseline": Items are aligned such that their baselines align along the cross axis.
- "space-between": Items are distributed evenly within the container with equal spacing between them along the cross axis.
- "space-around": Items are distributed evenly within the container with equal spacing around them along the cross axis.
Defined in
FlexDirection
Ƭ FlexDirection: "column"
| "column-reverse"
| "row"
| "row-reverse"
Enum representing the flex direction for a UIElement.
Defined in
FlexJustify
Ƭ FlexJustify: "flex-start"
| "center"
| "flex-end"
| "space-between"
| "space-around"
| "space-evenly"
A type representing the possible values for the justifyContent property of a UIElement.
- "flex-start": Items are aligned to the start of the container.
- "center": Items are centered within the container.
- "flex-end": Items are aligned to the end of the container.
- "space-between": Items are distributed evenly within the container with equal spacing between them.
- "space-around": Items are distributed evenly within the container with equal spacing around them.
- "space-evenly": Items are distributed evenly within the container with equal spacing between and around them.
Defined in
FlexWrap
Ƭ FlexWrap: "nowrap"
| "wrap"
| "wrap-reverse"
A type representing the possible values for the flexWrap property of a UIElement.
- "nowrap": Items are laid out in a single line (row or column) and may shrink or overflow the container.
- "wrap": Items are wrapped onto multiple lines (rows or columns) if they do not fit within the container.
- "wrap-reverse": Items are wrapped onto multiple lines (rows or columns) in reverse order if they do not fit within the container.
Defined in
InteractableProps
Ƭ InteractableProps: Object
Type declaration
Name | Type |
---|---|
type | InteractableType |
Defined in
InteractableType
Ƭ InteractableType: 1
| 2
Defined in
LightType
Ƭ LightType: Object
LightType is an object containing the string constants for the available types of lights.
Type declaration
Name | Type |
---|---|
Directional | "directional" |
Point | "point" |
Spot | "spot" |
Defined in
MeshPrimitiveAttribute
Ƭ MeshPrimitiveAttribute: "POSITION"
| "NORMAL"
| "TANGENT"
| "TEXCOORD_0"
| "TEXCOORD_1"
| "COLOR_0"
| "JOINTS_0"
| "WEIGHTS_0"
Enumeration of possible mesh primitive attributes.
Defined in
MeshPrimitiveMode
Ƭ MeshPrimitiveMode: 0
| 1
| 2
| 3
| 4
| 5
| 6
Enumeration of possible mesh primitive rendering modes.
Defined in
PhysicsBodyType
Ƭ PhysicsBodyType: "kinematic"
| "rigid"
| "static"
Type representing the various physics body types.
Defined in
Variables
AccessorComponentType
• AccessorComponentType: Object
Constant
AccessorComponentType
Description
A mapping of AccessorComponentType values to their respective numeric codes.
Type declaration
Name | Type |
---|---|
Float32 | 5126 |
Int16 | 5122 |
Int8 | 5120 |
Uint16 | 5123 |
Uint32 | 5125 |
Uint8 | 5121 |
Defined in
AccessorType
• AccessorType: Object
Type declaration
Name | Type |
---|---|
MAT2 | "MAT2" |
MAT3 | "MAT3" |
MAT4 | "MAT4" |
SCALAR | "SCALAR" |
VEC2 | "VEC2" |
VEC3 | "VEC3" |
VEC4 | "VEC4" |
Defined in
AlphaMode
• AlphaMode: Object
AlphaMode is an object containing the string constants for the available alpha modes.
Type declaration
Name | Type |
---|---|
BLEND | "BLEND" |
MASK | "MASK" |
OPAQUE | "OPAQUE" |
Defined in
ColliderType
• ColliderType: Object
A constant object containing the possible collider types as keys and their corresponding string values.
Type declaration
Name | Type |
---|---|
Box | "box" |
Capsule | "capsule" |
Cylinder | "cylinder" |
Hull | "hull" |
Sphere | "sphere" |
Trimesh | "trimesh" |
Defined in
InteractableType
• InteractableType: Object
Type declaration
Name | Type |
---|---|
Grabbable | 2 |
Interactable | 1 |
Defined in
MeshPrimitiveAttribute
• MeshPrimitiveAttribute: Object
Type declaration
Name | Type |
---|---|
COLOR_0 | "COLOR_0" |
JOINTS_0 | "JOINTS_0" |
NORMAL | "NORMAL" |
POSITION | "POSITION" |
TANGENT | "TANGENT" |
TEXCOORD_0 | "TEXCOORD_0" |
TEXCOORD_1 | "TEXCOORD_1" |
WEIGHTS_0 | "WEIGHTS_0" |
Defined in
MeshPrimitiveMode
• MeshPrimitiveMode: Object
Type declaration
Name | Type |
---|---|
LINES | 1 |
LINE_LOOP | 2 |
LINE_STRIP | 3 |
POINTS | 0 |
TRIANGLES | 4 |
TRIANGLE_FAN | 6 |
TRIANGLE_STRIP | 5 |
Defined in
PhysicsBodyType
• PhysicsBodyType: Object
Physics body type constants.
Type declaration
Name | Type |
---|---|
Kinematic | "kinematic" |
Rigid | "rigid" |
Static | "static" |