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

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

531. timeline播放完成Bug [ 74%]

...= Laya.loader.getRes(monkey1Path); let ape = new Laya.Sprite(); Laya.stage.addChild(ape); ape.graphics.drawTexture(monkey, 0, 0); var tl = new Laya.TimeLine(); tl.once('complete', this, function() { ape.x = 0; tl.reset(); tl.to(ape, { x: 100 }, 1000); tl.play(); }); tl.to(ape, { x: 100 }, 1000); tl....

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

532. StaticModel_MeshSample例子运行不起来 [ 74%]

...NONE;         Laya.Stat.show();         var scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene;         var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera;         camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5));         camera.t...

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

533. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

... private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHandler(e: any = null): void { this.onLoaded(); } } 编译运行代码,效果如图3-3所示,说明地图已创建成功。 (图3-3) 3.3...

来源: Laya3.0_文档 发布时间: 20251010

534. 关于mouseThrough设计原理问题? [ 74%]

...Event.CLICK, null, function(e:Event):void{ trace("click a"); }) Laya.stage.addChild(a); var b:Sprite = new Sprite(); b.graphics.drawRect(0,0,200, 200, "#0000ff"); b.size(200, 200); b.pos(100, 100); b.mouseThrough = false; //b.on(Event.CLICK, null, function(e:Event):void{ trace("click b"); }); Laya.s...

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

535. 人物行走图动画 [ 74%]

...-1,2,可是在经过play后面自动变成1,还有经过Laya.stage.addChild(ani);后面自动+1,不大明白 ani.index 是从几开始的,还有他有什么作用   代码如下: Laya.init(800,600); var Animation = laya.display.Animation; var Stage     = laya.display.Stage; var Rec...

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

536. 请问下键盘事件的监听只能用stage么?其他对象监听不起作用,谢谢 [ 74%]

...使用 var sp = new Sprite(); sp.width = 720; sp.height = 1280 Laya.stage.addChild(sp) sp.on(laya.events.Event.KEY_DOWN, this, this.onkeyDown); 就不能监听到键盘事件呢,这是怎么回事呢? 2018-01-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

537. IDE创建动画调用问题 [ 74%]

...= new Laya.Animation(); light.loadAnimation("ani/thunder.ani"); Laya.stage.addChild(light); light.play(0, true); 用light.frames获取结果为null,不行 2017-08-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...

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

538. [LayaAir3]反馈一个文本合批的bug [ 74%]

...以看到一个红色的文本和一个灰色的文本let t1 = Laya.stage.addChild(new Laya.Label);t1.text = "aaaa";t1.color = "#ff0000";let t2 = Laya.stage.addChild(new Laya.Label);t2.text = "bbb";t2.color = "#ff0000";t2.y = 100;t2.disabled = true   步骤二:复制下面代码继续在浏览器...

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

539. graphics.drawlines异常 [ 74%]

... })();   function drawPentagram() { var canvas = new Sprite(); Laya.stage.addChild(canvas);   var path = [336, 515, 338, 515, 341, 515, 349, 515, 369, 513, 391, 513, 408, 513, 419, 515, 441, 519, 459, 521, 471, 524, 480, 524, 485, 524, 491, 524, 497, 524, 508, 524, 519, 524, 529, 524, 540, 536, 54...

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

540. List属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 74%]

...Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.Stage; var List = Laya.List; var Handler = Laya.Handler; var WebGL = Laya.WebGL;...

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