S3MInstanceCollection

new Cesium.S3MInstanceCollection(context)

S3M instantiates the model collection class.
Name Type Description
context Context Object.

Members

clampToObject : Boolean

Gets or sets whether the layer is attached to the object, the default value is false.

filterMode : RangeMode

Get or set the sub-object filtering mode

filterPixel : Number

Get or set the filter pixel size, the pixel size filter threshold of the sub-object projection screen

readonlygroup : Object

Get all the model groups of the layer.

isOverLay : Boolean

Get or set the model to always be displayed at the top of the screen and support selection. The default value is false.
Default Value: false

maxVisibleAltitude : Number

Get or set the maximum visible height of the layer

maxVisibleDistance : Number

Get or set the maximum visible distance of the layer

minVisibleAltitude : Number

Gets or sets the minimum visible height of the layer.

minVisibleDistance : Number

Gets or sets the minimum visible distance of the layer.

modelMatrix

Get or set the model matrix of the layer, and set the translation, rotation, and zoom parameters.

shadowType : ShadowType

Get or set the shadow mode. The default value is NONE.
Default Value: NONE

readonlytype : String

Get the ID of the layer type.

visible : Boolean

Get or set the visibility of this layer.

Methods

add(url, attrs, data, streamBytes)

Add one or a group of instances.
Name Type Default Description
url String optional Model url.
attrs Object | Array optional Instance attribute or collection of instance attributes.
Name Type Default Description
position Cartesian3 optional World location.
color Color Color.WHITE optional Colour.
scale Cartesian3 new Cartesian3(1,1,1) optional xyz zoom.
offset Cartesian3 new Cartesian3(0,0,0) optional The center point offset position.
hpr HeadingPitchRoll new HeadingPitchRoll() optional Spin.
data Blob | ArrayBuffer | Object optional Streaming data
streamBytes Boolean true optional Whether to intercept the first four bytes.

getInstance(url, id)boolean

Obtain the instance object S3MInstance by ID.
Name Type Description
url String The url of the instance object.
id Number The id of the instance object

getVisibleInViewport(index)boolean

Get the object where the specified split screen window is located.
Name Type Description
index Number The viewport index value, the range is 0~3.
Returns:
visible Viewport visibility.

removeCollection(url)boolean

Remove all instance objects corresponding to url.
Name Type Description
url String The url of the model.
Returns:
Whether the removal is successful, the removal is successful when the value is true, and the removal fails when the value is false.

removeInstance(url, ids)boolean

Remove the instance object corresponding to the id specified by the url model.
Name Type Description
url String The url of the model.
ids Array List of instance object ids.
Returns:
Whether the removal is successful, the removal is successful when the value is true, and the removal fails when the value is false.

setCullEnabled(url, cullFace)

Set up single-sided rendering.
Name Type Description
instancePath String Is the address of the instantiated model.

setCullEnabled(url, cullFace)

Set up single-sided rendering.
Name Type Description
url String The url of the model.
cullFace boolean Whether to enable single-sided rendering.

setPBRMaterialFromJSON(instancePath, jsonPath)

Instanced collection supports setting of PBR material
Name Type Description
instancePath String Model address.
jsonPath String JSON file address.

setUnSelected()

Cancel the selected state of all instances.

setVisibleInViewport(index, visible)

Set which split screen window the object is displayed in.
Name Type Description
index Number The viewport index value, the range is 0~3.
visible boolean Viewport visibility.

update(frameState)

Do not call this function directly.

Name Type Description
frameState