new Points( params ) → {Points}

Description
Creates a points object
Parameters
Name Type Description
params Object Parameters for object
Returns

Members


datastore :DataStore

Description
DataStore object used to compute geometry

datastore :DataStore

Description
DataStore object used to compute geometry

maxSelectionDistance :number

Description
Max distance nearest neighbor search in km
Details
number

300


maxSelectionDistance :number

Description
Max distance nearest neighbor search in km
Details
number

300


maxSelectionCount :number

Description
Max number of nearest neighbors
Details
number

1


maxSelectionCount :number

Description
Max number of nearest neighbors
Details
number

1


maxDataPoints :number

Description
Max number of datapoints per buffer
Details
number

10000


dataPointCount :number

Description
Current number of datapoints

_resourceLoaded :boolean

Description
Have resources been loaded

_resourceLoaded :boolean

Description
Have resources been loaded

_isDirty :boolean

Description
Has current data been uploaded to webgl context

_isDirty :boolean

Description
Has current data been uploaded to webgl context

_hasGeometry :boolean

Description
Has any data been uploaded to webgl context

_hasGeometry :boolean

Description
Has any data been uploaded to webgl context

useTexture :bool

Description
Should the points sample from a texture
Details
bool

false


createEmptyVertices

Description
Creates empty buffers with defined size

extendVerticesBy

Description
Extend current buffers
Parameters
Name Type Description
size number amount to extend buffers by

createCollisionGeo

Description
Unused function, required by drawable interface

update

Description
Update uniforms for draw
Parameters
Name Type Description
gl WebglContext WebglContext
sceneProps Object Object of scene uniforms
time number frametime

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
Callback fired when point(s) get selected
Parameters
Name Type Description
selection Object mutable list of points that got selected
Returns
mutated selection object

onSelection

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

transform

Description
Mutate point by a data element
Parameters
Name Type Description
element Object data element to mutate point with
point Object single point drawable description
Returns
mutated point object

addGeojson

Description
Add points using geojson format
Parameters
Name Type Description
geojson Object Geojson data
onAdd function callback to fire when added

addDataPoint

Description
Add datapoint using datastore format
Parameters
Name Type Description
dataPoint Object data in datastore format
onAdd function callback to fire when added

updatePoint

Description
Updates point geometry in place. Note: position is in world space, color is in normalized RGBA, size is in pixels
Parameters
Name Type Description
dataPoint Object data index in datastore
params Object point parameters object with updated position, color, or size

getNearest

Description
Get nearest points to target
Parameters
Name Type Description
lat number target latitude
lon number target longitude
Returns
nearest points and distances

Methods


init( gl )

Description
Initialize geometry & shaders in Webgl context
Parameters
Name Type Description
gl WebGLContext WebGL context

draw( gl )

Description
Renders to the webgl context
Parameters
Name Type Description
gl Webgl Webgl context