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

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

591. 求助高手请进,关于场景导入的问题~ [ 81%]

...载出来了Laya.loader.create("LayaScene_01/loveScene.ls",Handler.create(this,this.completeHandler)); private function completeHandler():void{     var scene:Scene = Laya.loader.getRes("LayaScene_01/loveScene.ls");     Laya.stage.addChild(scene); }   我现在的问题是,我创建一个继...

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

592. 官方视频教程中飞机大战 "this.addChild is not a function" [ 81%]

官方视频教程中飞机大战 "this.addChild is not a function" IDE Layabox1.7.20.2 beta 版 src/Game.js//var WebGL = laya.webgl.WebGL; //Laya.init(480, 852, WebGL); var Game = (function(){ (function Game(){ Laya.init(480,852); this.bg = BackGround(); Laya.stage.addChild(this.bg); })(); })(); s...

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

593. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 81%]

...olor = "#fff"; Laya.loader.load("assets/images/color1.png", Handler.create(this, __loadImageHandler)); } private function __loadImageHandler():void { _colorSpr = new Sprite(); _colorTex = Laya.loader.getRes("assets/images/color1.png"); _colorSpr.graphics.drawTexture(_colorTex); _colorSpr.cacheAs = "...

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

594. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 81%]

...  __proto.getTileProperties=function(index,id,name){         if (this._tileProperties[index] && this._tileProperties[index][id]){             return this._tileProperties[index][id][name];         }         return null;     }     import { ui } from ...

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

595. 在Unity中设置动画事件(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 81%]

...件函数,名字是可以对应上的 ShowMsg(){ console.log("ShowMsg"); this.showMsgFunc && this.showMsgFunc(); } } ``` 在加载好场景之后,我们将我们创建的这个脚本添加给cube。 ```typescript //加载场景 Laya.Scene3D.load("res/threeDimen/scene/LayaScene_AnimationEvent/Con...

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

596. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 81%]

...yaMonkey/LayaMonkey.lh"]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //记载场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //加载相机 var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector...

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

597. laya中js 如何实现Sprite类继承 [ 81%]

...决方法 主文件:a.js    组件文件:Role.js a.js文件代码: this.Role = new Role(); this.RoleMap = new Laya.Sprite(); this.RoleMap.size(Laya.stage.width, Laya.stage.height/2); Laya.stage.addChild(this.RoleMap); this.RoleMap.addChild(this.Role); this.Role.pivot(16,24);// 图片32x48 th...

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

598. 摄像机不在原点的时候3D空间转2D空间会失效? [ 81%]

...3D空间转2D空间”实现了一下3D坐标转2D坐标,过程如下: this.point.elements[0] = Laya.stage.mouseX; this.point.elements[1] = Laya.stage.mouseY; this.camera.viewportPointToRay(this.point, this.ray); Laya.Physics.rayCast(this.ray, this._outHitInfo) 然后: this.camera.viewport.pro...

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

599. addchild后,怎么去引用? [ 81%]

...引用,应该怎么去引用呢? 代码如下:listP是一个UI页面. 用this.lost1,空对象,但是用this._childs[5]是可以的 var lose1=new Laya.Animation(); lose1.loadAnimation("lose_1.ani"); lose1.x=150; lose1.y=400; lose1.size(100,300); lose1.on(Laya.Event.CLICK,this.listP,this.play1); lose1...

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

600. GlowFilter和TimeLine/Tween一起用的问题 [ 81%]

..., {blur: 1}, 200, null, 0);         }         t.on(Event.COMPLETE, this, function(){             sp.filters = null;         });         t.play(0, true);     };   (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebG...

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