Skip to content
On this page

Namespace: WebSG

Table of contents

Classes

Interfaces

Type Aliases

Variables

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

websg.d.ts:15

websg.d.ts:29


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

websg.d.ts:7

websg.d.ts:8


AlphaMode

Ƭ AlphaMode: "OPAQUE" | "BLEND" | "MASK"

AlphaMode is a union type representing the available alpha modes.

Defined in

websg.d.ts:303

websg.d.ts:308


ColliderType

Ƭ ColliderType: "box" | "sphere" | "capsule" | "cylinder" | "hull" | "trimesh"

A type representing the possible collider types in the physics system.

Defined in

websg.d.ts:100

websg.d.ts:106


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

websg.d.ts:1282


ElementType

Ƭ ElementType: "flex" | "text" | "button"

Enum representing the type of a UIElement.

Defined in

websg.d.ts:1267


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

websg.d.ts:1296


FlexDirection

Ƭ FlexDirection: "column" | "column-reverse" | "row" | "row-reverse"

Enum representing the flex direction for a UIElement.

Defined in

websg.d.ts:1274


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

websg.d.ts:1316


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

websg.d.ts:1325


InteractableProps

Ƭ InteractableProps: Object

Type declaration

NameType
typeInteractableType

Defined in

websg.d.ts:171


InteractableType

Ƭ InteractableType: 1 | 2

Defined in

websg.d.ts:165

websg.d.ts:166


LightType

Ƭ LightType: Object

LightType is an object containing the string constants for the available types of lights.

Type declaration

NameType
Directional"directional"
Point"point"
Spot"spot"

Defined in

websg.d.ts:220


MeshPrimitiveAttribute

Ƭ MeshPrimitiveAttribute: "POSITION" | "NORMAL" | "TANGENT" | "TEXCOORD_0" | "TEXCOORD_1" | "COLOR_0" | "JOINTS_0" | "WEIGHTS_0"

Enumeration of possible mesh primitive attributes.

Defined in

websg.d.ts:496

websg.d.ts:505


MeshPrimitiveMode

Ƭ MeshPrimitiveMode: 0 | 1 | 2 | 3 | 4 | 5 | 6

Enumeration of possible mesh primitive rendering modes.

Defined in

websg.d.ts:510

websg.d.ts:511


PhysicsBodyType

Ƭ PhysicsBodyType: "kinematic" | "rigid" | "static"

Type representing the various physics body types.

Defined in

websg.d.ts:877

websg.d.ts:882

Variables

AccessorComponentType

AccessorComponentType: Object

Constant

AccessorComponentType

Description

A mapping of AccessorComponentType values to their respective numeric codes.

Type declaration

NameType
Float325126
Int165122
Int85120
Uint165123
Uint325125
Uint85121

Defined in

websg.d.ts:15

websg.d.ts:29


AccessorType

AccessorType: Object

Type declaration

NameType
MAT2"MAT2"
MAT3"MAT3"
MAT4"MAT4"
SCALAR"SCALAR"
VEC2"VEC2"
VEC3"VEC3"
VEC4"VEC4"

Defined in

websg.d.ts:7

websg.d.ts:8


AlphaMode

AlphaMode: Object

AlphaMode is an object containing the string constants for the available alpha modes.

Type declaration

NameType
BLEND"BLEND"
MASK"MASK"
OPAQUE"OPAQUE"

Defined in

websg.d.ts:303

websg.d.ts:308


ColliderType

ColliderType: Object

A constant object containing the possible collider types as keys and their corresponding string values.

Type declaration

NameType
Box"box"
Capsule"capsule"
Cylinder"cylinder"
Hull"hull"
Sphere"sphere"
Trimesh"trimesh"

Defined in

websg.d.ts:100

websg.d.ts:106


InteractableType

InteractableType: Object

Type declaration

NameType
Grabbable2
Interactable1

Defined in

websg.d.ts:165

websg.d.ts:166


MeshPrimitiveAttribute

MeshPrimitiveAttribute: Object

Type declaration

NameType
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

websg.d.ts:496

websg.d.ts:505


MeshPrimitiveMode

MeshPrimitiveMode: Object

Type declaration

NameType
LINES1
LINE_LOOP2
LINE_STRIP3
POINTS0
TRIANGLES4
TRIANGLE_FAN6
TRIANGLE_STRIP5

Defined in

websg.d.ts:510

websg.d.ts:511


PhysicsBodyType

PhysicsBodyType: Object

Physics body type constants.

Type declaration

NameType
Kinematic"kinematic"
Rigid"rigid"
Static"static"

Defined in

websg.d.ts:877

websg.d.ts:882