UNPKG

@glowjs/core

Version:

GlowJS数字孪生引擎核心库。

105 lines (104 loc) 2.28 kB
import { EventDispatcher } from '../event/EventDispatcher'; import { AdvancedDynamicTexture } from '../runtime'; import { BillboardOptions } from './BillboardOptions'; import { Point3D } from '../misc'; /** * 广告牌 */ export declare class Billboard extends EventDispatcher { /** * 2D广告牌根 */ static _root2d: AdvancedDynamicTexture | null; private _data; /** * 锚点 */ private _anchor; /** * 根 */ private _root; /** * 容器 */ private _container; /** * 上一次点击的时间点,用于计算双击事件 */ private _lastClickTime; /** * 提示信息 */ tip: string; /** * 初始化2D广告牌根 */ static _init2DRoot(): void; private _canvas; /** * 实例化一个广告牌对象 * @param type 类型 * @param options 选项 */ constructor(type: '2D' | '3D', options: BillboardOptions); private _onResize; /** * 获取类型 */ get type(): '2D' | '3D'; /** * 获取或设置渲染顺序(仅3D有效) */ get renderOrder(): number; set renderOrder(value: number); /** * 获取或设置是否响应鼠标指针事件,默认true */ get isPointerBlocker(): boolean; set isPointerBlocker(value: boolean); /** * 获取或设置位置(世界坐标) */ get position(): Point3D; set position(value: Point3D); /** * 获取或设置旋转 */ get rotation(): number; set rotation(value: number); /** * 获取或设置可见性 */ get visable(): boolean; set visable(value: boolean); /** * 获取或设置指针样式 */ get cursor(): string; set cursor(value: string); /** * 获取或设置数据 */ get data(): any; set data(value: any); /** * 设置颜色 * @param value 值 */ setColor(value: { [key: string]: string; }): void; private _observer; private _scale; private _direction; /** * 获取或设置是否开启缩放动画 */ get scaleAnimation(): boolean; set scaleAnimation(value: boolean); /** * 释放 */ dispose(): void; }