Billboard

Represents basic quad billboard image.

Constructor

new Billboard(optionsopt)

Parameters:
NameTypeAttributesDescription
optionsObject<optional>

Options:

Properties
NameTypeAttributesDescription
positionVec3 | Array.<number><optional>

Billboard spatial position.

rotationnumber<optional>

Screen angle rotation.

colorVec4 | string | Array.<number><optional>

Billboard color.

alignedAxisVec3 | Array.<number><optional>

Billboard aligned vector.

offsetVec3 | Array.<number><optional>

Billboard center screen offset.

visibilityboolean<optional>

Visibility.

srcstring<optional>

Billboard image url source.

imageImage<optional>

Billboard image object.

widthnumber<optional>

Screen width.

heightnumber<optional>

Screen height.

scalenumber<optional>

Billboard scale.

Extends

Methods

getAlignedAxis() → {Vec3}

Returns aligned vector.

Returns:
Type: 
Vec3

getColor() → {Vec4}

Returns RGBA color.

Returns:
Type: 
Vec4

getHeight() → {number}

Gets billboard screen height.

Returns:
Type: 
number

getOffset() → {Vec3}

Returns billboard screen space offset size.

Returns:
Type: 
Vec3

getPosition() → {Vec3}

Returns billboard position.

Returns:
Type: 
Vec3

getRotation() → {number}

Gets screen space rotation.

Returns:
Type: 
number

getSize() → {Object}

Returns billboard screen size.

Returns:
Type: 
Object

getVisibility() → {boolean}

Returns billboard visibility.

Returns:
Type: 
boolean

getWidth() → {number}

Gets billboard screen width.

Returns:
Type: 
number

remove()

Removes billboard from handler.

setAlignedAxis(x, y, z)

Sets billboard cartesian aligned vector.

Parameters:
NameTypeDescription
xnumber

Aligned vector X coordinate.

ynumber

Aligned vector Y coordinate.

znumber

Aligned vector Z coordinate.

setAlignedAxis3v(alignedAxis)

Sets billboard aligned vector.

Parameters:
NameTypeDescription
alignedAxisVec3

Align direction.

setColor(r, g, b, a)

Sets RGBA color. Each channel from 0.0 to 1.0.

Parameters:
NameTypeDescription
rnumber

Red.

gnumber

Green.

bnumber

Blue.

anumber

Alpha.

setColor4v(color)

Sets RGBA color. Each channel from 0.0 to 1.0.

Parameters:
NameTypeDescription
colorVec4

RGBA vector.

setColorHTML(color)

Sets billboard color.

Parameters:
NameTypeDescription
colorstring

HTML style color.

setHeight(height)

Sets billboard screen heigh.

Parameters:
NameTypeDescription
heightnumber

Height.

setImage(image)

Sets image object.

Parameters:
NameTypeDescription
imageObject

JavaScript image object.

setOffset(x, y, zopt)

Sets screen space offset.

Parameters:
NameTypeAttributesDescription
xnumber

X offset.

ynumber

Y offset.

znumber<optional>

Z offset.

setOffset3v(offset)

Sets screen space offset.

Parameters:
NameTypeDescription
offsetVec2

Offset size.

setOpacity(a)

Sets billboard opacity.

Parameters:
NameTypeDescription
anumber

Billboard opacity.

setPickingColor3v(color)

Sets billboard picking color.

Parameters:
NameTypeDescription
colorVec3

Picking color.

setPosition(x, y, z)

Sets billboard position.

Parameters:
NameTypeDescription
xnumber

X coordinate.

ynumber

Y coordinate.

znumber

Z coordinate.

setPosition3v(position)

Sets billboard position.

Parameters:
NameTypeDescription
positionVec3

Cartesian coordinates.

setRotation(rotation)

Sets billboard screen space rotation in radians.

Parameters:
NameTypeDescription
rotationnumber

Screen space rotation in radians.

setSize(width, height)

Sets billboard screen size in pixels.

Parameters:
NameTypeDescription
widthnumber

Billboard width.

heightnumber

Billboard height.

setSrc(src)

Sets billboard image url source.

Parameters:
NameTypeDescription
srcstring

Image url.

setVisibility(visibility)

Sets billboard visibility.

Parameters:
NameTypeDescription
visibilityboolean

Visibility flag.

setWidth(width)

Sets billboard screen width.

Parameters:
NameTypeDescription
widthnumber

Width.