This is a small collection of threejs libraries, including my own and third party dependencies. All the examples can be seen live at gh-pages.
This is the base of my libraries (though not all require it). All the examples use this. It can be used directly (as in the emitter example) or as a base class (as in the animator example).
Provides:
HMU.Option(base, spread) - Constructor for repeatedly generating random values in a range.HMU.utils.randomVector3(base, spread)- Returns a randomTHREE.Vector3in [base - spread / 2, base + spread / 2].HMU.utils.randomEuler(base, spread)- Returns a randomTHREE.Eulerin [base - spread / 2, base + spread / 2].HMU.utils.randomColor(base, spread)- Returns a randomTHREE.Colorin [base - spread / 2, base + spread / 2].HMU.utils.randomFloat(base, spread)- Returns a randomNumberin [base - spread / 2, base + spread / 2].
Provides:
HMU.utils.CylinderGeometryUV(geometry)- Generates a UV layout for the givenTHREE.Geometry, generated byTHREE.CylinderGeometry.
The animator library can be used standalone. The usage is fairly straight-forward and can be seen in the animator example.
Provides:
HMU.Animator()- Constructor for an animations manager.HMU.Animation(object, property, config)- Constructor for an individual animation. (Probably won't need directly.)HMU.Easing.*(time, base, change, duration)- a subset of Robert Penner's Easing Equations. Extend to provide more easing options toHMU.Animation.
The emitter library depends on HMU.Option, provided by Utils. The easiest way to see how it works is to play with the emitter example.
Provides:
HMU.Emitter(options)- Constructor for managing an object emitter.
The perlin library can be used standalone. The usage is fairly straight-forward and can be seen in the perlin example. It is an early beta and has not been optimized.
Provides:
HMU.Perlin(input)- Returns the scalar value for a givenTHREE.Vector3.HMU.Perlin.gradient(input)- Returns the gradient for a givenTHREE.Vector3, after rounding.
Private:
HMU.Perlin.gradient.fp(input)HMU.Perlin.gradient.fgx(input)HMU.Perlin.gradient.fgy(input)HMU.Perlin.gradient.fgz(input)
The swarm library is only a skeleton, and currently has no usable code. When complete, it should be usable standalone, however.
Provides:
HMU.Swarm- Constructor for managing a swarm ofHMU.Drones.HMU.Drone- An individual unit of anHMU.Swarm.