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

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

561. 动画实例在调用含有名字参数的时候获取不到边界 [ 63%]

...i].scaleY = 300/bounds.height; this.playerUnit[i].pos(200,400); Laya.stage.addChild(this.playerUnit[i]); } this.playerUnitReady+=1; } enemyUnitLoaded(){ for(let i in this.enemyUnit){ Laya.Animation.createFrames(this.aniUrls("stand",4),"enemy"+i+"stand") this.enemyUnit[i...

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

562. unity导出的场景.ls加载到laya3d中报错 [ 63%]

...景 var scene = Laya.Scene.load("LayaScene_unity1/unity1.ls"); Laya.stage.addChild(scene); //创建摄像机(横纵比,近距裁剪,远距裁剪) var camera= new Laya.Camera( 0, 0.1, 1000); //加载到场景 scene.addChild(camera); //移动摄像机位置 camera.transform.position=new Laya.Vecto...

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

563. 帮忙看看Texture类getPixels内存泄漏的问题[ 63%]

...>> 1); _colorSpr.size(_colorTex.width, _colorTex.height); Laya.stage.addChild(_colorSpr); _initPixelCount = getPixel(_colorTex); addEvent(); } private function addEvent():void { _colorSpr.on(Event.MOUSE_MOVE, this, __moveHandler); } private function __moveHandler():void { var p:Point = toLocal...

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

564. LayaNative 是不是不支持3D啊 [ 63%]

... 01-29 14:08:22.509 12064-12079/? E/LayaBox: JCSceneCmdDispath::_rendercmd_addChild error can't find the node3d id=-1 01-29 14:08:22.509 12064-12079/? E/LayaBox: JCSceneCmdDispath::_rendercmd_addChild error can't find the node3d id=-1 01-29 14:08:22.599 12064-12104/? I/LayaBox: alert=http://stand.al...

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

565. Animation创建和销毁的问题 [ 63%]

... Animation(); testAnim1.loadAnimation("res/fish_1/fish_1.ani"); Laya.stage.addChild(testAnim1); testAnim1.play(0,true,"stand_" + 0); testAnim1.pos(500, 300); //------------------------------------------------------------------------------ testAnim2 = new Animation(); testAnim2.loadAnimation("res/fis...

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

566. 为何发生此类报错Uncaught TypeError: Cannot read property '_tf' of null [ 63%]

...esArray.length; function onLoaded() { console.log("进度条"); Laya.stage.addChild(fairygui.GRoot.inst.displayObject); fairygui.UIPackage.addPackage("res/Public"); var ProgressBarPage=fairygui.UIPackage.createObject("Public","ProgressPage").asCom; fairygui.GRoot.inst.addChild(ProgressBarPage);  va...

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

567. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 63%]

...Sprite = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); } } new LayaUISample; ``` 通过data来当做url传递给loadImage这个方法引擎就会帮我们加载并解码显示出来。loadImage这个方法中的参数不仅仅有接收地址的url还接收base64和s...

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

568. 图片遮罩大小跟设置不一致 [ 63%]

...howApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("https://s2.d2scdn.com/2017/12/ ... ot%3B, Handler.create(this, function() { var t = Laya.loader.getRes("https://s2.d...

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

569. 加载prefab的代码编译失败,提示“Property 'transform' does not exist on type 'Node'” [ 63%]

...(sp)             {                 var layaMonkey2  = scene.addChild(sp);                 layaMonkey2.transform.localScale = new Laya.Vector3(4, 4, 4);                 layaMonkey2.transform.translate(new Laya.Vector3(-10, 13, 0));             })); 但是编译时...

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

570. 动画层级问题 [ 62%]

...的链接 提交 1 个回复 Laya_Aaron 赞同来自: 这个层级是根据addchild 的先后顺序决定的,如果需要改显示层级 需要改zorder。 2018-02-11 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 q1402907210 你猜猜...

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