大约有 18 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0050 秒)
...Sprite3D都有静态或者动态的两种状态,当一个物体标记为static后,就确保这个物体在游戏场景中为静态的、不会移动的物体,进而在游戏的运行过程中让游戏有更加流畅的运行体验。一般而言,在场景中完全静止的物体标记成stat...
来源: Laya3.0_文档 发布时间: 20251010
...具类,方便转换使用: //Tool工具类 export class Tool { private static transVertex0: Laya.Vector3 = new Laya.Vector3(); private static transVertex1: Laya.Vector3 = new Laya.Vector3(); private static transVertex2: Laya.Vector3 = new Laya.Vector3(); private static corners: Laya.Vector3[] = ...
来源: Laya3.0_文档 发布时间: 20251010
...景列表,方便内存管理,本属性只读,请不要直接修改*/ static readonly unDestroyedScenes: Set<Scene> = new Set(); /**场景被关闭后,是否自动销毁(销毁节点和使用到的资源),默认为false*/ autoDestroyAtClosed: boolean = false; _scene3D: any; 场景...
来源: Laya3.0_文档 发布时间: 20251010
....2 降低渲染的GPU成本2.优化Draw Call3.GPU instance4.Dynamic Batch5.Static Batch6.Custom Static Batch(Static Batch Volume组件)7.基于节点的材质合批功能7.1表现效果7.2 使用示例3D性能优化 1.图形性能的基本认知 1.1 降低渲染的CPU成本 在渲染过程中,对C...
来源: Laya3.0_文档 发布时间: 20251010
...池。 * @param sign 对象类型标识字符。 * @return 对象池。 */ static getPoolBySign(sign: string): any[] { return Pool._poolDic[sign] || (Pool._poolDic[sign] = []); } Laya.Pool 是通过对象类型标识符,也就是一个字符串名字来标识和管理对象池的。如果对象池...
来源: Laya3.0_文档 发布时间: 20251010
...快捷指令即可。 示例代码如下: "scripts": { "pbjs": "pbjs -t static-module -w commonjs -o ./src/libs/protobuf/protobuf.js ./src/libs/protobuf/protobuf.proto", "pbts": "pbts -o ./src/libs/protobuf/protobuf.d.ts ./src/libs/protobuf/protobuf.js" }, 效果如图1-2所示: pbjs指令参数...
来源: Laya3.0_文档 发布时间: 20251010
...ENIED、Geolocation.POSITION_UNAVAILABLE和Geolocation.TIMEOUT之一。 */ static getCurrentPosition(onSuccess: Handler, onError: Handler = null): void { Geolocation.navigator.geolocation.getCurrentPosition(function (pos: any): void { Geolocation.position.setPosition(pos); onSuccess.runWith(Geolocat...
来源: Laya3.0_文档 发布时间: 20251010
...ass,不是Laya.regClass!! @IEditorEnv.regClass() class TestSceneScript { static visitNode() { fs.readFileSync(....) } } TestSceneScript.ts这个文件会在发布中被裁剪,因为它没有被Laya.Script直接引用。 2.2 UI进程脚本和Scene进程脚本通讯的方式 1、设置节点/组...
来源: Laya3.0_文档 发布时间: 20251010
...子特效的路径,创建一个粒子特效,从对象池里拿一个 static Create(path: string): Particle3D { var ret:Particle3D = Pool.getInstance().getItemByClass("Particle3D@" + path, Particle3D); ret.Init(path); return ret; } //粒子特效初始化 private Init(file_path:string): void { if...
来源: Laya3.0_文档 发布时间: 20251010
...子特效的路径,创建一个粒子特效,从对象池里拿一个 static Create(path: string): Particle3D { var ret:Particle3D = Pool.getInstance().getItemByClass("Particle3D@" + path, Particle3D); ret.Init(path); return ret; } //粒子特效初始化 private Init(file_path:string): void { if...
来源: Laya3.0_文档 发布时间: 20250104