@glowjs/core
Version:
GlowJS数字孪生引擎核心库。
143 lines (142 loc) • 3.34 kB
TypeScript
import { InstantiatedEntries, AbstractMesh } from '../runtime';
import { App } from '../core/App';
import { Entity } from './Entity';
import { Point3D } from '../misc/Point3D';
/**
* 物体
*/
export declare class Thing extends Entity {
/**
* 模型编号
*/
modelId: string;
/**
* 贴图编号
*/
textureId: string | null;
/**
* 背面剔除
*/
backFaceCulling: boolean | null;
/**
* 透明模式
*/
transparencyMode: number | null;
/**
* 节点材质ID
*/
materialId: string;
/**
* 科技风
*/
technologyWind: boolean;
/**
* 是否是电梯
*/
isElevator: boolean;
/**
* 雾效开关
*/
fogEnabled: boolean | null;
/**
* 辉光强度
*/
emissiveIntensity: number | null;
/**
* 扩展动画
*/
animationExtension: any | null;
/**
* 路径ID
*/
pathId: string | null;
/**
* 链接ID
*/
linkId: string | null;
/**
* 父物体计算包围盒时是否排除此物体
*/
excludeBoundingBox: boolean;
/**
* 图层。默认物体无图层,切换场景时会被创建。当设置了图层时,场景切换时不会被创建。需要手动调用createLayer()和destroyLayer()方法。
*/
layers: Set<number>;
/**
* 获取或设置自动动画循环索引
* @deprecated 已废弃,请使用新属性defaultAnimation
*/
get autoAnimationLoopIndex(): number;
set autoAnimationLoopIndex(value: number);
private _defaultAnimation;
/**
* 获取或设置默认动画
*/
get defaultAnimation(): {
index: number;
loop: boolean;
} | null;
set defaultAnimation(value: {
index: number;
loop: boolean;
} | null);
protected _entites: InstantiatedEntries;
/**
* 是否包含实例网格
*/
protected get _instanced(): boolean;
/**
* 根
*/
protected _root: AbstractMesh;
/**
* 颜色(与Entity冲突,待解决)
*/
protected __color: any;
/**
* 是否加载密集架列的格子(层位)
*/
private _loadArchiveGrid;
/**
* 实例化一个物体对象
* @param {App} app 应用
*/
constructor(app: App);
/**
* 获取实例类型
*/
get instanceClass(): any;
/**
* 获取模型原始尺寸
*/
get modelSize(): Point3D;
/**
* 序列化成JSON对象
*/
toJson(): any;
/**
* 从JSON对象反序列化(仅生成层级树)
* @param json JSON对象
*/
fromJson(json: any): void;
/**
* 创建(仅当前层级可见对象)
* @param {boolean} force 是否强制
*/
build(force?: boolean): Promise<void>;
private _scrollTween;
private _startScrollAnimation;
/**
* 拆毁(删掉网格,仅保留层级树)
*/
unbuild(): void;
/**
* 释放
*/
dispose(): void;
/**
* 设置共享透明度,影响所有同类物体
* @param alpha 透明度,取值范围0-1
*/
setSharedAlpha(alpha: number): void;
}