Class: BaseBillboard

og.BaseBillboard

new og.BaseBillboard(options)

Base prototype for billboard and label classes.
Name Type Description
options Object optional Options:
Name Type Description
position og.math.Vector3 | Array.<number> optional Billboard spatial position.
rotation number optional Screen angle rotaion.
color og.math.Vector4 | string | Array.<number> optional Billboard color.
alignedAxis og.math.Vector3 | Array.<number> optional Billboard aligned vector.
offset og.math.Vector3 | Array.<number> optional Billboard center screen offset.
visibility boolean optional Visibility.

Members

protected_alignedAxisog.math.Vector3

Cartesian aligned axis vector.

protected_colorog.math.Vector4

RGBA color.

protected_entityog.Entity

Entity instance that holds this billboard.

protected_handlerog.BillboardHandler

Handler that stores and renders this billboard object.

protected_handlerIndexnumber

Billboard handler array index.

protected_offsetog.math.Vecto3

Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.

protected_positionog.math.Vector3

Billboard center cartesian position.

protected_rotationnumber

Screen space rotation angle.

protected_scalenumber

Billboard scale.

protected_visibilityboolean

Billboard visibility.

readonlyidnumber

Object unic identifier.

Methods

Returns aligned vector.
Returns:
Type Description
og.math.Vector3
Returns RGBA color.
Returns:
Type Description
og.math.Vector4
Returns billboard screen space offset size.
Returns:
Type Description
og.math.Vector3
Returns billboard position.
Returns:
Type Description
og.math.Vector3

getRotation(){number}

Gets screen space rotation.
Returns:
Type Description
number

getScale(){number}

Gets billboard scale.
Returns:
Type Description
number

getVisibility(){boolean}

Returns billboard visibility.
Returns:
Type Description
boolean
Removes billboard from hander.

setAlignedAxis(x, y, z)

Sets billboard cartesian aligned vector.
Name Type Description
x number Aligned vector X coordinate.
y number Aligned vector Y coordinate.
z number Aligned vector Z coordinate.

setAlignedAxis3v(alignedAxis)

Sets billboard aligned vector.
Name Type Description
alignedAxis og.math.Vecto3 Vector to align.

setColor(r, g, b, a)

Sets RGBA color. Each channel from 0.0 to 1.0.
Name Type Description
r number Red.
g number Green.
b number Blue.
a number Alpha.
Sets RGBA color. Each channel from 0.0 to 1.0.
Name Type Description
color og.math.Vector4 RGBA vector.

setColorHTML(color)

Sets billboard color.
Name Type Description
color string HTML style color.

setOffset(x, y, z)

Sets screen space offset.
Name Type Description
x number X offset.
y number Y offset.
z number optional Z offset.

setOffset3v(offset)

Sets screen space offset.
Name Type Description
offset og.math.Vector2 Offset size.
Sets billboard opacity.
Name Type Description
a number Billboard opacity.

setPickingColor3v(color)

Sets billboard picking color.
Name Type Description
color og.math.Vector3 Picking color.

setPosition(x, y, z)

Sets billboard position.
Name Type Description
x number X coordinate.
y number Y coordinate.
z number Z coordinate.

setPosition3v(position)

Sets billboard position.
Name Type Description
position og.math.Vector3 Cartesian coordinates.

setRotation(rotation)

Sets billboard screen space rotation in radians.
Name Type Description
rotation number Screen space rotation in radians.
Sets billboard scale.
Name Type Description
scale number Scale.

setVisibility(visibility)

Sets billboard visibility.
Name Type Description
visibility boolean Visibility flag.