Colormaker
Direct Subclass:
Class for making colors.
Constructor Summary
Public Constructor | ||
public |
constructor(params: ColormakerParameters) Create a colormaker instance |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
atomColorToArray(atom: AtomProxy, array: Array | TypedArray, offset: Integer): Array safe a atom color to an array |
|
public |
return the color for an bond |
|
public |
bondColorToArray(bond: BondProxy, fromTo: Boolean, array: Array | TypedArray, offset: Integer): Array safe a bond color to an array |
|
public |
colorToArray(color: Integer, array: Array | TypedArray, offset: Integer): Array safe a color to an array |
|
public |
getScale() |
|
public |
positionColorToArray(coords: Vector3, array: Array | TypedArray, offset: Integer): Array safe a color for coordinates in space to an array |
|
public |
volumeColorToArray(index: Integer, array: Array | TypedArray, offset: Integer): Array safe a volume cell color to an array |
Public Constructors
public constructor(params: ColormakerParameters) source
Create a colormaker instance
Params:
Name | Type | Attribute | Description |
params | ColormakerParameters | colormaker parameter |
Public Members
public atomProxy source
public domain source
public mode source
public reverse source
public scale source
public structure source
public surface source
public value source
public volume source
Public Methods
public atomColorToArray(atom: AtomProxy, array: Array | TypedArray, offset: Integer): Array source
safe a atom color to an array
Params:
Name | Type | Attribute | Description |
atom | AtomProxy | atom to get color for |
|
array | Array | TypedArray | destination |
|
offset | Integer | index into the array |
public bondColorToArray(bond: BondProxy, fromTo: Boolean, array: Array | TypedArray, offset: Integer): Array source
safe a bond color to an array
Params:
Name | Type | Attribute | Description |
bond | BondProxy | bond to get color for |
|
fromTo | Boolean | whether to use the first or second atom of the bond |
|
array | Array | TypedArray | destination |
|
offset | Integer | index into the array |
public colorToArray(color: Integer, array: Array | TypedArray, offset: Integer): Array source
safe a color to an array
Params:
Name | Type | Attribute | Description |
color | Integer | hex color value |
|
array | Array | TypedArray | destination |
|
offset | Integer | index into the array |
public getScale() source
public positionColorToArray(coords: Vector3, array: Array | TypedArray, offset: Integer): Array source
safe a color for coordinates in space to an array
Params:
Name | Type | Attribute | Description |
coords | Vector3 | xyz coordinates |
|
array | Array | TypedArray | destination |
|
offset | Integer | index into the array |
public volumeColorToArray(index: Integer, array: Array | TypedArray, offset: Integer): Array source
safe a volume cell color to an array
Params:
Name | Type | Attribute | Description |
index | Integer | volume cell index |
|
array | Array | TypedArray | destination |
|
offset | Integer | index into the array |