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

大约有 2,310 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0057 秒)

721. 源码List的一次代码错误 [ 70%]

... * cellWidth, (this._isVertical ? startY : 0) * cellHeight); this._content.addChild(cacheBox); this._content.optimizeScrollRect = true; box = cacheBox; } else { [b] var arr = []; [/b] for (var i = this._cells.length - 1; i > -1; i--) { var item = this._cells[i]; item.removeSelf(); arr.push(item);...

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

722. 区块地图-等角地图 [ 70%]

...ite.graphics.drawLine(radiusX, radiusY, 0, radiusY * 2, color); Laya.stage.addChild(sprite); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import MapLayer = Laya.MapLayer; import TiledMap = Laya.TiledMap; import Point = Laya.Point; import Rectangle = Laya.Rectangle; im...

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

723. bitmap渲染问题 [ 70%]

...; bmd2.copyPixels(bmd1, rect, pt); var bm1:Bitmap = new Bitmap(bmd1); this.addChild(bm1); var bm2:Bitmap = new Bitmap(bmd2); this.addChild(bm2); bm2.x = 50; trace(rect.width); trace(rect.height); 输出正常,不知道你那边是如何写的?

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

724. Laya.loader.load 加载场景报错 [ 70%]

...e(this, function(){ this.scene = Laya.loader.getRes(模型url); Laya.stage.addChild(this.scene); }),null, null, 1, true, "scene1"); 执行后,浏览器报 : laya.core.js:13290 Uncaught TypeError: node._setParent is not a function at Stage.__proto.addChild (laya.core.js:13290) at Main.<anonymo...

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

725. 粒子会不会有内存泄漏? [ 70%]

...); function init() { // var gameManager = new GameManager(); // Laya.stage.addChild(gameManager); Laya.loader.load("res/parts/lizi2.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); } var i = 0; function onAssetsLoaded(settings) { var sp = new Particle2D(settings); sp.play(); sp.emitt...

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

726. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 70%]

...; sprite_.graphics.drawRect(100, 50, 200, 90); sprite_.graphics.endFill(); addChild(sprite_); 2017-04-14 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: package { import laya.display.Sprite...

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

727. 通过getChildByName找到的dialog节点使用show方法后, 再次getChildByName查找, 结果为null [ 70%]

...ll let dialog = new laya.ui.Dialog();  dialog.name = 'Dialog' parentNode.addChild(dialog);    let childNode = parentNode.getChildByName('Dialog'); childNode.show();   console.log(parentNode.getChildByName('Dialog'));  // 结果为null   2016-09-13 添加评论 免费帖 --> 分享 微博 QZON...

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

728. 不带格式后缀的图片无法成功加载 [ 70%]

...odee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y = 350 Laya.stage.addChild(nodee) }));上面这个图片无法正常显示,打印 texture 的宽是 undefined,如果是带后缀的图片,比如.jpg就可以正常展示图片。 附件 : --> ImageDemo.zip 2021-10-26 添加评论 免费...

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

729. StaticModel_MeshSample例子运行不起来 [ 70%]

...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

730. 文本对齐与自动换行(ActionScript-LayaAir基础篇(AS3)-文本) [ 70%]

...n = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } ``` ![5](img/5.png) 在实际编码中如果需要其他的对齐模式,请参考API中的align和valign的取值,找到适合项目的水平对齐模式和垂直对齐模式。 如果文本内容超...

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