Options
All
  • Public
  • Public/Protected
  • All
Menu

Module scenegraph

Index

References

BaseNode

Re-exports BaseNode

Layers

Re-exports Layers

Node

Re-exports Node

NodeActivator

Re-exports NodeActivator

PrivateNode

Re-exports PrivateNode

Scene

Re-exports Scene

find

Re-exports find

Variables

Const Deactivating

Deactivating: Flags = CCObject.Flags.Deactivating

Const Deactivating

Deactivating: Flags = CCObject.Flags.Deactivating

Const Destroying

Destroying: Flags = CCObject.Flags.Destroying

Const DontDestroy

DontDestroy: Flags = CCObject.Flags.DontDestroy

Const HideInHierarchy

HideInHierarchy: Flags = CCObject.Flags.HideInHierarchy

Const IsEditorOnEnableCalled

IsEditorOnEnableCalled: Flags = CCObject.Flags.IsEditorOnEnableCalled

Const IsOnEnableCalled

IsOnEnableCalled: Flags = CCObject.Flags.IsOnEnableCalled

Const IsOnLoadCalled

IsOnLoadCalled: Flags = CCObject.Flags.IsOnLoadCalled

Const IsOnLoadStarted

IsOnLoadStarted: Flags = CCObject.Flags.IsOnLoadStarted

Const IsPreloadStarted

IsPreloadStarted: Flags = CCObject.Flags.IsPreloadStarted

Const IsStartCalled

IsStartCalled: Flags = CCObject.Flags.IsStartCalled

Const MAX_POOL_SIZE

MAX_POOL_SIZE: 4 = 4

Const TRANSFORM_ON

TRANSFORM_ON: number = 1 << 0

Const _qt

_qt: Quat = new Quat()

Const _up

_up: Vec3 = new Vec3(0, 1, 0)

Const _v3

_v3: Vec3 = new Vec3()

Const activateTasksPool

activateTasksPool: Pool<unknown> = new Pool(MAX_POOL_SIZE)

Const array_a

array_a: any[] = new Array(10)

Const bookOfChange

bookOfChange: Map<Node, number> = new Map<Node, number>()

Const callOnDestroyInTryCatch

callOnDestroyInTryCatch: false | Function = EDITOR && tryCatchFunctor_EDITOR('onDestroy')

Const callOnDisableInTryCatch

callOnDisableInTryCatch: any = EDITOR && callerFunctor('onDisable')

Const callOnEnableInTryCatch

callOnEnableInTryCatch: any = EDITOR && callerFunctor('onEnable')

Const callOnFocusInTryCatch

callOnFocusInTryCatch: false | Function = EDITOR && tryCatchFunctor_EDITOR('onFocusInEditor')

Const callOnLoadInTryCatch

callOnLoadInTryCatch: false | EDITOR = EDITOR && function (c) {try {c.onLoad();} catch (e) {legacyCC._throw(e);}c._objFlags |= IsOnLoadCalled;_onLoadInEditor(c);}

Const callOnLostFocusInTryCatch

callOnLostFocusInTryCatch: false | Function = EDITOR && tryCatchFunctor_EDITOR('onLostFocusInEditor')

Const callPreloadInTryCatch

callPreloadInTryCatch: false | Function = EDITOR && tryCatchFunctor_EDITOR('__preload')

Const callerFunctor

callerFunctor: any = EDITOR && tryCatchFunctor_EDITOR

Const fastRemoveAt

fastRemoveAt: fastRemoveAt = array.fastRemoveAt

Const idGenerator

idGenerator: IDGenerator = new IdGenerator('Node')

Const invokeLateUpdate

invokeLateUpdate: (Anonymous function) = SUPPORT_JIT ? createInvokeImplJit('c.lateUpdate(dt)', true): createInvokeImpl((c, dt) => {c.lateUpdate(dt);},(iterator, dt) => {const array = iterator.array;for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {array[iterator.i].lateUpdate(dt);}},)

Const invokeOnEnable

invokeOnEnable: (Anonymous function) = EDITOR ? (iterator) => {const compScheduler = legacyCC.director._compScheduler;const array = iterator.array;for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {const comp = array[iterator.i];if (comp._enabled) {callOnEnableInTryCatch(comp);const deactivatedDuringOnEnable = !comp.node._activeInHierarchy;if (!deactivatedDuringOnEnable) {compScheduler._onEnabled(comp);}}}} : (iterator) => {const compScheduler = legacyCC.director._compScheduler;const array = iterator.array;for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {const comp = array[iterator.i];if (comp._enabled) {comp.onEnable();const deactivatedDuringOnEnable = !comp.node._activeInHierarchy;if (!deactivatedDuringOnEnable) {compScheduler._onEnabled(comp);}}}}

Const invokeOnLoad

invokeOnLoad: (Anonymous function) = SUPPORT_JIT ? createInvokeImplJit(`c.onLoad();c._objFlags|=${IsOnLoadCalled}`, false, IsOnLoadCalled): createInvokeImpl((c) => {c.onLoad();c._objFlags |= IsOnLoadCalled;},(iterator) => {const array = iterator.array;for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {const comp = array[iterator.i];comp.onLoad();comp._objFlags |= IsOnLoadCalled;}},IsOnLoadCalled,)

Const invokePreload

invokePreload: (Anonymous function) = SUPPORT_JIT ? createInvokeImplJit('c.__preload();'): createInvokeImpl((c) => { c.__preload(); },(iterator) => {const array = iterator.array;for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {array[iterator.i].__preload();}},)

Const invokeStart

invokeStart: (Anonymous function) = SUPPORT_JIT ? createInvokeImplJit(`c.start();c._objFlags|=${IsStartCalled}`, false, IsStartCalled): createInvokeImpl((c) => {c.start();c._objFlags |= IsStartCalled;},(iterator) => {const array = iterator.array;for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {const comp = array[iterator.i];comp.start();comp._objFlags |= IsStartCalled;}},IsStartCalled,)

Const invokeUpdate

invokeUpdate: (Anonymous function) = SUPPORT_JIT ? createInvokeImplJit('c.update(dt)', true): createInvokeImpl((c, dt) => {c.update(dt);},(iterator, dt) => {const array = iterator.array;for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {array[iterator.i].update(dt);}},)

Const m3_1

m3_1: Mat3 = new Mat3()

Const m3_scaling

m3_scaling: Mat3 = new Mat3()

Const m4_1

m4_1: Mat4 = new Mat4()

Const q_a

q_a: Quat = new Quat()

Const q_b

q_b: Quat = new Quat()

Const qt_1

qt_1: Quat = new Quat()

Const v3_a

v3_a: Vec3 = new Vec3()

Functions

componentCorrupted

  • componentCorrupted(node: any, comp: any, index: any): void

onLoadInEditor

  • onLoadInEditor(comp: any): void

compareOrder

  • compareOrder(a: any, b: any): number

createInvokeImpl

  • createInvokeImpl(singleInvoke: any, fastPath: any, ensureFlag?: any): (Anonymous function)

createInvokeImplJit

  • createInvokeImplJit(code: string, useDt?: any, ensureFlag?: any): (Anonymous function)

enableInEditor

  • enableInEditor(comp: any): void

find

  • find(path: string, referenceNode?: Node): Node | null
  • 通过路径从节点树中查找节点的方法,路径是大小写敏感的,并且通过 / 来分隔节点层级。 即使节点的状态是未启用的也可以找到,建议将结果缓存,而不是每次需要都去查找。

    Parameters

    • path: string

      The path of the target node

    • Optional referenceNode: Node

      If given, the search will be limited in the sub node tree of the reference node

    Returns Node | null

getConstructor

sortedIndex

  • sortedIndex(array: any, comp: any): number

stableRemoveInactive

  • stableRemoveInactive(iterator: any, flagToClear: any): void

Object literals

Const layerList

layerList: object

ALL

ALL: number = 4294967295

DEFAULT

DEFAULT: number = (1 << 30)

EDITOR

EDITOR: number = (1 << 22)

GIZMOS

GIZMOS: number = (1 << 21)

IGNORE_RAYCAST

IGNORE_RAYCAST: number = (1 << 20)

NONE

NONE: number = 0

PROFILER

PROFILER: number = (1 << 28)

SCENE_GIZMO

SCENE_GIZMO: number = (1 << 24)

UI_2D

UI_2D: number = (1 << 25)

UI_3D

UI_3D: number = (1 << 23)

Generated using TypeDoc