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

ShapeObject

Extends:

SpaceObjectRotatingObject → ShapeObject

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

getBoundingObject(): THREE.Object3D

Specifies the object that is used to compute the bounding box.

Inherited Summary

From class SpaceObject
public

get3jsObjects(): Array<THREE.Object>

Gets the THREE.js objects that represent this SpaceObject.

public

getBoundingObject(): THREE.Object3D

Specifies the object that is used to compute the bounding box.

public

Gets the color of this object.

public

Gets the unique ID of this object.

public

Gets label visilibity status.

public

Gets the {Orbit} object for this SpaceObject.

public

Gets the visualization coordinates of this object at a given time.

public

Initializes label and three.js objects.

public

Determines whether object is ready to be measured or added to scene.

public

Determines whether object is static (can't change its position) or whether its position can be updated (ie, it has ephemeris)

public

orbitAround(spaceObj: Object)

Make this object orbit another orbit.

public
public

Toggle the visilibity of the label.

public

Updates the position of this object.

public

update(jd: Number, force: boolean)

Updates the object and its label positions for a given time.

protected

setPositionedObject(obj: THREE.Object3D)

From class RotatingObject
public

get3jsObjects(): Array<THREE.Object>

Gets the THREE.js objects that represent this SpaceObject.

public

init()

public
public

Begin rotating this object.

public

Stop rotation of this object.

public

update(jd: Number)

Updates the object and its label positions for a given time.

Public Constructors

public constructor() source

Override:

RotatingObject#constructor

Params:

NameTypeAttributeDescription
options.shape Object

Shape specification

options.shape.type String

Type of object ("custom" or "sphere")

options.shape.shapeUrl String

Path to shapefile if type is "custom"

options.shape.textureUrl Number

Optional texture map for shape

options.shape.color Number

Color of shape materials. Default 0xcccccc

options.shape.radius Number

Radius, if applicable. Defaults to 1

options.shape.debug Object

Debug options

options.shape.debug.showAxes boolean

Show axes rotation speed. Default 0.5

See:

Public Methods

public getBoundingObject(): THREE.Object3D source

Specifies the object that is used to compute the bounding box.

Override:

SpaceObject#getBoundingObject

Return:

THREE.Object3D

THREE.js object