Icon
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
id: string
Your own string id.
iconId: number
The icon index in the icon texture atlas. Fist icon has iconId 0.
styleId: number
The styleId selects a icon style. First style has styleId 0.
size: number
Set the scale size of the icon 0-N. If the size is 0.0 the icon is invisible. If it is 1, iconMaxSize of setIconAtlas is unscaled.
position: Vector3
Contains the 3D-coordinate where the icon is rendered.
color: Color4
Custom color RGB, the A channel is used for icon size. If size is 0, the icon is not visible. If RGB is 1.0 only the color from icon texture pixels will be used for coloring. Other values are mixed in.
visible: boolean = true
Defaults to
true
isPickable: boolean = false
Whether Icon can be found in a pick operation or not. Defaults to
true
.
Returns Icon
Properties
publiciconId
The icon index in the icon texture atlas. Fist icon has iconId 0.
publicreadonlyid
Your own string id.
publicisPickable
Whether Icon can be found in a pick operation or not. Defaults to true
.
publicsize
Set the scale size of the icon 0-N. If the size is 0.0 the icon is invisible. If it is 1, iconMaxSize of setIconAtlas is unscaled.
publicstyleId
The styleId selects a icon style. First style has styleId 0.
publicvisible
Defaults to true
Accessors
publiccolor
Color of icon. If alpha is zero the icon will not be rendered.
Returns Color4
publicisOccluded
true
if occluded, otherwisefalse
. Only valid if parent.occlusionCullingInterval>= 0
. Otherwise it will always befalse
.Returns boolean
publicparent
IconHandler this Icon is attached to. See attach and detach.
Returns undefined | IconHandler
Parent IconHandler.
undefined
Icon as not yet been attached to a IconHandler.
publicposition
Position of icon in world space.
Returns Vector3
Methods
publicdetach
Detach icon from its IconHandler if it is attached.
Returns boolean
true
if icon was detached. Otherwisefalse
. Happens when icon has no IconHandler.
publicintersect
Perform intersection test against icon using a ray.
Parameters
pO: PickOptionRay
Ray to pick with
Returns Intersection[]
Intersection or empty array if no intersection
Creates a icon to use in 3D. The icon need to be attached to a IconHandler to be renderd.