charturbo - v0.1.0
    Preparing search index...

    Interface PrimitiveObjectDescriptor

    Texture mapping shared by materials, primitives and custom meshes. UVs: u runs left to right and v top to bottom (v = 0 is the top row of the image), so images are not flipped.

    interface PrimitiveObjectDescriptor {
        alphaTest?: number;
        angularVelocity?: Vec3Tuple;
        aoMap?: number | null;
        aoStrength?: number;
        bodyType?: RigidBodyType;
        castShadow?: boolean;
        color?: RgbaTuple;
        emissive?: number;
        emissiveColor?: RgbTuple;
        emissiveMap?: number | null;
        map?: number | null;
        mapOffset?: Vec2Tuple;
        mapRepeat?: Vec2Tuple;
        mass?: number;
        metallic?: number;
        metallicRoughnessMap?: number | null;
        name?: string;
        normalMap?: number | null;
        normalScale?: number;
        parentId?: number | null;
        position?: Vec3Tuple;
        receiveShadow?: boolean;
        restitution?: number;
        rotation?: Vec3Tuple;
        roughness?: number;
        scale?: Vec3Tuple;
        shape: PrimitiveShape;
        velocity?: Vec3Tuple;
    }

    Hierarchy (View Summary)

    Index
    alphaTest?: number

    Fragments whose texture-modulated alpha is below this are discarded (default: 0.5 with a map, else 0)

    angularVelocity?: Vec3Tuple

    Initial world-space spin in radians per second; collisions and friction also generate spin.

    aoMap?: number | null

    Ambient occlusion in the red channel; darkens environment (indirect) light only

    aoStrength?: number

    0..1 (default 1): 1 + aoStrength * (ao - 1)

    bodyType?: RigidBodyType
    castShadow?: boolean

    Drawn into the shadow map (default: true; translucent objects never cast)

    color?: RgbaTuple
    emissive?: number
    emissiveColor?: RgbTuple

    Linear emitted color (default [0, 0, 0], components 0..1000). When non-black it replaces the PBR color * emissive glow with emissiveColor * emissiveMap (glTF emissiveFactor)

    emissiveMap?: number | null

    sRGB emissive texture multiplying emissiveColor (no effect while emissiveColor is black)

    map?: number | null

    Texture id from loadTexture / createDataTexture; null (or 0) clears the map

    mapOffset?: Vec2Tuple

    UV offset [u, v] (default: [0, 0])

    mapRepeat?: Vec2Tuple

    UV repeat [u, v] (default: [1, 1]); textures wrap

    mass?: number
    metallic?: number
    metallicRoughnessMap?: number | null

    Blue = metalness, green = roughness, multiplying metallic / roughness

    name?: string
    normalMap?: number | null

    Tangent-space normal map (OpenGL / glTF convention: green = up in the image)

    normalScale?: number

    Scales the normal map's x / y (default 1; clamped to [-16, 16])

    parentId?: number | null
    position?: Vec3Tuple
    receiveShadow?: boolean

    Darkened by other objects' shadows (default: true)

    restitution?: number
    rotation?: Vec3Tuple
    roughness?: number
    scale?: Vec3Tuple
    velocity?: Vec3Tuple