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

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

1. 寻路系统(JavaScript-3D基础(JS)-LayaAir3D之高级应用) [ 100%]

.../scene/TerrainScene/Assets/HeightMap.png"); //初始化MeshTerrainSprite3D this.terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMesh as Mesh, heightMap, 6.574996471405029, 10.000000953674316); //更新terrainSprite世界矩阵(为可行走区域世界矩...

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

2. 寻路系统(TypeScript-3D基础(TS)-LayaAir3D之高级应用) [ 99%]

.../scene/TerrainScene/Assets/HeightMap.png"); //初始化MeshTerrainSprite3D this.terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMesh as Mesh, heightMap, 6.574996471405029, 10.000000953674316); //更新terrainSprite世界矩阵(为可行走区域世界矩...

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

3. 设置滤镜(TypeScript-LayaAir基础篇(TS)-位图) [ 96%]

...ge.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(this.ApePath, Handler.create(this, this.setup)); } private setup(): void { this.normalizeApe(); this.makeRedApe(); this.grayingApe(); } private normalizeApe(): void { var originalApe: Sprite = this.createApe(); this.apeTextur...

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

4. 多点触控的使用(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 95%]

...ypescript //重写脚本中的onUpdate方法 onUpdate() { var touchCount = this._scene.input.touchCount(); if (1 === touchCount){ //判断是否为两指触控,撤去一根手指后引发的touchCount===1 if (this.isTwoTouch){ return; } this._text.text = "触控点为1"; //获取当前的触控点...

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

5. 多点触控的使用(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 95%]

...ypescript //重写脚本中的onUpdate方法 onUpdate() { var touchCount = this._scene.input.touchCount(); if (1 === touchCount){ //判断是否为两指触控,撤去一根手指后引发的touchCount===1 if (this.isTwoTouch){ return; } this._text.text = "触控点为1"; //获取当前的触控点...

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

6. 骨骼动画进阶(TypeScript-2D进阶篇(TS)-动画进阶) [ 93%]

...ructor() { Laya.WebGL.enable(); Laya.init(1000, 900); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); this.templet.loadAni("res/spine/goblins/goblins.sk"); } onError() { con...

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

7. WebSocket发送与接收数据(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 93%]

...e; public function Game() { //初始化引擎 Laya.init(600, 400,WebGL);// this.byte = new Byte(); this.byte.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket = new Socket(); this.socket.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket.connectByUrl("ws://loca...

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

8. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 92%]

...", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window...

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

9. 物理系统之FixedConstraint(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 92%]

...刚体 ```typescript //创建盒型MeshSprite3D var box: MeshSprite3D = (this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(1, 1, 1)))); //设置材质 var transform: Transform3D = box.transform; var pos: Vector3 = transform.position; pos.setValue(0, 5, 0); transform.position = pos; //创...

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

10. 物理系统之FixedConstraint(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 92%]

...刚体 ```typescript //创建盒型MeshSprite3D var box: MeshSprite3D = (this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(1, 1, 1)))); //设置材质 var transform: Transform3D = box.transform; var pos: Vector3 = transform.position; pos.setValue(0, 5, 0); transform.position = pos; //创...

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