Home Reference Source
import {StaticParticles} from 'spacekit/src/StaticParticles.js'
public class | source

StaticParticles

Simulates a static particle field in whichever base reference the simulation is in.

Constructor Summary

Public Constructor
public

constructor(id: String, points: Array.Array<Number>, options: Object, contextOrSimulation: Object)

Method Summary

Public Methods
public

get3jsObjects(): THREE.Object

A list of THREE.js objects that are used to compose the skybox.

public

Get the unique ID of this object.

public

init()

Public Constructors

public constructor(id: String, points: Array.Array<Number>, options: Object, contextOrSimulation: Object) source

Params:

NameTypeAttributeDescription
id String

Unique ID for this object

points Array.Array<Number>

an array of X,Y,Z cartesian points, one for each particle

options Object

container

options.defaultColor Color

color to use for all particles can be a THREE string color name or hex value

options.size Number

the size of each particle

contextOrSimulation Object

Simulation context or simulation object

Public Methods

public get3jsObjects(): THREE.Object source

A list of THREE.js objects that are used to compose the skybox.

Return:

THREE.Object

Skybox mesh

public getId(): String source

Get the unique ID of this object.

Return:

String

id

public init() source