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

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

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

...285dd263aee2e8f7b302fa8d139de4c' Laya.loader.load(url, Laya.Handler.create(this, () => { let picTemp = Laya.Loader.getRes(url); console.log(picTemp.width) // undefined let nodee = new Laya.Sprite() nodee.texture = picTemp nodee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y = 350 Laya.stage...

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

2592. 关于微信小游戏音频控制的问题 [ 65%]

...时是直接调用的 Laya.SoundManager.playSound(url, 1, new Laya.Handler(this, this.onComplete)); 但因为很多音效都是属于重复播放,而这个playSound()方法会返回一个SoundChannel,所以我就尝试用了一个dictionary把这些SoundChannel都保存起来,下次播放时如果...

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

2593. LayaAir IDE 2.2.0beta2版本2d粒子不能用了,LayaAir IDE 2.1.0版本正常 [ 65%]

...52)     at EventHandler.runWith (libs/laya.core.js:848)   aya.core.js中this._vshader与this._pshader参数为null 附件 : --> 3d.zip 2019-08-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 从小就是T 赞...

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

2594. 屏幕适配-自动竖屏 [ 65%]

....stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; te...

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

2595. 屏幕适配-自动横屏 [ 65%]

...tage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; t...

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

2596. 【算法挑战】双指外扩/内聚时,如何实现以双指中点为中心缩小/放大舞台。 [ 65%]

...帮助解决问题的可以酬谢           // if(distance - this.lastDistance>0){         // Laya.stage.x +=  -(((touches[0].x+touches[1].x)/2) + (distance)* (1/Laya.stage.scaleX)) * (1/Laya.stage.scaleX) ;         // Laya.stage.y +=  -(((touches[0].y+to...

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

2597. 关于遍历产生的sprite的点击事件,急,大神帮看哈 [ 65%]

...对sp进行CLICK的监听即可,sp.size(xxx,xxx);sp.on(Event.CLICK,this,onSpClick) 3、点击sp时,直接获取sp.index值即可(e.target.index)! 2017-02-21 1 0 分享 微博 QZONE 微信 lift6220819 赞同来自: q395212409 Laya.init(640,1010); Laya.stage.scaleMode = Laya.Stage.SCALE_...

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

2598. swf预加载问题 [ 65%]

...ets.push(QUAN); assets.push(RUNBIN); assets.push(YUAN); mc.on(Event.LOADED,this,load); } public function load(e:* = null):void{ if(assets.length > 0){ mc.load(assets.shift()); }else{ onAssetsLoaded(); } } private function onAssetsLoaded(e:*=null):void { this.event(BEFORLOADERFINISH); } } } 2016-1...

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

2599. 文本-字数限制 [ 65%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInput() { const Input = Laya.Input; let inputText = new Input(); Laya.stage.addChild(inputText); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya....

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

2600. 局部坐标转全局坐标结果与预期相差甚远 [ 65%]

...-12-19 0 4 分享 微博 QZONE 微信 LT 赞同来自: Laya.stage.addChild(this); Laya.timer.once(500,this,test); 转坐标放在后面加了个延时执行。。就没问题了。。应该是执行的时候组件还没有全部加进stage。。 2018-12-20 0 0 分享 微博 QZONE 微信 为什么被...

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