Interface UpdateModelState

updatable model state

interface UpdateModelState {
    color?: string;
    interactive?: boolean;
    material?: { [name: string]: MaterialStyle };
    opacity?: number;
    verticalOffset?: number;
    visible?: boolean;
}

Properties

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 ModelStyle.material | material property. If both the material and color properties are provided, material property updates will take higher precedence than color property updates.

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.

verticalOffset?: number

vertical offset of the model in meters off the floor

visible?: boolean

Visiiblity of the model group

MMNEPVFCICPMFPCPTTAAATR