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

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

31. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 80%]

...height); this.tMap.createMap("res/map/map.json",viewRect);  // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1) sp.zOrder = 1000;   请问这里如何把精灵添加到地图中? 看文档没看明白啊, 其他回答仿写都无效果. 2018-07-21 ...

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

32. Laya.Handler.create 加载图片回调参数问题 [ 79%]

...入口 Laya.init(Laya.Browser.width, Laya.Browser.height, Laya.WebGL); var sp = new Laya.Sprite(); Laya.stage.addChild(sp); sp.loadImage("res/img/popular.png", 0, 0, 0, 0, Laya.Handler.create(this, function (a1, a2) { console.log(a1, a2); }), [100]);   为什么不能把Laya.Hander.create后面带...

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

33. httpRequest send返回Request failed Status:0 [ 78%]

...初始化引擎 Laya.init(1136, 640); for (var i = 0; i < 4; i++) { var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(); var url = "http://thirdqq.qlogo.cn/g%3Fb% ... 3B%3B xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, 1]); xhr.once(Laya.Event.ERROR, this, this.errorHan...

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

34. 创建Laya.PolygonCollider后,页面不显示,导致其他碰撞体也不显示 [ 78%]

...ygonCollider后,页面不显示,导致其他碰撞体也不显示 this.sp = new Laya.Sprite();  let rb = this.sp.addComponent(Laya.RigidBody); let polygonCollider4 = this.sp.addComponent(Laya.PolygonCollider); polygonCollider4.points = "429,1094,433,1094,440,1094,442,1094,446,1094,448,1094,450,...

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

35. 两个问题 有元件支援视频流渲染吗? Image元件读不了资料流 [ 77%]

...方式来实现 2、你把整个base64码当成URL使用试下,譬如var sp:Sprite=new Sprite();sp.loadImage("base64码");Laya.Stage.addChild(sp); 2017-08-03 1 0 分享 微博 QZONE 微信 ckndim 赞同来自: zc051113 感谢 能正常运行了 2017-08-03 1 0 分享 微博 QZONE 微信 为什么...

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

36. Laya截图3D场景相关模型,导致模型透视! [ 77%]

...thographic = true; camera.orthographicVerticalSize = 5; this.effRes = Laya.Sprite3D.load(resUrl); this.effRes.on(Laya.Event.HIERARCHY_LOADED, this, function(){ this.eff1 = scene.addChild( Laya.Sprite3D.instantiate(this.effRes)); this.eff1.transform.position = new Laya.Vector3(0,0,50); this.eff1.tran...

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

37. IDE创建的UI 层级问题 [ 76%]

...在上层的 背景IMAGE   本想通过红色与黄色之间增加一个SP,用来作为角色层,导出发现UI编辑的层级并不会保存起来。 请教下 这种情况如何处理, 附件 : --> 2017-06-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

38. 如何实现类似AS3下的BitmapData.draw去截取区域图片? [ 76%]

...一张图片 2、通过TextureCreate创建package {     import laya.display.Sprite;     import laya.resource.Texture;     import laya.utils.Handler;     public class CupPhone     {         public function CupPhone()         {             Laya.init(550,400);    ...

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

39. getBounds()方法未定义是咋回事? [ 76%]

...nds()方法未定义是咋回事? 我想做个2D的碰撞检测,用 if(sp1.getBounds().intersects(sp2.getBounds())){ trace("发生碰撞了"); b=true; } 总是提示 "Cannot read property 'getBounds' of undefined" 是咋回事? 2018-01-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

40. 关于内存释放问题 [ 75%]

关于内存释放问题 var htmlCanvas: Laya.HTMLCanvas = sp.drawToCanvas(x,x, 0, 0);(sp是drawRect出来的精灵) var texture: Laya.Texture = new Laya.Texture(htmlCanvas); 使用这个函数,drawToCanvas越多占用的内存越多,用了clear 和clearRes和destroy都没有减少。有什...

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