| y | | | x /— — — — — — / / /z 右手坐标系

Hierarchy

Constructors

Properties

$$turboxProperties: {
    $$turboxProperties?: { id?: string | undefined; name?: string | undefined; position?: Vector3 | undefined; rotation?: Vector3 | undefined; scale?: Vector3 | undefined; size?: Vector3 | undefined; ... 80 more ...; $update?: (<K extends never>(obj: {} | Pick<...>, actionName?: string | undefined, displayName?: string | undefined, forceSav...;
    box2Front: undefined | Vector2[];
    box2FrontAABBWCS: undefined | Vector2[];
    box2FrontWCS: undefined | Vector2[];
    box2Left: undefined | Vector2[];
    box2LeftAABBWCS: undefined | Vector2[];
    box2LeftWCS: undefined | Vector2[];
    box2Top: undefined | Vector2[];
    box2TopAABBWCS: undefined | Vector2[];
    box2TopWCS: undefined | Vector2[];
    box3: undefined | Vector3[];
    box3AABB: undefined | Vector3[];
    box3AABBWCS: undefined | Vector3[];
    box3WCS: undefined | Vector3[];
    children?: Set<EntityObject>;
    concatenatedMatrix: undefined | Matrix4;
    hidden?: boolean;
    id?: string;
    isClickable?: boolean;
    isDraggable?: boolean;
    isHoverable?: boolean;
    isPinchable?: boolean;
    isPressable?: boolean;
    isRotatable?: boolean;
    locked?: boolean;
    matrix3Front: undefined | Matrix3;
    matrix3Left: undefined | Matrix3;
    matrix3Top: undefined | Matrix3;
    matrix4: undefined | Matrix4;
    meshes?: MeshModel[];
    name?: string;
    parent?: EntityObject;
    position?: Vector3;
    renderOrder?: number;
    rotation?: Vector3;
    scale?: Vector3;
    scaledSize: undefined | Vector3;
    size?: Vector3;
    $update?<K>(obj, actionName?, displayName?, forceSaveHistory?, isNeedRecord?, immediately?): void;
    addChild?(child): AssemblyEntityObject;
    addChildren?(children): AssemblyEntityObject;
    clockwisePoints?(points, clockwise?): Vector2[];
    computedPropertyGet?<T>(key, options?, descriptor?): T;
    computedPropertySet?<T>(key, original): void;
    disposeReactivePipeLine?(): void;
    getBox2?(type, useWCS?): Vector2[];
    getBox2AABB?(type, useWCS?): Vector2[];
    getBox3?(matrix4?, useWCS?): Vector3[];
    getBox3AABB?(matrix4?, useWCS?): Vector3[];
    getConcatenatedMatrix?(): Matrix4;
    getConcatenatedMatrix3?(type): Matrix3;
    getDepth?(): number;
    getMatrix3?(type): Matrix3;
    getMatrix4?(order?): Matrix4;
    getParentPathChain?(): EntityObject[];
    getRawBox2?(type): Vector2[];
    getRawBox3?(): Box3;
    getRawBox3Points?(): Vector3[];
    getRoot?(stopCondition?): EntityObject;
    getScaledSize?(): Vector3;
    hide?(): AssemblyEntityObject;
    initDomainContext?(): {
        isNeedRecord: boolean;
    };
    isRoot?(): boolean;
    lock?(): AssemblyEntityObject;
    propertyGet?(key, config, hasInitializer?, defaultValue?): any;
    propertySet?(key, v, config): void;
    removeChild?(child): AssemblyEntityObject;
    removeChildren?(children?): AssemblyEntityObject;
    runReactivePipeLine?(): void;
    setClickable?(clickable): AssemblyEntityObject;
    setDraggable?(draggable): AssemblyEntityObject;
    setHoverable?(hoverable): AssemblyEntityObject;
    setInteractive?(interactive): AssemblyEntityObject;
    setMatrix4?(value): AssemblyEntityObject;
    setMeshes?(value): AssemblyEntityObject;
    setName?(name): AssemblyEntityObject;
    setPinchable?(pinchable): AssemblyEntityObject;
    setPosition?(position): AssemblyEntityObject;
    setPressable?(pressable): AssemblyEntityObject;
    setRenderOrder?(renderOrder): AssemblyEntityObject;
    setRotatable?(rotatable): AssemblyEntityObject;
    setRotation?(rotation): AssemblyEntityObject;
    setScale?(scale): AssemblyEntityObject;
    setSize?(size): AssemblyEntityObject;
    show?(): AssemblyEntityObject;
    traverse?(callback): AssemblyEntityObject;
    unlock?(): AssemblyEntityObject;
}

Type declaration

  • Optional $$turboxProperties?: { id?: string | undefined; name?: string | undefined; position?: Vector3 | undefined; rotation?: Vector3 | undefined; scale?: Vector3 | undefined; size?: Vector3 | undefined; ... 80 more ...; $update?: (<K extends never>(obj: {} | Pick<...>, actionName?: string | undefined, displayName?: string | undefined, forceSav...
  • box2Front: undefined | Vector2[]
  • box2FrontAABBWCS: undefined | Vector2[]
  • box2FrontWCS: undefined | Vector2[]
  • box2Left: undefined | Vector2[]
  • box2LeftAABBWCS: undefined | Vector2[]
  • box2LeftWCS: undefined | Vector2[]
  • box2Top: undefined | Vector2[]
  • box2TopAABBWCS: undefined | Vector2[]
  • box2TopWCS: undefined | Vector2[]
  • box3: undefined | Vector3[]
  • box3AABB: undefined | Vector3[]
  • box3AABBWCS: undefined | Vector3[]
  • box3WCS: undefined | Vector3[]
  • Optional children?: Set<EntityObject>

    模型子节点

  • concatenatedMatrix: undefined | Matrix4
  • Optional hidden?: boolean

    是否隐藏

  • Optional id?: string
  • Optional isClickable?: boolean

    是否可被点击

  • Optional isDraggable?: boolean

    是否可被拖拽

  • Optional isHoverable?: boolean

    是否可被 hover

  • Optional isPinchable?: boolean

    是否可被捏合(移动端)

  • Optional isPressable?: boolean

    是否可被按压(移动端)

  • Optional isRotatable?: boolean

    是否可被旋转(移动端)

  • Optional locked?: boolean

    是否锁定

  • matrix3Front: undefined | Matrix3
  • matrix3Left: undefined | Matrix3
  • matrix3Top: undefined | Matrix3
  • matrix4: undefined | Matrix4
  • Optional meshes?: MeshModel[]

    对应的模型网格

  • Optional name?: string

    模型名称

  • Optional parent?: EntityObject

    模型父节点

  • Optional position?: Vector3

    模型位置

  • Optional renderOrder?: number

    渲染顺序

  • Optional rotation?: Vector3

    模型旋转角度(注意不是弧度)

  • Optional scale?: Vector3

    模型缩放

  • scaledSize: undefined | Vector3
  • Optional size?: Vector3

    模型尺寸

  • $update?:function
    • the syntax sweet of updating state out of mutation

      Type Parameters

      • K extends never

      Parameters

      • obj: {} | Pick<{}, K>
      • Optional actionName: string
      • Optional displayName: string
      • Optional forceSaveHistory: boolean
      • Optional isNeedRecord: boolean
      • Optional immediately: boolean

      Returns void

  • addChild?:function
  • addChildren?:function
  • clockwisePoints?:function
    • 把无序的点排序成顺逆时针,只支持凸多边形

      Parameters

      • points: Vector2[]
      • Optional clockwise: boolean

      Returns Vector2[]

  • computedPropertyGet?:function
    • Type Parameters

      • T

      Parameters

      • key: string
      • Optional options: ComputedOption
      • Optional descriptor: PropertyDescriptor

      Returns T

  • computedPropertySet?:function
    • Type Parameters

      • T

      Parameters

      • key: string
      • original: any

      Returns void

  • disposeReactivePipeLine?:function
    • 销毁所有响应式任务管线

      Returns void

  • getBox2?:function
    • Parameters

      • type: EPerspectiveType
      • Optional useWCS: boolean

      Returns Vector2[]

  • getBox2AABB?:function
    • Parameters

      • type: EPerspectiveType
      • Optional useWCS: boolean

      Returns Vector2[]

  • getBox3?:function
    • Parameters

      • Optional matrix4: Matrix4
      • Optional useWCS: boolean

      Returns Vector3[]

  • getBox3AABB?:function
    • Parameters

      • Optional matrix4: Matrix4
      • Optional useWCS: boolean

      Returns Vector3[]

  • getConcatenatedMatrix?:function
    • Returns Matrix4

  • getConcatenatedMatrix3?:function
    • Parameters

      • type: EPerspectiveType

      Returns Matrix3

  • getDepth?:function
    • 获取模型节点深度

      Returns number

  • getMatrix3?:function
    • Parameters

      • type: EPerspectiveType

      Returns Matrix3

  • getMatrix4?:function
    • Parameters

      • Optional order: string

      Returns Matrix4

  • getParentPathChain?:function
    • 获取该模型与其祖先节点的路径链(从祖先节点到当前模型的顺序)

      Returns EntityObject[]

  • getRawBox2?:function
    • Parameters

      • type: EPerspectiveType

      Returns Vector2[]

  • getRawBox3?:function
    • 初始建模包围盒,默认建模原点为几何中心,如需修改请重写该方法

      Returns Box3

      Breaking Change

      之前建模原点默认为左后下,现在默认为几何中心(更便于做计算)

  • getRawBox3Points?:function
    • Returns Vector3[]

  • getRoot?:function
    • 获取该模型的顶层模型

      Parameters

      • Optional stopCondition: ((currentNode) => boolean)

        停止查找的条件函数,返回 true 就停下查找

          • (currentNode): boolean
          • Parameters

            Returns boolean

      Returns EntityObject

  • getScaledSize?:function
    • Returns Vector3

  • hide?:function
  • initDomainContext?:function
    • Returns {
          isNeedRecord: boolean;
      }

      • isNeedRecord: boolean
  • isRoot?:function
    • 是否是顶层模型

      Returns boolean

  • lock?:function
  • propertyGet?:function
    • Parameters

      • key: string
      • config: ReactorConfig
      • Optional hasInitializer: boolean
      • Optional defaultValue: any

      Returns any

  • propertySet?:function
    • Parameters

      • key: string
      • v: any
      • config: ReactorConfig

      Returns void

  • removeChild?:function
  • removeChildren?:function
  • runReactivePipeLine?:function
    • 启动响应式任务管线

      Returns void

  • setClickable?:function
  • setDraggable?:function
  • setHoverable?:function
  • setInteractive?:function
  • setMatrix4?:function
  • setMeshes?:function
  • setName?:function
  • setPinchable?:function
  • setPosition?:function
    • Parameters

      • position: {
            x?: number;
            y?: number;
            z?: number;
        }
        • Optional x?: number
        • Optional y?: number
        • Optional z?: number

      Returns AssemblyEntityObject

  • setPressable?:function
  • setRenderOrder?:function
  • setRotatable?:function
  • setRotation?:function
    • Parameters

      • rotation: {
            x?: number;
            y?: number;
            z?: number;
        }
        • Optional x?: number
        • Optional y?: number
        • Optional z?: number

      Returns AssemblyEntityObject

  • setScale?:function
    • Parameters

      • scale: {
            x?: number;
            y?: number;
            z?: number;
        }
        • Optional x?: number
        • Optional y?: number
        • Optional z?: number

      Returns AssemblyEntityObject

  • setSize?:function
    • Parameters

      • size: {
            x?: number;
            y?: number;
            z?: number;
        }
        • Optional x?: number
        • Optional y?: number
        • Optional z?: number

      Returns AssemblyEntityObject

  • show?:function
  • traverse?:function
    • 遍历

      Parameters

      • callback: ((current) => boolean | void)

        遍历的处理逻辑函数,返回值是布尔值,如果是 true,则会停止当前遍历到的节点继续往下遍历

          • (current): boolean | void
          • Parameters

            Returns boolean | void

      Returns AssemblyEntityObject

  • unlock?:function
children: Set<EntityObject>

模型子节点

hidden: boolean

是否隐藏

id: string
isClickable: boolean

是否可被点击

isDraggable: boolean

是否可被拖拽

isHoverable: boolean

是否可被 hover

isPinchable: boolean

是否可被捏合(移动端)

isPressable: boolean

是否可被按压(移动端)

isRotatable: boolean

是否可被旋转(移动端)

locked: boolean

是否锁定

meshes: MeshModel[]

对应的模型网格

name: string

模型名称

parent?: EntityObject

模型父节点

position: Vector3

模型位置

reactivePipeLine: {
    func: Function;
    options?: {
        deps?: Function[];
        immediately?: boolean;
        name?: string;
    };
}[]

响应式的任务管线

Type declaration

  • func: Function
  • Optional options?: {
        deps?: Function[];
        immediately?: boolean;
        name?: string;
    }
    • Optional deps?: Function[]
    • Optional immediately?: boolean
    • Optional name?: string
renderOrder: number

渲染顺序

rotation: Vector3

模型旋转角度(注意不是弧度)

scale: Vector3

模型缩放

size: Vector3

模型尺寸

EPerspectiveType: typeof EPerspectiveType

Accessors

  • get box2Front(): Vector2[]
  • top 3---------2 | | |left |right | | 0---------1 bottom 正视/立面的紧贴包围盒点集合,忽略 x、y 轴旋转

    Returns Vector2[]

  • get box2FrontAABBWCS(): Vector2[]
  • 基于世界坐标系的正视/立面的 AABB 包围盒点集合,忽略 x、y 轴旋转

    Returns Vector2[]

  • get box2FrontWCS(): Vector2[]
  • 基于世界坐标系的正视/立面的紧贴包围盒点集合,忽略 x、y 轴旋转

    Returns Vector2[]

  • get box2Left(): Vector2[]
  • top 3---------2 | | |left |right | | 0---------1 bottom 左视的紧贴包围盒点集合,忽略 y、z 轴旋转

    Returns Vector2[]

  • get box2LeftAABBWCS(): Vector2[]
  • 基于世界坐标系的左视的 AABB 包围盒点集合,忽略 y、z 轴旋转

    Returns Vector2[]

  • get box2LeftWCS(): Vector2[]
  • 基于世界坐标系的左视的紧贴包围盒点集合,忽略 y、z 轴旋转

    Returns Vector2[]

  • get box2Top(): Vector2[]
  • back 0---------3 | | |left |right | | 1---------2 front 顶视的紧贴包围盒点集合,忽略 x、z 轴旋转

    Returns Vector2[]

  • get box2TopAABBWCS(): Vector2[]
  • 基于世界坐标系的顶视的 AABB 包围盒点集合,忽略 x、z 轴旋转

    Returns Vector2[]

  • get box2TopWCS(): Vector2[]
  • 基于世界坐标系的顶视的紧贴包围盒点集合,忽略 x、z 轴旋转

    Returns Vector2[]

  • get box3(): Vector3[]
  • 7-----------6 / . / | / . / | 4-----------5 | | . | | | . | | | 0.......|...3 | . | / | . | / 1-----------2 三维的紧贴包围盒点集合

    Returns Vector3[]

  • get box3AABB(): Vector3[]
  • 三维的 AABB 包围盒点集合

    Returns Vector3[]

  • get box3AABBWCS(): Vector3[]
  • 基于世界坐标系的三维的 AABB 包围盒点集合

    Returns Vector3[]

  • get box3WCS(): Vector3[]
  • 基于世界坐标系的三维的紧贴包围盒点集合

    Returns Vector3[]

  • get concatenatedMatrix(): Matrix4
  • 相对于世界坐标系的矩阵

    Returns Matrix4

  • get matrix3Front(): Matrix3
  • 3x3 entity 正视/立面矩阵

    Returns Matrix3

  • get matrix3Left(): Matrix3
  • 3x3 entity 左视矩阵

    Returns Matrix3

  • get matrix3Top(): Matrix3
  • 3x3 entity 顶视矩阵

    Returns Matrix3

  • get matrix4(): Matrix4
  • 4x4 entity 矩阵

    Returns Matrix4

  • get scaledSize(): Vector3
  • 缩放过的尺寸

    Returns Vector3

Methods

  • the syntax sweet of updating state out of mutation

    Type Parameters

    • K extends never

    Parameters

    • obj: {} | Pick<{}, K>
    • Optional actionName: string
    • Optional displayName: string
    • Optional forceSaveHistory: boolean
    • Optional isNeedRecord: boolean
    • Optional immediately: boolean

    Returns void

  • 把无序的点排序成顺逆时针,只支持凸多边形

    Parameters

    • points: Vector2[]
    • Optional clockwise: boolean

    Returns Vector2[]

  • Type Parameters

    • T

    Parameters

    • key: string
    • Optional options: ComputedOption
    • Optional descriptor: PropertyDescriptor

    Returns T

  • Type Parameters

    • T

    Parameters

    • key: string
    • original: any

    Returns void

  • 销毁所有响应式任务管线

    Returns void

  • Parameters

    • type: EPerspectiveType
    • Optional useWCS: boolean

    Returns Vector2[]

  • Parameters

    • type: EPerspectiveType
    • Optional useWCS: boolean

    Returns Vector2[]

  • Parameters

    • Optional matrix4: Matrix4
    • Optional useWCS: boolean

    Returns Vector3[]

  • Parameters

    • Optional matrix4: Matrix4
    • Optional useWCS: boolean

    Returns Vector3[]

  • 获取模型节点深度

    Returns number

  • Parameters

    • type: EPerspectiveType

    Returns Matrix3

  • Parameters

    • Optional order: string

    Returns Matrix4

  • Parameters

    • type: EPerspectiveType

    Returns Vector2[]

  • 初始建模包围盒,默认建模原点为几何中心,如需修改请重写该方法

    Returns Box3

    Breaking Change

    之前建模原点默认为左后下,现在默认为几何中心(更便于做计算)

  • 获取该模型的顶层模型

    Parameters

    • Optional stopCondition: ((currentNode) => boolean)

      停止查找的条件函数,返回 true 就停下查找

        • (currentNode): boolean
        • Parameters

          Returns boolean

    Returns EntityObject

  • Returns {
        isNeedRecord: boolean;
    }

    • isNeedRecord: boolean
  • 是否是顶层模型

    Returns boolean

  • Parameters

    • key: string
    • config: ReactorConfig
    • Optional hasInitializer: boolean
    • Optional defaultValue: any

    Returns any

  • Parameters

    • key: string
    • v: any
    • config: ReactorConfig

    Returns void

  • 启动响应式任务管线

    Returns void

  • Parameters

    • position: {
          x?: number;
          y?: number;
          z?: number;
      }
      • Optional x?: number
      • Optional y?: number
      • Optional z?: number

    Returns AssemblyEntityObject

  • Parameters

    • rotation: {
          x?: number;
          y?: number;
          z?: number;
      }
      • Optional x?: number
      • Optional y?: number
      • Optional z?: number

    Returns AssemblyEntityObject

  • Parameters

    • scale: {
          x?: number;
          y?: number;
          z?: number;
      }
      • Optional x?: number
      • Optional y?: number
      • Optional z?: number

    Returns AssemblyEntityObject

  • Parameters

    • size: {
          x?: number;
          y?: number;
          z?: number;
      }
      • Optional x?: number
      • Optional y?: number
      • Optional z?: number

    Returns AssemblyEntityObject

  • 遍历

    Parameters

    • callback: ((current) => boolean | void)

      遍历的处理逻辑函数,返回值是布尔值,如果是 true,则会停止当前遍历到的节点继续往下遍历

        • (current): boolean | void
        • Parameters

          Returns boolean | void

    Returns AssemblyEntityObject

Generated using TypeDoc