Class: Billboard

og.Billboard

new og.Billboard(options)

Represents basic quad billboard image.
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.
src string optional Billboard image url source.
image Image optional Billboard image object.
width number optional Screen width.
height number optional Screen height.
scale number optional Billboard scale.

Extends

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_heightnumber

Billboard screen height.

protected_imageObject

Image object.

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_srcstring

Image src.

protected_visibilityboolean

Billboard visibility.

protected_widthnumber

Billboard screen width.

readonlyidnumber

Object unic identifier.

Methods

Returns aligned vector.
Returns:
Type Description
og.math.Vector3
Returns RGBA color.
Returns:
Type Description
og.math.Vector4

getHeight(){number}

Gets billboard screen height.
Returns:
Type Description
number
Returns billboard screen space offset size.
Returns:
Type Description
og.math.Vector3
Returns billboard position.
Returns:
Type Description
og.math.Vector3
Gets screen space rotation.
Returns:
Type Description
number
Gets billboard scale.
Returns:
Type Description
number
Returns billboard screen size.
Returns:
Type Description
Object

inherited getVisibility(){boolean}

Returns billboard visibility.
Returns:
Type Description
boolean

getWidth(){number}

Gets billboard screen width.
Returns:
Type Description
number
Removes billboard from hander.

inherited 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.

inherited setAlignedAxis3v(alignedAxis)

Sets billboard aligned vector.
Name Type Description
alignedAxis og.math.Vecto3 Vector to align.
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.
Sets billboard color.
Name Type Description
color string HTML style color.

setHeight(height)

Sets billboard screen heigh.
Name Type Description
height number Height.

setImage(image)

Sets image object.
Name Type Description
image Object JavaScript image object.
Sets screen space offset.
Name Type Description
x number X offset.
y number Y offset.
z number optional Z offset.
Sets screen space offset.
Name Type Description
offset og.math.Vector2 Offset size.
Sets billboard opacity.
Name Type Description
a number Billboard opacity.

inherited setPickingColor3v(color)

Sets billboard picking color.
Name Type Description
color og.math.Vector3 Picking color.
Sets billboard position.
Name Type Description
x number X coordinate.
y number Y coordinate.
z number Z coordinate.

inherited setPosition3v(position)

Sets billboard position.
Name Type Description
position og.math.Vector3 Cartesian coordinates.
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.

setSize(width, height)

Sets billboard screen size in pixels.
Name Type Description
width number Billboard width.
height number Billboard height.
Sets billboard image url source.
Name Type Description
src string Image url.

inherited setVisibility(visibility)

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

setWidth(width)

Sets billboard screen width.
Name Type Description
width number Width.