Class: BaseBillboard

og/entity/BaseBillboard~BaseBillboard

Base prototype for billboard and label classes.

new BaseBillboard(options)

Name Type Description
options Object optional Options:
Name Type Description
position Vec3 | Array.<number> optional Billboard spatial position.
rotation number optional Screen angle rotaion.
color Vec4 | string | Array.<number> optional Billboard color.
alignedAxis Vec3 | Array.<number> optional Billboard aligned vector.
offset Vec3 | Array.<number> optional Billboard center screen offset.
visibility boolean optional Visibility.

Members

protected_alignedAxisVec3

Cartesian aligned axis vector.

protected_colorVec4

RGBA color.

protected_entityEntity

Entity instance that holds this billboard.

protected_handlerBillboardHandler

Handler that stores and renders this billboard object.

protected_handlerIndexnumber

Billboard handler array index.

protected_isReadynumber

An indication that the object is ready to draw

protected_offsetmath.Vecto3

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

protected_positionVec3

Billboard center cartesian position.

protected_rotationnumber

Screen space rotation angle.

protected_visibilityboolean

Billboard visibility.

readonlyidnumber

Object unic identifier.

Methods

getAlignedAxis(){Vec3}

Returns aligned vector.
Returns:
Type Description
Vec3
Returns RGBA color.
Returns:
Type Description
Vec4
Returns billboard screen space offset size.
Returns:
Type Description
Vec3

getPosition(){Vec3}

Returns billboard position.
Returns:
Type Description
Vec3

getRotation(){number}

Gets screen space rotation.
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 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 Vec4 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 Vec2 Offset size.
Sets billboard opacity.
Name Type Description
a number Billboard opacity.

setPickingColor3v(color)

Sets billboard picking color.
Name Type Description
color Vec3 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 Vec3 Cartesian coordinates.

setRotation(rotation)

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

setVisibility(visibility)

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