Type Alias TModelState

TModelState: {
    altitude?: number;
    clippingPlaneTopColor: string;
    clippingPlaneTopVisible: boolean;
    clippingPlaneZOffset: number;
    color?: string;
    id?: string | number;
    interactive: boolean;
    material?: Record<string, { color: string }>;
    opacity: number;
    position: Coordinate;
    rotation: [number, number, number];
    scale: [number, number, number];
    type: "model";
    verticalOffset: number;
    visible: boolean;
}

Represents the state of a model.

Type declaration

  • Optionalaltitude?: number
  • ExperimentalclippingPlaneTopColor: string

    The color of the top of the clipping plane.

  • ExperimentalclippingPlaneTopVisible: boolean

    Whether the clipping plane is visible.

    true
    
  • ExperimentalclippingPlaneZOffset: number

    The clipping plane z offset of the model. 0 is the bottom of the model, and positive values are above the model in meters. Clips the model vertically above the clipping plane.

    Models need to be manifold for this to work.

    Infinity
    
  • Optionalcolor?: 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.

  • Optionalid?: string | number
  • interactive: boolean

    Whether the model is interactive.

    false
    
  • Optionalmaterial?: Record<string, { color: string }>

    The material state by name.

  • opacity: number

    The opacity of the model.

    1
    
  • position: Coordinate

    The position of the model as a Coordinate.

  • rotation: [number, number, number]

    The rotation of the model.

    [0, 0, 0]
    
  • scale: [number, number, number]

    The scale of the model.

    [1, 1, 1]
    
  • type: "model"
  • verticalOffset: number

    The vertical offset of the model.

    0
    
  • visible: boolean

    Whether the model is visible.

    true