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

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

171. Laya多点触控是有开关吗 为什么多点触控没有任何反应 [ 88%]

...e(){         //创建场景         let scene = Laya.stage.addChild(new Laya.Scene3D());         //创建相机         let camera = scene.addChild(new Laya.Camera(0, 0.1, 100));         //设置相机的名称         camera.name = "camera";     ...

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

172. 骨骼动画-多纹理 [ 88%]

....x = mStartX; mArmature.y = mStartY; mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.on(Event.STOPPED, this, completeHandler); play(); } function completeHandler() { play(); } function play() { mCurrIndex++; if (mCurrIndex >= mArmature.getAnimNum()) { mCurrIndex = 0; } mArmature...

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

173. rigidBody.applyForce 物体不会移动 [ 88%]

... Laya.Scene3D(); //将场景加到舞台上 this.scene = scene; Laya.stage.addChild(scene); //添加方向光 var directionlight: Laya.DirectionLight = scene.getChildByName( "Directional Light" ) as Laya.DirectionLight; this.directionlight = directionlight; //加入子層人物腳色到舞台 var li...

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

174. Sprite-显示图片 [ 88%]

...howApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.pn...

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

175. 用layaair如何加載蒙皮動畫,请问怎么加载.lm文件和.ani文件,有沒有實例可以看下 [ 88%]

...件,有沒有實例可以看下 代碼如下: this.scene = Laya.stage.addChild(new Laya.Scene()); //加载相机 this.camera = this.scene.addChild(new Laya.Camera()); this.scene.CurrentCamera = this.camera; //男角色 this.roleMan = new Laya.MeshSprite3D(Laya.Mesh.load("3d/man/CunMinNan-cunminn...

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

176. 滤镜-发光滤镜 [ 88%]

...ateApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter...

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

177. Sprite-旋转缩放 [ 88%]

...pe = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape.rotation += 2; //心跳缩放 scaleDelta += 0.02; var scaleVal...

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

178. UI-ColorPicker [ 88%]

...Handler = new Handler(this, this.onChangeColor, [colorPicker]); Laya.stage.addChild(colorPicker); this.onChangeColor(colorPicker); } onChangeColor(colorPicker) { console.log(colorPicker.selectedColor); } } new UI_ColorPicker();module laya { import Stage = Laya.Stage; import ColorPicker = Laya.ColorP...

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

179. 骨骼动画-藤蔓 [ 88%]

....x = mStartX; mArmature.y = mStartY; mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.on(Event.STOPPED, this, completeHandler); play(); } function completeHandler() { play(); } function play() { mCurrIndex++; if (mCurrIndex >= mArmature.getAnimNum()) { mCurrIndex = 0; } mArmature...

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

180. 骨骼动画-多纹理 [ 87%]

...装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); mArmature.scale(0.5, 0.5); mArmature.on(Laya.Event.STOPPED, this, this.completeHandler); this.play(); } completeHandler() { this.play(); } play() { mCurrIndex++; let aniNum...

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