Environment Molecule

Add an environmental effect.

Summary
Environment Molecule
Preference Dialog
Comments
Properties
typestring, ( r )
pref.namestring, ( r )
pref.skyTypeint, ( r, w )
pref.fogTypeint, ( r, w )
pref.frint [0, 255], ( r, w )
pref.fgint [0, 255], ( r, w )
pref.fbint [0, 255], ( r, w )
pref.densityfloat [0, 1], ( r, w )
pref.linearStartfloat, ( r, w )
pref.linearEndfloat, ( r, w )
skyEnabledbool, ( r, w )
Functions
attach
detach
delete
rename
refresh
clone
serialize

Preference Dialog

Comments

Properties

type

string, ( r )

Type of this molecule, environment.

pref.name

string, ( r )

The scriptable name for this molecule.  This name can be set using rename function dynamically.

pref.skyType

int, ( r, w )

0none.
1skybox.
2skydome.

Currently only skybox is available.

pref.fogType

int, ( r, w )

0none.
1linear.
2exponential.

pref.fr

int [0, 255], ( r, w )

Specifies the RED component of the fog color.

pref.fg

int [0, 255], ( r, w )

Specifies the GREEN component of the fog color.

pref.fb

int [0, 255], ( r, w )

Specifies the BLUE component of the fog color.

pref.density

float [0, 1], ( r, w )

Specifies fog density.

pref.linearStart

float, ( r, w )

Specifies linear fog’s start distance from view position.

pref.linearEnd

float, ( r, w )

Specifies linear fog’s end distance from view position.

skyEnabled

bool, ( r, w )

Switches sky on and off.

Functions

attach

attach(droplet);

Attach this molecule to the given droplet.

Parameters

droplet(object) a droplet.

Returns

N/A

detach

detach();

Remove this molecule from its droplet.

Parameters

N/A

Returns

N/A

delete

delete();

Delete this molecule.

Parameters

N/A

Returns

N/A

rename

rename(name);

Rename this molecule.

Parameters

name(string) a new name.

Returns

N/A

refresh

refresh();

Forces molecule to redraw with the current set of preferences.

Parameters

N/A

Returns

N/A

clone

clone();

Create a clone of this molecule.

Parameters

N/A

Returns

(object) a molecule.

serialize

serialize();

Serialize this molecule into its JSON representation.

Parameters

N/A

Returns

(string) JSON representation of a molecule.

Close