Mappedin JS - v6.14.0
    Preparing search index...

    Interface InitializeModelState

    initialize model state

    Note: EXPERIMENTAL_clippingEnabled and visibleThroughGeometry are now part of ModelStyle

    interface InitializeModelState {
        clippingPlaneTopColor?: string;
        clippingPlaneTopVisible?: boolean;
        clippingPlaneZOffset?: number;
        color?: string;
        EXPERIMENTAL_clippingEnabled?: boolean;
        interactive?: boolean;
        material?: { [name: string]: MaterialStyle };
        opacity?: number;
        rotation?: [number, number, number];
        scale?: [number, number, number];
        url?: string;
        verticalOffset?: number;
        visible?: boolean;
        visibleThroughGeometry?: boolean;
    }
    Index

    Properties

    clippingPlaneTopColor?: string

    The color of the top of the clipping plane.

    clippingPlaneTopVisible?: boolean

    Whether the clipping plane is visible.

    true
    
    clippingPlaneZOffset?: number

    The clipping plane z offset of the model.

    Infinity
    
    color?: string

    Color property designed for use with @mappedin/3d-assets. Updates the accent color of 3d assets by applying the color to materials named ['Default', 'Fabric', 'Mpdn_Logo', 'Fabric_Logo']. For custom colors on non-Mappedin models, use the material property. If both the material and color properties are provided, material property updates will take higher precedence than color property updates.

    EXPERIMENTAL_clippingEnabled?: boolean

    When true, enables clipping plane functionality for this model. This cannot be changed at runtime.

    Note: This will de-optimize the model by disabling instancing.

    false
    
    interactive?: boolean

    Whether the model is interactive, which means it can be hovered over and clicked on.

    	renderer.on('click', ({ geometry }) => {});
    
    material?: { [name: string]: MaterialStyle }

    Change material state by name

    mapView.Models.add(
    { target: new Coordinate(45, -75) },
    {
    url: 'bed.glb',
    materials: {
    Default: {
    color: MAPPEDIN_COLOR.orange,
    },
    },
    },
    );
    opacity?: number

    Opacity of the model group.

    rotation?: [number, number, number]

    The rotation of the model in degrees [x, y, z].

    • x: Rotation around x-axis (pitch)
    • y: Rotation around y-axis (yaw)
    • z: Rotation around z-axis (roll), where z points up

    Rotations are applied in order: x, then y, then z. 0 degrees means the model faces north (or the parent group's forward direction). Positive rotations follow the right-hand rule.

    scale?: [number, number, number]

    The scale of the model in [x, y, z]

    url?: string

    Model's URL. Can be based64 inlined url.

    verticalOffset?: number

    Vertical offset of the model in meters off the floor.

    Use position.verticalOffset instead by passing a Coordinate with the desired verticalOffset to updateState(model, { position: coordinate }). This property will be removed in a future version.

    visible?: boolean

    Visiiblity of the model group

    visibleThroughGeometry?: boolean

    Whether the model should be visible through geometry.

    Note: When set to true at creation time, this will de-optimize the model by disabling instancing.