Home Reference Source

Function

Static Public Summary
public

Euler(x: *, y: *, z: *, order: *)

public
public

Quaternion(x: *, y: *, z: *, w: *)

public

Vector3(x: *, y: *, z: *)

public

createArraySpan(items: mixed): ArraySpan

Attempts to create an ArraySpan from the items provided.

public

createColorSpan(colors: mixed): ColorSpan

Attempts to create an ArraySpan from the colors provided.

public

createSpan(a: *, b: *, c: *): *

public
public
public

fromJSON(json: object, THREE: object, System: function, Emitter: function): System

this function was deprecated. Use fromJSONAsync instead.

Creates a System instance from a JSON object.

public

fromJSONAsync(json: object, THREE: object, System: function, Emitter: function, options: object): Promise<System>

Creates a System instance from a JSON object.

public

getEasingByName(name: *)

public

integrate(particle: Particle, time: number, damping: number, type: string): *

Performs the chosen integration on the particle.

public

log(): *

You can use this emit particles.

public

setEasingByName(easeName: *): *

public
public
public

withDefaults(defaults: *, properties: *)

Static Private Summary
private

Static Public

public Euler(x: *, y: *, z: *, order: *) source

Params:

NameTypeAttributeDescription
x *
y *
z *
order *

public Matrix4() source

public Quaternion(x: *, y: *, z: *, w: *) source

Params:

NameTypeAttributeDescription
x *
y *
z *
w *

public Vector3(x: *, y: *, z: *) source

Params:

NameTypeAttributeDescription
x *
y *
z *

public createArraySpan(items: mixed): ArraySpan source

import {createArraySpan} from 'three-nebula/src/math/ArraySpan.js'

Attempts to create an ArraySpan from the items provided.

Params:

NameTypeAttributeDescription
items mixed

Items to try and create an ArraySpan from

Return:

ArraySpan (nullable: true)

public createColorSpan(colors: mixed): ColorSpan source

import {createColorSpan} from 'three-nebula/src/math/ColorSpan.js'

Attempts to create an ArraySpan from the colors provided.

Params:

NameTypeAttributeDescription
colors mixed

colors to try and create an ArraySpan from

Return:

ColorSpan (nullable: true)

public createSpan(a: *, b: *, c: *): * source

import {createSpan} from 'three-nebula/src/math/Span.js'

Params:

NameTypeAttributeDescription
a *
b *
c *

Return:

*

public fragmentShader(): string source

Return:

string

public fragmentShader(): string source

Return:

string

public fromJSON(json: object, THREE: object, System: function, Emitter: function): System source

import fromJSON from 'three-nebula/src/core/fromJSON.js'
this function was deprecated. Use fromJSONAsync instead.

Creates a System instance from a JSON object.

Params:

NameTypeAttributeDescription
json object

The JSON to create the System instance from

THREE object

The Web GL Api to use

System function

The system class

Emitter function

The emitter class

json.preParticles number

The predetermined number of particles

json.integrationType string

The integration algorithm to use

json.emitters array<object>

The emitters for the system instance

Return:

System

public fromJSONAsync(json: object, THREE: object, System: function, Emitter: function, options: object): Promise<System> source

import fromJSONAsync from 'three-nebula/src/core/fromJSONAsync.js'

Creates a System instance from a JSON object.

Params:

NameTypeAttributeDescription
json object

The JSON to create the System instance from

json.preParticles number

The predetermined number of particles

json.integrationType string

The integration algorithm to use

json.emitters array<object>

The emitters for the system instance

THREE object

The Web GL Api to use

System function

The system class

Emitter function

The emitter class

options object
  • optional
  • default: {}

Optional config options

Return:

Promise<System>

public getEasingByName(name: *) source

import {getEasingByName} from 'three-nebula/src/ease/index.js'

Params:

NameTypeAttributeDescription
name *

public integrate(particle: Particle, time: number, damping: number, type: string): * source

import {integrate} from 'three-nebula/src/math/integration.js'

Performs the chosen integration on the particle. Defaults to euler integration.

Params:

NameTypeAttributeDescription
particle Particle

The particle to integrate

time number

The factor of time to use

damping number

The damping to use

type string
  • optional
  • default: INTEGRATION_TYPE_EULER

The algorithm to use

Return:

*

void

public log(): * source

You can use this emit particles.

This method will console.log the fixed number of your info in updata or requestAnimationFrame

use like this log('+12',mc); log 12 times

Return:

*

void

public setEasingByName(easeName: *): * source

import {setEasingByName} from 'three-nebula/src/ease/index.js'

Params:

NameTypeAttributeDescription
easeName *

Return:

*

public vertexShader(): string source

Return:

string

public vertexShader(): string source

Return:

string

public withDefaults(defaults: *, properties: *) source

import {withDefaults} from 'three-nebula/src/utils/index.js'

Params:

NameTypeAttributeDescription
defaults *
properties *

Static Private

private __DEV__(): boolean source

import {__DEV__} from 'three-nebula/src/constants/index.js'

Return:

boolean