NGL@0.10.4 Home Manual Reference Source GalleryRepository
import RandomColormaker from 'ngl/src/color/random-colormaker.js'
public class | source

RandomColormaker

Extends:

Colormaker → RandomColormaker

Class by random color

Method Summary

Public Methods
public

get color for an atom

public

get color for coordinates in space

public

get color for volume cell

Inherited Summary

From class Colormaker
public

safe a atom color to an array

public

bondColor(bond: BondProxy, fromTo: Boolean): Integer

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

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 Methods

public atomColor(): Integer source

get color for an atom

Return:

Integer

random hex color

public positionColor(): Integer source

get color for coordinates in space

Return:

Integer

random hex color

public volumeColor(): Integer source

get color for volume cell

Return:

Integer

random hex color