Class: Dynatex

XComponent.Dynatex()

new Dynatex()

Dynamic lightweigth texture with a canvas shared & managed by CanvTex.

Source:

Members

bg-color

Properties:
Name Type Attributes Default Description
bg-color string <optional>
'blue'

text back ground color, defualt 'blue'

Source:

dirty

User shouldn't set this at all updatinng loops as it triggering texture reloading.

Properties:
Name Type Attributes Default Description
dirty bool <optional>
true

canvas needing been updated (text changed)

Source:

font

For reference, see MDN CSS Font.
defualt: 'Arial'

Properties:
Name Type Description
font Object

{x, y, w = 128, h = 128}, where wh are the canvas size.

Source:

hue

Properties:
Name Type Attributes Default Description
hue array <optional>
[0, 0, 0]

default difuse color, 0 ~ 1

Source:

lookScreen

Properties:
Name Type Attributes Default Description
lookScreen Object <optional>
true

always look at screen

Source:

style

For reference, see MDN Canvas.style

Properties:
Name Type Description
style object

style only used at creating object

Source:

text

Properties:
Name Type Description
text string

text (shared resource key)

Source:

textplane

Don't touch this, it's managed by system.

Properties:
Name Type Description
textplane THREE.Mesh

plane mesh of text canvas

Source:

texWeight

Properties:
Name Type Attributes Default Description
texWeight number <optional>
1

default text color weigth, 0 ~ 1

Source:

transform

Child transform. Typical use of this is to rotate the child text vertical to horizon.
This transform will only affect the text plane.

Properties:
Name Type Description
transform array

child transform.

Source:

u_tex

Properties:
Name Type Description
u_tex array

for text background, etc. Same as XComponent.Visual.paras.u_tex

Source:

xywh

See docs/Dynatex for details.

Properties:
Name Type Description
xywh Object

{x:number, y:number, w:number, h:number, size:number}
where
x, y: text offsets.
w, h: canvas (also child plane mesh) width, height.
margin: text marging in canvase
size: font size.

Source: