Class

WebGLParticleSystem

WebGLUtils.WebGLParticleSystem()

WebGL particle system

Constructor

# new WebGLParticleSystem()

View Source utils/webglUtils.js, line 102

Methods

# dispose()

Cleanup resources

View Source utils/webglUtils.js, line 483

# hexToRgb(hex) → {Object}

Convert hex color to RGB

Parameters:
Name Type Description
hex string

Hex color string

View Source utils/webglUtils.js, line 461

RGB object

Object

# initializeBuffers()

Initialize buffers

View Source utils/webglUtils.js, line 243

# initializeShaders()

Initialize shaders

View Source utils/webglUtils.js, line 127

# render()

Render frame

View Source utils/webglUtils.js, line 318

# renderBackground()

Render background

View Source utils/webglUtils.js, line 344

# renderParticles()

Render particles

View Source utils/webglUtils.js, line 369

# resize(width, height)

Resize canvas

Parameters:
Name Type Description
width number

New width

height number

New height

View Source utils/webglUtils.js, line 475

# start()

Start animation loop

View Source utils/webglUtils.js, line 411

# stop()

Stop animation

View Source utils/webglUtils.js, line 429

# updateColors(colors)

Update particle colors

Parameters:
Name Type Description
colors Array

Array of RGB colors

View Source utils/webglUtils.js, line 437