• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 282 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0098 秒)

271. 2D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 41%]

... 下例绘制10000个文本(根据电脑性能而定,本例为10000): class Test { private text:Laya.Text; constructor() { Laya.init(550,400,Laya.WebGL); Laya.Stat.show(); var textBox=new Laya.Sprite(); for(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).t...

来源: Laya3.0_文档 发布时间: 20251010

272. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 41%]

...his); this.init(); } //RunGame 是一个显示对象 继承此 Sprite Laya.class(RunGame,"RunGame", laya.display.Sprite); //定义RunGame的prototype var _proto = RunGame.prototype; //初始化 _proto.init = function(){ console.log('RunGame Init'); } })(); 此处我们要说一下  Laya.class(RunGa...

来源: Laya_社区 发布时间: 20160722

273. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 40%]

...码 /** * Based upon https://github.com/bgrins/javascript-astar */ export class AStarFindPath { private terrainSprite: MeshTerrainSprite3D; private layaMonkey: Sprite3D; private path: Vector3[]; private _everyPath: any[]; private _position: Vector3 = new Vector3(0, 0, 0); private _upVector3: Vector3...

来源: Laya3.0_文档 发布时间: 20230303

274. 3D物理系统 · LayaAir3.4 · 引擎文档 · LAYABOX [ 37%]

...代码如下: /** * TypeScript语言的3D脚本示例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D), ...

来源: Laya3.0_文档 发布时间: 20251010

275. UI-RefreshList [ 36%]

...ya.Text; Point = Laya.Point; Tween = Laya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** ...

来源: Laya2.0_示例 发布时间: 20260303

276. 一篇上手LayaAir的3D物理引擎(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 34%]

... ```typescript /** * TypeScript语言的3D脚本示例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } ``` > 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D)...

来源: Laya2.0_文档 发布时间: 20210715

277. 使用3D摄像机 · LayaAir3.4 · 引擎文档 · LAYABOX [ 31%]

...的移动,摄像机的位置也同步移动,代码如下: const { regClass, property } = Laya; @regClass() export default class CameraControll extends Laya.Script { @property( { type: Laya.Sprite3D } ) public target: Laya.Sprite3D; private camera: Laya.Camera; public distanceUp: number = 0.5;/...

来源: Laya3.0_文档 发布时间: 20251010

278. 自定义shader-地形shader [ 30%]

...HTMAP = customTerrainCompile3D.registerMaterialDefine("CUSTOM_LIGHTMAP"); }class Shader_Terrain { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); this.initShader(); var scene: Laya.Scene = Laya.s...

来源: Laya_示例 发布时间: 20260303

279. 缓存工具-layadcc · LayaAir3.4 · 引擎文档 · LAYABOX [ 27%]

...box/layadcc2.git 分支:dccplugin LayaDCCClient的接口定义: export class LayaDCCClient{ onlyTransUrl:boolean; //映射到dcc目录的地址头,如果没有,则按照http://*/算,所有的请求都裁掉主机地址 pathMapToDCC:string; /** * * @param frw 文件访问接口,不同的...

来源: Laya3.0_文档 发布时间: 20251010

280. 使用3D精灵 · LayaAir3.4 · 引擎文档 · LAYABOX [ 27%]

...机添加了这个脚本。 (图6-2) 脚本的代码为: const { regClass, property } = Laya; @regClass() export class CameraMoveScript extends Laya.Script3D { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: num...

来源: Laya3.0_文档 发布时间: 20251010