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

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

451. 输入设备-指南针 [ 60%]

....alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator(); // 画出其他UI drawUI(); // 创建显示角度的文本...

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

452. native2.0压缩纹理如何使用 [ 60%]

... 2018-12-20 0 1 分享 微博 QZONE 微信 xiaoman122 赞同来自: Laya.loader.load("res/1.pkm", Handler.create(null, function():void {     var spr:Sprite = new Sprite();     spr.loadImage("res/1.pkm");     spr.pos(100, 100);     Laya.stage.addChild(spr); }), null, Loader.IMAGE); 附件就...

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

453. 如何使用javascript版本的加载模式 [ 60%]

....json 那我先引用了LayaUI.max.all.js后,再加载ui.json!   Laya.loader.load([ { url: config.layerUIJson, type: Laya.Loader.JSON } ], Handler.create(this, function () { this.gameScenes = new ui.layer.gameScenesUI(); this.addChildren(this.gameScenes); })); 但页面上却没有任何内容...

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

454. 图片放在assets根目录下无法被引用成功,必须放到一个文件夹中 [ 60%]

...载了 var resArray = [ {url:"res/atlas/comp.json", type: Laya.Loader.ATLAS}, {url:"res/atlas/assets.json", type: Laya.Loader.ATLAS} ]; Laya.loader.load(resArray, Laya.Handler.create(null,LoadResComplete)); cuixueying • 2017-03-21 16:15 好的,谢谢你的建议,我们会...

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

455. htmlCanvas 像素级操作 [ 60%]

htmlCanvas 像素级操作 function showSprite() { Laya.loader.load("../src/img/testImg.png",Laya.Handler.create(this,graphicsImg)); } function graphicsImg() { //临时sprite var img = new Laya.Sprite(); //img.graphics.drawTexture(Laya.loader.getRes(("../src/img/testImg.png"),0,0)); //获取图片...

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

456. 请教:粒子的官方教程中的配置文件是从哪里得到了? [ 60%]

...从哪里得到了? 在学习粒子教程代码时,有一句是 Laya.loader.load("res/particles/particleNew.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON);   其中这个 res/particles/particleNew.part文件是怎么获得的?谢谢   如下图 附件 : --> 2018-03-17 添...

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

457. t._addReference is not a function [ 60%]

... llc 赞同来自: 碰到相同的问题,解决了,供参考: Laya.loader.load(chapterBG, Laya.Handler.create(this, this.onBGLoaded, [chapterBG])/* , Laya.Handler.create(this, this.onBGLoadProgress) */); 第三个参数打开在某些条件下会出t._addReference is not a function 可能是...

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

458. 关于创建Sprite获取大小 [ 60%]

...调。这个是异步获取,如果你要单个获取的话 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

459. layaAir IDE UI导出显示异常 [ 60%]

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

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

460. 生成的粒子特效怎么设置colorComponentInter无效? [ 60%]

...uper(this); letter = letter; this.loadImage('res/jiezou/wenzi2.png'); Laya.loader.load("res/parts/qipao.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); } function onAssetsLoaded(settings) { settings.colorComponentInter = true; sp = new Particle2D(settings); sp.emitter.start(); sp.pl...

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