Sample usage -
export const physicsBodyType = ['static', 'dynamic', 'kinematic'] as constexport type PhysicsBodyType = typeof physicsBodyType[number]export class PhysicsComponent extends Object3DComponent { static ComponentType = 'PhysicsComponent' static StateProperties: ComponentDefn['StateProperties'] = ['mass', { key: 'type', type: literalStrings(physicsBodyType), }] // ...} Copy
export const physicsBodyType = ['static', 'dynamic', 'kinematic'] as constexport type PhysicsBodyType = typeof physicsBodyType[number]export class PhysicsComponent extends Object3DComponent { static ComponentType = 'PhysicsComponent' static StateProperties: ComponentDefn['StateProperties'] = ['mass', { key: 'type', type: literalStrings(physicsBodyType), }] // ...}
Sample usage -