Class: object

geo.webgl. object

new geo.webgl.object(arg){geo.webgl.object}

WebGL specific subclass of object which rerenders when the object is drawn.

Name Type Description
arg object

Options for the object.

Returns:
Type Description
geo.webgl.object

Extends

Members

inherited idle

Getter for the idle state. Read only.

Properties:
Name Type Description
idle boolean

true if the object is idle (onIdle would call a handler immediately).

Methods

inherited addChild(child){this}

Add a child (or an array of children) to the object.

Name Type Description
child geo.object | Array.<geo.object>

A child object or array of child objects.

Returns:
Type Description
this

inherited addPromise(promise){this}

Add the promise here and also propagate up the scene tree.

Name Type Description
promise Promise

A promise object.

Returns:
Type Description
this

bin(val, actualValue){number|this}

Get/Set bin of the feature. The bin number is used to determine the order of multiple features on the same layer. It has no effect except on the webgl renderer. A negative value hides the feature without stopping interaction with it. Otherwise, features with higher bin numbers are drawn above those with lower bin numbers. If two features have the same bin number, their order relative to one another is indeterminate and may be unstable.

Name Type Description
val number optional

The new bin number. If undefined, return the current bin number. If null, the bin is dynamically computed based on order within the parent. If children are nested, this may not be what is desired.

actualValue boolean optional

If truthy and val is undefined, return the actual value of bin, rather than the dynamically computed value.

Returns:
Type Description
number | this The current bin number or a reference to this.

Get an array of the child objects.

Returns:
Type Description
Array.<geo.object> A copy of the array of child objects.

draw(){this}

Redraw the object.

Returns:
Type Description
this

inherited geoIsOn(event, handler){boolean}

Report if an event handler is bound to this object.

Name Type Description
event string | Array.<string>

An event or list of events to check.

handler function optional

A function that might be bound. If undefined, this will report true if there is any handler for the specified event.

Returns:
Type Description
boolean true if any of the specified events are bound to the specified handler.

inherited geoOff(event, arg){this}

Remove handlers from one event or an array of events. If no event is provided all handlers will be removed.

Name Type Description
event string | Array.<string> optional

An event or a list of events from geo.event or defined by the user, or undefined to remove all events (in which case arg is ignored).

arg function | Array.<function()> optional nullable

A function or array of functions to remove from the events or a falsy value to remove all handlers from the events.

Returns:
Type Description
this

inherited geoOn(event, handler){this}

Bind an event handler to this object.

Name Type Description
event string

An event from geo.event or a user-defined value.

handler function

A function that is called when event is triggered. The function is passed a geo.event object.

Returns:
Type Description
this

inherited geoTrigger(event, args, childrenOnly){this}

Trigger an event (or events) on this object and call all handlers.

Name Type Description
event string

The event to trigger.

args object

Arbitrary argument to pass to the handler.

childrenOnly boolean optional

If truthy, only propagate down the tree.

Returns:
Type Description
this

inherited modified(){this}

Update the timestamp to the next global timestamp value.

Returns:
Type Description
this

inherited onIdle(handler){this}

Bind a handler that will be called one time when all internal promises are resolved. If there are no outstanding promises, this is invoked synchronously.

Name Type Description
handler function

A function taking no arguments.

Returns:
Type Description
this

Get/set parent of the object.

Name Type Description
arg geo.sceneObject optional

The new parant or undefined to get the current parent.

Returns:
Type Description
this | geo.sceneObject

inherited removeChild(child){this}

Remove a child (or array of children) from the object.

Name Type Description
child geo.object | Array.<geo.object>

A child object or array of child objects.

Returns:
Type Description
this

inherited timestamp(){number}

Get time.

Returns:
Type Description
number The timestamp. This is 0 if the timestamp has never been modified.