Skip to content

Class: UITransform

The component for gui, holding information such as size, scaling, position, etc

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

constructor

new UITransform(): UITransform

Returns

UITransform

Overrides

ComponentBase.constructor

Defined in

src/components/gui/uiComponents/UITransform.ts:31

Properties

object3D

object3D: Object3D = null

owner object3D

Inherited from

ComponentBase.object3D

Defined in

src/components/ComponentBase.ts:17


isDestroyed

Optional isDestroyed: boolean

Inherited from

ComponentBase.isDestroyed

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

CEventDispatcher

Inherited from

ComponentBase.eventDispatcher

Defined in

src/components/ComponentBase.ts:23

set eventDispatcher(value): void

Parameters

NameType
valueCEventDispatcher

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

Transform

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

NameType
valueboolean

Returns

void

Inherited from

ComponentBase.enable

Defined in

src/components/ComponentBase.ts:54


uiInteractiveList

get uiInteractiveList(): IUIInteractive[]

Returns

IUIInteractive[]

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

NameType
valueboolean

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

NameType
valuenumber

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

NameType
valuenumber

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

NameType
valuenumber

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

NameType
valuenumber

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

NameType
valuenumber

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

NameType
valuenumber

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

NameType
valueboolean

Returns

void

Defined in

src/components/gui/uiComponents/UITransform.ts:208

Methods

start

start(): void

Returns

void

Inherited from

ComponentBase.start

Defined in

src/components/ComponentBase.ts:113


stop

stop(): void

Returns

void

Inherited from

ComponentBase.stop

Defined in

src/components/ComponentBase.ts:114


onUpdate

onUpdate(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onUpdate

Defined in

src/components/ComponentBase.ts:117


onLateUpdate

onLateUpdate(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onLateUpdate

Defined in

src/components/ComponentBase.ts:118


onBeforeUpdate

onBeforeUpdate(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onBeforeUpdate

Defined in

src/components/ComponentBase.ts:119


onCompute

onCompute(view?, command?): any

Parameters

NameType
view?View3D
command?GPUCommandEncoder

Returns

any

Inherited from

ComponentBase.onCompute

Defined in

src/components/ComponentBase.ts:120


onGraphic

onGraphic(view?): any

Parameters

NameType
view?View3D

Returns

any

Inherited from

ComponentBase.onGraphic

Defined in

src/components/ComponentBase.ts:121


onAddChild

onAddChild(child): any

Parameters

NameType
childObject3D

Returns

any

Inherited from

ComponentBase.onAddChild

Defined in

src/components/ComponentBase.ts:123


onRemoveChild

onRemoveChild(child): any

Parameters

NameType
childObject3D

Returns

any

Inherited from

ComponentBase.onRemoveChild

Defined in

src/components/ComponentBase.ts:124


copyComponent

copyComponent(from): this

Parameters

NameType
fromthis

Returns

this

Inherited from

ComponentBase.copyComponent

Defined in

src/components/ComponentBase.ts:133


destroy

destroy(force?): void

release this component

Parameters

NameType
force?boolean

Returns

void

Inherited from

ComponentBase.destroy

Defined in

src/components/ComponentBase.ts:207


init

init(param?): void

Parameters

NameType
param?any

Returns

void

Overrides

ComponentBase.init

Defined in

src/components/gui/uiComponents/UITransform.ts:37


addUIInteractive

addUIInteractive(item): this

Parameters

NameType
itemIUIInteractive

Returns

this

Defined in

src/components/gui/uiComponents/UITransform.ts:47


removeUIInteractive

removeUIInteractive(item): IUIInteractive

Parameters

NameType
itemIUIInteractive

Returns

IUIInteractive

Defined in

src/components/gui/uiComponents/UITransform.ts:53


onParentChange

onParentChange(lastParent?, currentParent?): void

Parameters

NameType
lastParent?Object3D
currentParent?Object3D

Returns

void

Overrides

ComponentBase.onParentChange

Defined in

src/components/gui/uiComponents/UITransform.ts:102


resize

resize(width, height): boolean

Parameters

NameType
widthnumber
heightnumber

Returns

boolean

Defined in

src/components/gui/uiComponents/UITransform.ts:116


setXY

setXY(x, y): void

Parameters

NameType
xnumber
ynumber

Returns

void

Defined in

src/components/gui/uiComponents/UITransform.ts:151


onEnable

onEnable(): void

Returns

void

Overrides

ComponentBase.onEnable

Defined in

src/components/gui/uiComponents/UITransform.ts:223


onDisable

onDisable(): void

Returns

void

Overrides

ComponentBase.onDisable

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

NameTypeDescription
objObject3Dtarget object3D

Returns

void

Overrides

ComponentBase.cloneTo

Defined in

src/components/gui/uiComponents/UITransform.ts:244


matrix

matrix(): Matrix3

Returns

Matrix3

Defined in

src/components/gui/uiComponents/UITransform.ts:260


getWorldMatrix

getWorldMatrix(): Matrix3

Returns

Matrix3

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

NameType
force?boolean

Returns

void

Overrides

ComponentBase.beforeDestroy

Defined in

src/components/gui/uiComponents/UITransform.ts:300