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

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

1511. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 53%]

...assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //清除绘制 var imgUrl = (this.flag = !th...

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

1512. laya2.0做微信小游戏排行榜功能时报错 [ 53%]

...帧刷新 rankSprite2.graphics.drawTexture(rankTexture, 0, 0, rankTexture.width, rankTexture.height); Laya.stage.addChild(rankSprite2); });   希望官方可以给个微信小游戏排行榜2.0的demo 附件 : --> 2019-01-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

1513. 元素自动排列的问题,比如在昵称后面显示性别图标,怎么让图标根据昵称长度排列在其后面呢? [ 53%]

... 1、你可以获取你昵称的长度,图标的位置就是text.x+text.width 2、你也可以通过html富文本实现图片和文字同时显示,它会自动排版 3、你也可以借助hbox对其进行排版! 2017-09-06 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠...

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

1514. sprite 添加点击事件没反应,对sprite设置了size也没用 [ 53%]

...w.music.btn_on) ; this.btn.pivot(75/2 , 75/2) ; this.btn.x = window.client_width - 25 ; this.btn.y = 25 ; this.btn.scaleX = 25 / 75 ; this.btn.scaleY = 25 / 75 ; Laya.stage.addChild(this.btn) ; this.btn.size(25,25) ; this.btn.on(Laya.Event.CLICK, this, music.music_voice_toggle); 代码是这样的 ...

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

1515. scaleMode 用法 [ 53%]

...种模式 1、场景有拉伸,但是可以全屏显示,esactfit、fixedwidth、fixedheight 2、场景按照最长边或者短边去等比缩放,不会有拉伸,但是可能会出现裁剪或者留空白边  showall、noborder 3、自动适配fixedwidth、fixedheight,按照屏幕的宽高...

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

1516. 分享:TiledMap设置viewport后黑屏问题! [ 53%]

...s/tiledMap/orthogonal-test-movelayer.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this,onLoaded)); } //切记:设置tiledMap的宽高,需要在地图创建完成之后 private function onLoaded():void { var sp:Sprite=tiledMap.mapSprite() as Sprite;//为tiledMap...

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

1517. 想绘制一个自适应得圆角矩形框,失败了,求解惑 [ 53%]

...r login = (function(_super){ function login(){ login.super(this); var stageWidth = Laya.stage.width; var stageHeight = Laya.stage.height; console.log(stageWidth*0.05+":"+stageHeight); var path = [ ["moveTo",stageWidth*0.05,0], ["actTo",stageWidth*0.8,0,stageWidth*0.8,stageHeight*0.05,10], ["actTo",s...

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

1518. 请问,怎么写代码能直接调用canvas 内的发光滤镜? [ 53%]

...实现了部分渐变功能。   spbg.graphics.drawPath(0,0, radius(spbg.width,spbg.height,10),{ fillStyle: gradient});  请问怎么写代码能调用下面的canvas原生代码?不用Laya的滤镜。 (Laya滤镜和webgl捆绑了)                         context.shado...

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

1519. 加速器是不是不支持input:file [ 53%]

...file  <div class="upload-wrap" id="upload" style="left: 0px; top: 0px; width: 0px; height: 0px; display: none;">     <input type="file" class="upload-pic" id="upFile" accept="image/jpeg,image/png" value="upload Img">     <span class="upload-text"></span> </div> ...

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

1520. layaAir中Animation无法获得宽高,很多逻辑无法判断 [ 53%]

...) this.animation.play(); this.addChild( this.animation ); this.animation.width 一直为0 2016-11-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 qq_别天神 赞同来自: 使用getBounds ()来获取宽高,...

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