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

RotatingObject

Extends:

SpaceObject → RotatingObject

Direct Subclass:

ShapeObject, SphereObject

This class simulates an object that spins according to provided rotational parameters.

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
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.

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

Toggle the visilibity of the label.

public

Updates the position of this object.

public

update(jd: Number)

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

Public Constructors

public constructor() source

Override:

SpaceObject#constructor

Public Methods

public get3jsObjects(): Array<THREE.Object> source

Gets the THREE.js objects that represent this SpaceObject.

Override:

SpaceObject#get3jsObjects

Return:

Array<THREE.Object>

A list of THREE.js objects

public init() source

Initializes label and three.js objects. Called automatically unless you've set autoInit to false in constructor (this init is suppressed by some child classes).

Override:

SpaceObject#init

public initRotation() source

public startRotation() source

Begin rotating this object.

public stopRotation() source

Stop rotation of this object.

public update(jd: Number) source

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

Override:

SpaceObject#update

Params:

NameTypeAttributeDescription
jd Number

JD date