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

大约有 52 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0023 秒)

1. 加载-加载序列 [ 100%]

...res/apes/monkey2.png", Handler.create(this, onAssetLoaded), null, null, 0, false); Laya.loader.load("../../res/apes/monkey1.png", Handler.create(this, onAssetLoaded), null, null, 1, false); Laya.loader.load("../../res/apes/monkey0.png", Handler.create(this, onAssetLoaded), null, null, 2, false); })(...

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

2. 射线检测-选取物体 [ 99%]

...tor3(0, 2, 5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); camera.clearColor = null; //方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, -1); //...

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

3. Sprite3D-Sprite3D变换 [ 99%]

...r3(0, 0.5, 1)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); Laya.loader.create("../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Laya.Handler.create(this, onComplete)); function onComplete() { layaMonkey1 = scene.addChild(Laya.Sprite3D.load("../../res/threeDimen/skinM...

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

4. 加载-销毁Texture使用的图片资源 [ 98%]

...in = /** @class */ (function () { function GameMain() { this.isDestroyed = false; this.PathBg = "../../res/bg2.png"; this.PathFly = "../../res/fighter/fighter.atlas"; //初始化引擎 Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.ali...

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

5. Sprite3D-Sprite3D克隆 [ 95%]

...r3(0, 0.5, 1)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); Laya.loader.create("../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Laya.Handler.create(this, onComplete)); function onComplete() { var layaMonkey = scene.addChild(Laya.Sprite3D.load("../../res/threeDimen/sk...

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

6. 物理引擎-布 [ 93%]

... gameWorld, width: stageWidth, height: stageHeight, options: { wireframes: false } }); LayaRender.run(render); mouseConstraint = Matter.MouseConstraint.create(engine, { element: Render.canvas }); Matter.World.add(engine.world, mouseConstraint); render.mouse = mouseConstraint.mouse; } function initWo...

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

7. 材质-BlinnPhong-漫反射贴图 [ 93%]

...(0, 0.5, 1.5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.direction = new Laya.Vector3(0, -0.8, -1); directionLight.color = new Laya.Vector3(1, 1,...

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

8. 3D场景-地形场景 [ 92%]

...etChildByName('Scenes').getChildByName('HeightMap'); meshSprite3D.active = false; var meshSprite3D1 = scene.getChildByName('Scenes').getChildByName('Area'); meshSprite3D1.active = false; }); class TerrainScene { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; L...

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

9. Mesh网格-自定义网格 [ 91%]

...tor3(0, 2, 5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, -1); //平面 var plane = scene.addChild(new L...

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

10. 材质-BlinnPhong-反射贴图 [ 91%]

...(0, 1.3, 1.8)); camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false); camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.direction = new Laya.Vector3(0, -0.8, -1); directionLight.color = new Laya.Vector3(1, 1,...

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