threejs-worldgen
    Preparing search index...

    Interface PartMount

    How a moving part is attached and animated.

    interface PartMount {
        position: Vec3;
        rotation?: Vec3;
        spin?: { axis: 0 | 1 | 2; by: "distance" | "time"; rate: number };
        stage?: number;
        steer?: number;
    }
    Index
    position: Vec3

    Pivot, vehicle space (metres; +z forward, +y up, ground or waterline at y = 0).

    rotation?: Vec3

    Rest rotation, Euler YXZ radians.

    spin?: { axis: 0 | 1 | 2; by: "distance" | "time"; rate: number }

    Spin: about which local axis (0 x, 1 y, 2 z), how fast, and driven by distance travelled or time.

    stage?: number

    Rocket stage this part belongs to (falls away at separation stage); −1 stays at the launch pad.

    steer?: number

    Multiplier on the vehicle's steering angle (1 = steered wheel).