Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ModelStyle

Interface for configuring the visual appearance of Models. The default orientation is with the Y axis pointing up.

experimental

Hierarchy

  • ModelStyle

Index

Properties

Optional cullFace

cullFace: "Front" | "Back" | false

Configure Face culling. To enable culling set cullFace to "Front" or "Back", to disable set to false. The used winding order is counter-clock-wise. Face culling is disabled by default.

defaultvalue:

false

model

model: string | ModelData

The Model data that should be rendered. In addition to passing the model directly, a string can also be provided that references a Wavefront OBJ file.

example

{zIndex: 0, type: "Model", model: "./MyModel.obj"}

Optional rotate

rotate: number[]

rotate the model by the given vector [radX,radY,radZ]. The order of rotation is x first, then y, followed by z.

Optional scale

scale: number[]

Scale the model by the given vector [sx,sy,sz].

Optional transform

transform: number[]

4x4 transformation matrix to transform the model. if transform is defined, scale, translate and rotate are ignored.

Optional translate

translate: number[]

Translate the model by the given vector [tx,ty,tz].

type

type: "Model"

Specifies the type of style to render.

zIndex

zIndex: number | StyleValueFunction<number> | StyleZoomRange<number>

Indicates the drawing order within a layer. Styles with larger zIndex value are rendered above those with smaller values. The zIndex is defined relative to the "zLayer" property. If "zLayer" is defined all zIndex values are relative to the "zLayer" value.

Optional zLayer

zLayer: number | StyleValueFunction<number>

Indicates drawing order across multiple layers. Styles using zLayer with a high value are rendered on top of zLayers with a low value. If no zLayer is defined the zLayer depends on the display layer order. The first (lowest) layer has a zLayer value of 1.

example

{...zLayer: 2, zIndex: 5} will be rendered on top of {...zLayer: 1, zIndex: 10}

Generated using TypeDoc