ModelComponent: {
    aabbCenter: number[];
    aabbHalfExtents: number[];
    asset: number;
    batchGroupId: number;
    castShadows: boolean;
    castShadowsLightmap: boolean;
    enabled: boolean;
    isStatic: boolean;
    layers: number[];
    lightmapped: boolean;
    lightmapSizeMultiplier: number;
    mapping: Record<string, number>;
    materialAsset: number;
    receiveShadows: boolean;
    type: string;
}

Model Component Properties.

Type declaration

  • aabbCenter: number[]

    An array of 3 numbers that represents the center of the AABB to be used.

  • aabbHalfExtents: number[]

    An array of 3 numbers that represents the half extents of the AABB to be used.

  • asset: number

    The id of the model asset rendered by this model component.

    null
    
  • batchGroupId: number

    The batch group id that this model belongs to. The engine will attempt to batch models in the same batch group.

    null
    
  • castShadows: boolean

    If true, the model rendered by this component will cast shadows onto other models in the scene.

    true
    
  • castShadowsLightmap: boolean

    If true, this model will cast shadows when rendering lightmaps.

    true
    
  • enabled: boolean

    Whether the component is enabled.

    true
    
  • isStatic: boolean

    Mark model as non-movable (optimization).

    false
    
  • layers: number[]

    An array of layer id's that this model belongs to. When a model belongs to multiple layers it will be rendered multiple times.

    [0]
    
  • lightmapped: boolean

    If true, this model will be lightmapped after using lightmapper.bake().

    false
    
  • lightmapSizeMultiplier: number

    Changing this value will affect resolution of lightmaps for this model.

    1
    
  • mapping: Record<string, number>

    A dictionary that maps a material asset to each mesh instance. Each key is the mesh instance index and each value is the asset id.

  • materialAsset: number

    The id of the material asset that will be used to render the model (only applies to primitives).

    null
    
  • receiveShadows: boolean

    If true, the model rendered by this component will receive shadows cast by other models in the scene.

    true
    
  • type: string

    The type of the model to be rendered. Can be: asset, box, capsule, cone, cylinder, sphere.

    "asset"