大约有 1,880 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0064 秒)
Laya_社区(1141) Laya3.0_api(242) Laya2.0_文档(103) Laya2.0_示例(94) Laya_示例(91) Laya2.0_api(82) laya_api(76) Laya3.0_文档(51)
...ctor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; this.showApe(); } private showApe(): void ...
来源: Laya2.0_文档 发布时间: 20210715
...ani_planet.pivotX = 350; ani_planet.x = Laya.stage.width/2; ani_planet.load("1.swf",true); ani_planet.y = i*50; addChild(ani_planet); i++; } 是不是我写...
来源: Laya_社区 发布时间: 20180529
...决方案 var htmlC: Laya.HTMLCanvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0); //获取截屏区域的texture let base64 = htmlC.toBase64("image/jpeg", 1); 使用toBase64 报错can`t find variable conchToBase64FlipY 附件 : --> 2019-06-21 添加评论 免费帖 --> ...
来源: Laya_社区 发布时间: 20190621
...5浏览器的宽度和高度 1、通过Laya提供的方法Laya.window.innerWidth和Laya.window.innerHeight //[IF-JS]方法的使用请参考:LayaFlash宏编译//转换成h5项目后获取浏览器的宽度 //[IF-JS]sourceWidth = Laya.window.innerWidth; //转换成h5项目后获取浏览器的高...
来源: Laya_社区 发布时间: 20151028
...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
...帧刷新 rankSprite2.graphics.drawTexture(rankTexture, 0, 0, rankTexture.width, rankTexture.height); Laya.stage.addChild(rankSprite2); }); 希望官方可以给个微信小游戏排行榜2.0的demo 附件 : --> 2019-01-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...
来源: Laya_社区 发布时间: 20190115
... 1、你可以获取你昵称的长度,图标的位置就是text.x+text.width 2、你也可以通过html富文本实现图片和文字同时显示,它会自动排版 3、你也可以借助hbox对其进行排版! 2017-09-06 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠...
来源: Laya_社区 发布时间: 20170906
...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
...种模式 1、场景有拉伸,但是可以全屏显示,esactfit、fixedwidth、fixedheight 2、场景按照最长边或者短边去等比缩放,不会有拉伸,但是可能会出现裁剪或者留空白边 showall、noborder 3、自动适配fixedwidth、fixedheight,按照屏幕的宽高...
来源: Laya_社区 发布时间: 20170622
...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