Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KeplerParticles

An efficient way to render many objects in space with Kepler orbits. Primarily used by Simulation to render all non-static objects.

see

Simulation

Hierarchy

  • KeplerParticles

Index

Constructors

constructor

Properties

Private addedToScene

addedToScene: boolean

Private attributes

attributes: ShaderAttributes

Private context

Private elements

elements: Ephem[]

Private geometry

geometry: BufferGeometry

Private id

id: string

Private options

options: KeplerParticlesOptions

Private particleCount

particleCount: number

Private particleSystem

particleSystem: Points<BufferGeometry, Material | Material[]>

Private shaderMaterial

shaderMaterial: ShaderMaterial

Private simulation

simulation: Simulation

Private uniforms

uniforms: { texture: { value: Texture } }

Type declaration

  • texture: { value: Texture }
    • value: Texture

Static instanceCount

instanceCount: number

Methods

addParticle

  • addParticle(ephem: Ephem, options?: KeplerParticleOptions): number
  • Add a particle to this particle system.

    Parameters

    • ephem: Ephem

      Kepler ephemeris

    • options: KeplerParticleOptions = {}

      Options container

    Returns number

    The index of this article in the attribute list.

get3jsObjects

  • get3jsObjects(): Object3D[]
  • Get THREE.js objects that comprise this point cloud

    Returns Object3D[]

    List of objects to add to THREE.js scene

getId

  • getId(): string

hideParticle

  • hideParticle(offset: number): void
  • Hides the particle at the given offset so it is no longer drawn. The particle still takes up space in the array though.

    Parameters

    • offset: number

    Returns void

setParticleColor

  • setParticleColor(colorValue: number, offset: number): void
  • Changes the color of the particle at the given offset to the given color.

    Parameters

    • colorValue: number

      The new color of this particle (e.g. hex number)

    • offset: number

      The location of this particle in the attributes * array

    Returns void

setParticleOrigin

  • setParticleOrigin(offset: number, newOrigin: Coordinate3d): void
  • Change the origin attribute of a particle.

    Parameters

    • offset: number

      The location of this particle in the attributes * array.

    • newOrigin: Coordinate3d

      The new XYZ coordinates of the body that this particle orbits.

    Returns void

setParticleSize

  • setParticleSize(size: number, offset: number): void
  • Changes the size of the particle at the given offset to the given size. Setting the size to 0 hides the particle.

    Parameters

    • size: number

      The new size of this particle

    • offset: number

      The location of this particle in the attributes * array

    Returns void

update

  • update(jd: number): void
  • Update the position for all particles

    Parameters

    • jd: number

      JD date

    Returns void

Generated using TypeDoc