new ConstantWidthArcs( params: ) → {ConstantWidthArcs}

Description
Creates a ConstantWidthArcs object
Parameters
Name Type Description
params: Object parameter object

Members


numInstances :number

Description
Maximum number of arc instances

segments :number

Description
Number of segments per arc

capResolution :number

Description
Endcap subdivisions

_arcCount :number

Description
Current number of arc instances

_tweens :Array

Description
Animation tweens

init

Description
Initializes the drawable in the WebglContext
Parameters
Name Type Description
gl: WebglContext WebglContext

createRandomArcs

Description
creates a set of arcs with random properties
Parameters
Name Type Description
count: number Number of arcs to randomly create

addArc

Description
Adds an arc to the drawable
Parameters
Name Type Description
params Object Arc parameters
duration number How long should the animation take
cb function Function to call when arc animation is complete

updateArc

Description
Updates properties of arc instance
Parameters
Name Type Description
params Object Arc params
instance number Instance number to update

_createArcFrom

Description
Internal function to compute arc points
Parameters
Name Type Description
arc Object Arc discription
Returns
points

_computeControlPoints

Description
Internal function to compute control points
Parameters
Name Type Description
arc Object arc discriptor
Returns
control points for each arc half

_createInstArray

Description
Computes instance array for each arc
Parameters
Name Type Description
count number how many instances to compute
Returns
instance

createCollisionGeo

Description
Unused function, but required for drawble interface

update

Description
Updates arc uniforms, called prior to draw on each frame
Parameters
Name Type Description
gl WebglContext WebglContext
sceneProps Object Updated scene uniforms
time number frametime

draw

Description
Draws arcs in WebglContext
Parameters
Name Type Description
gl WebglContext WebglContext

rayCastFrom

Description
Ray cast to points object
Parameters
Name Type Description
ray Object worldspace ray to cast
Returns

hitTest

Description
Hit test to points object
Parameters
Name Type Description
ray Object worldspace ray to test
Returns

onSelectionCB

Description
Unused function callback that is required by interface
Parameters
Name Type Description
selection Object Raycast result

onSelection

Description
Unused function callback that is required by interface
Parameters
Name Type Description
lat number latitiude to check against
lon number longitude to check against