Class: UITransform
The component for gui, holding information such as size, scaling, position, etc
Hierarchy
↳
UITransform
Constructors
Properties
Accessors
- eventDispatcher
- isStart
- transform
- enable
- uiInteractiveList
- globalVisible
- visible
- width
- height
- x
- y
- z
- scaleX
- scaleY
- scaleZ
- onChange
Methods
- start
- stop
- onUpdate
- onLateUpdate
- onBeforeUpdate
- onCompute
- onGraphic
- onAddChild
- onRemoveChild
- copyComponent
- destroy
- init
- addUIInteractive
- removeUIInteractive
- onParentChange
- resize
- setXY
- onEnable
- onDisable
- setNeedUpdateUIPanel
- cloneTo
- matrix
- getWorldMatrix
- beforeDestroy
Constructors
constructor
• new UITransform(): UITransform
Returns
Overrides
Defined in
src/components/gui/uiComponents/UITransform.ts:31
Properties
object3D
• object3D: Object3D
= null
owner object3D
Inherited from
Defined in
src/components/ComponentBase.ts:17
isDestroyed
• Optional
isDestroyed: boolean
Inherited from
Defined in
src/components/ComponentBase.ts:38
useParentPivot
• useParentPivot: boolean
= false
Defined in
src/components/gui/uiComponents/UITransform.ts:16
parent
• parent: UITransform
Defined in
src/components/gui/uiComponents/UITransform.ts:17
pivotX
• pivotX: number
= 0.5
Defined in
src/components/gui/uiComponents/UITransform.ts:18
pivotY
• pivotY: number
= 0.5
Defined in
src/components/gui/uiComponents/UITransform.ts:19
needUpdateQuads
• needUpdateQuads: boolean
= true
Defined in
src/components/gui/uiComponents/UITransform.ts:200
Accessors
eventDispatcher
• get
eventDispatcher(): CEventDispatcher
Returns
Inherited from
ComponentBase.eventDispatcher
Defined in
src/components/ComponentBase.ts:23
• set
eventDispatcher(value
): void
Parameters
Name | Type |
---|---|
value | CEventDispatcher |
Returns
void
Inherited from
ComponentBase.eventDispatcher
Defined in
src/components/ComponentBase.ts:28
isStart
• get
isStart(): boolean
Returns
boolean
Inherited from
ComponentBase.isStart
Defined in
src/components/ComponentBase.ts:40
transform
• get
transform(): Transform
Return the Transform component attached to the Object3D.
Returns
Inherited from
ComponentBase.transform
Defined in
src/components/ComponentBase.ts:47
enable
• get
enable(): boolean
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Returns
boolean
Inherited from
ComponentBase.enable
Defined in
src/components/ComponentBase.ts:68
• set
enable(value
): void
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
ComponentBase.enable
Defined in
src/components/ComponentBase.ts:54
uiInteractiveList
• get
uiInteractiveList(): IUIInteractive
[]
Returns
Defined in
src/components/gui/uiComponents/UITransform.ts:27
globalVisible
• get
globalVisible(): boolean
Returns
boolean
Defined in
src/components/gui/uiComponents/UITransform.ts:64
visible
• get
visible(): boolean
Returns
boolean
Defined in
src/components/gui/uiComponents/UITransform.ts:76
• set
visible(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:68
width
• get
width(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:108
height
• get
height(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:112
x
• get
x(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:129
• set
x(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:133
y
• get
y(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:140
• set
y(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:144
z
• get
z(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:158
• set
z(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:162
scaleX
• get
scaleX(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:169
• set
scaleX(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:173
scaleY
• get
scaleY(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:178
• set
scaleY(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:182
scaleZ
• get
scaleZ(): number
Returns
number
Defined in
src/components/gui/uiComponents/UITransform.ts:187
• set
scaleZ(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:191
onChange
• get
onChange(): boolean
Returns
boolean
Defined in
src/components/gui/uiComponents/UITransform.ts:202
• set
onChange(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:208
Methods
start
▸ start(): void
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:113
stop
▸ stop(): void
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:114
onUpdate
▸ onUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:117
onLateUpdate
▸ onLateUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:118
onBeforeUpdate
▸ onBeforeUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:119
onCompute
▸ onCompute(view?
, command?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
command? | GPUCommandEncoder |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:120
onGraphic
▸ onGraphic(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:121
onAddChild
▸ onAddChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:123
onRemoveChild
▸ onRemoveChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:124
copyComponent
▸ copyComponent(from
): this
Parameters
Name | Type |
---|---|
from | this |
Returns
this
Inherited from
Defined in
src/components/ComponentBase.ts:133
destroy
▸ destroy(force?
): void
release this component
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:207
init
▸ init(param?
): void
Parameters
Name | Type |
---|---|
param? | any |
Returns
void
Overrides
Defined in
src/components/gui/uiComponents/UITransform.ts:37
addUIInteractive
▸ addUIInteractive(item
): this
Parameters
Name | Type |
---|---|
item | IUIInteractive |
Returns
this
Defined in
src/components/gui/uiComponents/UITransform.ts:47
removeUIInteractive
▸ removeUIInteractive(item
): IUIInteractive
Parameters
Name | Type |
---|---|
item | IUIInteractive |
Returns
Defined in
src/components/gui/uiComponents/UITransform.ts:53
onParentChange
▸ onParentChange(lastParent?
, currentParent?
): void
Parameters
Name | Type |
---|---|
lastParent? | Object3D |
currentParent? | Object3D |
Returns
void
Overrides
Defined in
src/components/gui/uiComponents/UITransform.ts:102
resize
▸ resize(width
, height
): boolean
Parameters
Name | Type |
---|---|
width | number |
height | number |
Returns
boolean
Defined in
src/components/gui/uiComponents/UITransform.ts:116
setXY
▸ setXY(x
, y
): void
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:151
onEnable
▸ onEnable(): void
Returns
void
Overrides
Defined in
src/components/gui/uiComponents/UITransform.ts:223
onDisable
▸ onDisable(): void
Returns
void
Overrides
Defined in
src/components/gui/uiComponents/UITransform.ts:228
setNeedUpdateUIPanel
▸ setNeedUpdateUIPanel(): void
Returns
void
Defined in
src/components/gui/uiComponents/UITransform.ts:233
cloneTo
▸ cloneTo(obj
): void
clone component data to target object3D
Parameters
Name | Type | Description |
---|---|---|
obj | Object3D | target object3D |
Returns
void
Overrides
Defined in
src/components/gui/uiComponents/UITransform.ts:244
matrix
▸ matrix(): Matrix3
Returns
Defined in
src/components/gui/uiComponents/UITransform.ts:260
getWorldMatrix
▸ getWorldMatrix(): Matrix3
Returns
Defined in
src/components/gui/uiComponents/UITransform.ts:286
beforeDestroy
▸ beforeDestroy(force?
): void
before release this component, object refrences are not be set null now.
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void