S3MInstanceCollection

new 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.

readonlygroup : Object

Get all the model groups of the layer.

maxVisibleAltitude : Number

Get or set the maximum visible height of the layer

maxVisibleDistance : Number

Get or set the maximum visible distance of the layer

readonlytype : String

Get the ID of the layer type.

visible : Boolean

Get or set the visibility of this layer.

Methods

_setSQMode()

Set spatial query mode

_setSQTextures()

Set depth map for spatial query

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.

destroy()undefined

Destroy the object and release its webgl resources

Once the object is destroyed, it can no longer be used; calling any method on the destroyed object will throwDeveloperError�쳣

Returns:
Example:
.destroy();
See:
  • S3MInstanceCollection#isDestroyed

removeCollection(url)boolean

Delete all instance objects corresponding to the url
Name Type Description
url url of the model
Returns:
Whether the deletion is successful

removeInstance(url, ids)boolean

Delete the instance object corresponding to the specified id of the url model
Name Type Description
url
ids
Returns:

setUnSelected()

Deselect all instances

update(frameState)

Do not call this function directly.

Name Type Description
frameState