EasyCam Library Info
EasyCam
new Dw.EasyCam(p5.RendererGL, { distance : z, // scalar center : [x, y, z], // vector rotation : [q0, q1, q2, q3], // quaternion viewport : [x, y, w, h], // array }
(p5.RendererGL)
p5 WEBGL renderer
(Object)
{distance, center, rotation, viewport}
sets the WEBGL renderer the camera is working on
(p5.RendererGL)
... p5 WEBGL renderer
p5.RendererGL
:
the currently used renderer
attaches input-listeners (mouse, touch, key) to the used renderer
(any)
detaches all attached input-listeners
Disposes/releases the camera.
Updates the camera state (interpolated / damped animations) and updates the renderers' modelview/camera matrix.
if "auto_update" is true, this is called automatically in a pre-draw call.
Applies the current camera state to the renderers' modelview/camera matrix. If no argument is given, then the cameras currently set renderer is used.
(any)
implemented zoom-cb for mouswheel handler.
implemented zoom-cb for mousedrag/touch handler.
implemented pan-cb for mousedrag/touch handler.
implemented rotate-cb for mousedrag/touch handler.
(private) returns the used zoom -multiplier for damped actions.
(private) returns the used pan-multiplier for damped actions.
(private) returns the used rotate-multiplier for damped actions.
Applies a change to the current zoom.
(any)
Applies a change to the current pan-xValue.
(any)
Applies a change to the current pan-yValue.
(any)
Applies a change to the current pan-value.
(any)
(any)
Applies a change to the current xRotation.
(any)
Applies a change to the current yRotation.
(any)
Applies a change to the current zRotation.
(any)
Applies a change to the current rotation, using the given axis/angle.
(any)
(any)
Sets the new camera-distance, interpolated (t) between given A and B.
(any)
(any)
(any)
Sets the new camera-center, interpolated (t) between given A and B.
(any)
(any)
(any)
Sets the new camera-rotation, interpolated (t) between given A and B.
(any)
(any)
(any)
Sets the minimum camera distance.
(any)
Sets the maximum camera distance.
(any)
Sets the new camera distance.
(any)
(any)
(double)
distance.
(long)
time in millis.
double
:
the current camera distance.
sets the current state as reset-state.
resets the camera, by applying the reset-state.
(any)
sets the rotation scale/speed.
(any)
sets the pan scale/speed.
(any)
sets the zoom scale/speed.
(any)
sets the wheel scale/speed.
(any)
any
:
the rotation scale/speed.
any
:
the pan scale/speed.
any
:
the zoom scale/speed.
any
:
the wheel scale/speed.
sets the default damping scale/speed.
(any)
sets the default interpolation time in millis.
(any)
begin screen-aligned 2D-drawing.
beginHUD() disabled depth test ortho ... your code is executed here ... endHUD()
(any)
(any)
(any)
end screen-aligned 2D-drawing.
(any)
Damped callback, that accepts the resulting damped/smooth value.
Type: Function
(double)
the damped/smoothed value
DampedAction, for smoothly changing a value to zero.
(dampedCallback)
callback that accepts the damped value as argument.
adds a value to the current value beeing damped.
(double)
the value beeing added.
updates the damping and calls damped-callback.
stops the damping.
Interpolation, for smoothly changing a value by interpolating it over time.
(interpolationCallback)
callback for interpolating between two values.
starts the interpolation. If the given interpolation-duration is 0, then interpolation-callback is called immediately.
(any)
(any)
(any)
(any)
updates the interpolation and calls interpolation-callback.
stops the interpolation.
Interpolation callback, that implements any form of interpolation between two values A and B and the interpolationparameter t.
linear: A * (1-t) + B * t smooth, etc...
Type: Function
Rotation as Quaternion [q0, q1, q2, q3]
Note: Only functions that were required for the EasyCam to work are implemented.
Scalar as a simple number.
Note: Only functions that were required for the EasyCam to work are implemented.
Linear interpolation between A and B using t[0,1]
(any)
(any)
(any)
modifying t as a function of smoothstep(0,1,t);
(any)
modifying t as a function of smootherstep(0,1,t);
(any)
Vec3 as a 3D vector (Array)
addition:
dst = a + b
(any)
(any)
(any)
componentwise multiplication:
dst = a * b
(any)
(any)
(any)
squared length
(any)
length
(any)
dot-product
(any)
(any)
cross-product
(any)
(any)
(any)
angle
(any)
(any)
linear interpolation:
dst = a (1 - t) + b t
(any)
(any)
(any)
(any)
Overriding the current p5.ortho();
p5 v0.5.16 temporary bugfix for https://github.com/processing/p5.js/pull/2463.
(Number)
camera frustum left plane
(Number)
camera frustum right plane
(Number)
camera frustum bottom plane
(Number)
camera frustum top plane
(Number)
camera frustum near plane
(Number)
camera frustum far plane
p5
:
the p5 object