ThreePipe
    Preparing search index...

    Class SampleBodyComponent

    Sample component that simulates a basic rigid body with forces, impulses, and velocity

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _object:
        | null
        | IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        > = null
    _state: Record<string, any>
    acceleration: Vector3 = ...
    constructor: typeof Object3DComponent & ComponentDefn
    damping: number = 0.98
    enabled: boolean
    isObject3DComponent: true
    mass: number = 1
    running: boolean = true
    state: never
    stateChangeHandlers: Record<
        string,
        ((value: any, oldValue: any, key?: string) => void)[],
    > = {}
    uiConfig?: UiObjectConfig<any, string, any>
    uuid: string = ...
    velocity: Vector3 = ...
    ComponentType: string = 'SampleBodyComponent'
    StateProperties: string[] = ...

    Accessors

    Methods

    • Type Parameters

      • K extends
            | "object"
            | "uuid"
            | "uiConfig"
            | "update"
            | "constructor"
            | "start"
            | "velocity"
            | "stop"
            | "destroy"
            | "state"
            | "reset"
            | "damping"
            | "mass"
            | "enabled"
            | "isObject3DComponent"
            | "stateRef"
            | "setState"
            | "ctx"
            | "init"
            | "stateChangeHandlers"
            | "onStateChange"
            | "running"
            | "acceleration"
            | "addForce"
            | "applyImpulse"
            | "setVelocity"
            | "MoveLeft"
            | "MoveRight"
            | "PushForward"
            | "PushBackward"

      Parameters

      Returns void