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

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

51. 微信资源加载问题 [ 67%]

...ad(resArr, Laya.Handler.create(null, function () { var a = new Laya.Image('comp/bg.png') Laya.stage.addChild(a) }), Laya.Handler.create(null, function (value) { console.log('加载进度:' + value) }, null, false)) 项目是微信小游戏 基本就是laya默认的2d微信小游戏里子 我就试...

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

52. 发布之后报错,跨域问题 [ 66%]

... file:///Users/dongxiang/Documents/saolei/release/layaweb/v1.0.0/res/atlas/comp.atlas: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. Access to Image at 'file:///Users/dongxiang/Documents/saolei/release/layaweb/v1.0.0/comp/classic_numbers_...

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

53. IOs使用手动删除本地资源再次进去加载问题 [ 65%]

...l, onLoaded)); } function onLoaded() { var res_array = [ {url : "res/atlas/comp.atlas", type : Laya.Loader.ATLAS}, ] Laya.loader.load(res_array, Handler.create(null, onLoaded2)); } function onLoaded2() { Laya.stage.addChild(new TestUI()); }当用这种方式分步加载资源的时候 就会出现...

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

54. 为什么hitTestPoint始终是false? [ 64%]

...ya.Sprite(); constructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console.log(this.s.hitTestPoint(e.stageX, e.stageY)); } } 很简单的...

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

55. 在2.0里如何调用在编辑模式下创建的对话框 [ 63%]

...g", "isOpen":true, "isDirectory":true, "isAniNode":true, "hasChild":true, "compId":1, "child":[ { "x":15, "type":"Image", "props":{"y":0,"x":0,"width":640,"skin":"comp/img_bg.png","sizeGrid":"25,5,5,5","height":480}, "nodeParent":1, "label":"Image", "isDirectory":false, "isAniNode":true, "hasChild":...

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

56. viewStack不生效 [ 62%]

...生效 layacmd现在最新的版本publish的时候mode设置不生效? comp下的button.png第一次点击进入另一个界面,再在这个界面下点击时点击事件不生效? 2.3拖尾AlignMent不生效,拖尾折叠 LayaNative 2.8.0 加载的TTF字体不生效,附复现工程。 设...

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

57. LayaBox HelloWorld实战 [ 62%]

....Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('comp/button.png'); button.label='Hello World!'; button.name = Laya.Dialog.CLOSE; button.width=260; button.height=500; button.pos(35, 35); dialog.addChild...

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

58. 给图片节点添加新创建的图片,会报这个错:node._setParent is not a function [ 62%]

...+) { let iNum = Math.round(Math.random() * this.intMaxLove); let imgSrc = "comp/heart"+iNum+".png"; let imgLove = new Image(imgSrc); console.log("imgLove ==="+imgLove); console.log("imgSrc === "+ imgSrc); //imgLove.pos(iRows*this._x + 120 , iColumns*this._y + 320); this.imageBg.addChild(imgLove); } ...

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

59. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 62%]

... ```JavaScript var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = functi...

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

60. 添加fairygui使用fairygui.UIPackage.addPackage ( "res/Bag" )后可以正常跑,发布到微信小游戏出错 [ 61%]

...擎需要的资源             //Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded));              Laya.loader.load             (                 [                     { url: "res/atlas/comp.atlas" , type: ...

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