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

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

391. 关于创建Sprite获取大小 [ 62%]

...调。这个是异步获取,如果你要单个获取的话 window.Laya.loader.load(value.url, ls.Handler.create(this, function () { _this.graphics.clear() var texture = window.Laya.loader.getRes(value.url) _this.graphics.drawTexture(texture) _this.scaleX = _this.set_width / texture.sourceWidth _th...

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

392. 关于as版的Animation.createFrames()不能工作? [ 62%]

...ite; import laya.display.Stage; import laya.utils.Handler; import laya.net.Loader; import laya.events.Event; public class LayaUISample { protected var text:Text; protected var aaa:AAA; public function LayaUISample() { Laya.init(1540, 990); Laya.Stat.show(); Laya.loader.load("res/atlas/war.json", Lay...

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

393. 版本管理什么用 [ 62%]

...{ url: Laya.ResourceVersion.manifest["res/atlas/loading.json"], type: Laya.Loader.ATLAS },                 { url: Laya.ResourceVersion.manifest[utils.resourcesCenter.ResourcesPathStr.PROTO_FILE_PATH], type: Laya.Loader.TEXT },             ];  手动修改了JS代码!! 可以成功...

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

394. layaAir IDE UI导出显示异常 [ 62%]

...后缀格式造成的,而默认例子里面加载的是json格式的: Laya.loader.load("res/atlas/comp.json", Handler.create(this, onAssetLoaded), null, Loader.ATLAS);   所有导致了图集位置错乱,麻烦技术修下这个bug. 建议ui编辑器默认就导出成json格式大图~~   2017-11-1...

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

395. 输入设备-指南针 [ 62%]

...tage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); //...

来源: Laya2.0_示例 发布时间: 20251130

396. JS里面定义一个函数,无法使用Laya.Handler.creat回调 [ 62%]

...tance = this; } onTxtLoad(aText){ console.info("dfasd"); } initTxt(){ Laya.loader.load("res/localtxt.txt",Laya.Handler.create(this, onTxtLoad),null,Loader.TEXT); } } 2019-01-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...

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

397. 求教 JS项目的Promise如何使用 [ 62%]

...源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var img = new Laya.Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(this.monkey2),100,50); /...

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

398. 关于stage的size问题 [ 62%]

...scaleMode = Laya.Stage.SCALE_NOSCALE; // Laya.stage.size(6000, 6000); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Laya.Handler.create(this, this.onLoaded)); function onLoaded(): void { var sprite = new Laya.Sprite(); sprite.loadImage('comp/bg.png'); Laya.stage.addChild(spr...

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

399. 微信关系链:LayaAir引擎针对微信小游戏好友关系链实现方案 [ 62%]

...; } private function beginLoad():void { //加载引擎需要的资源 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, onLoaded)); } private function onLoad2():void { Laya.timer.once(2000, this, onLoaded); } private function onLoaded():void { //实例UI界面 //var testView:TestView = n...

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

400. 自适应问题 [ 62%]

...bgColor = "#ff0000";       Laya.stage.scaleMode = "fixedwidth";   Laya.loader.load("http://localhost/layabox/layabox/layabox/res/bg.png'", Handler.create(this, function () {         var t = Laya.loader.getRes(skin);         var _sprite = new Sprite();         _sprite.graphics.drawTex...

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