大约有 692 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0050 秒)
Laya_社区(333) Laya3.0_api(89) Laya2.0_api(69) Laya2.0_文档(65) laya_api(61) Laya3.0_文档(41) Laya2.0_示例(19) Laya_示例(15)
...知道出来的是什么宽高) console.log(tiledMap.gridWidth,tiledMap.gridHeight); //地图宽高 console.log(tiledMap.width,tiledMap.height); // console.log(tiledMap.numColumnsGrid,tiledMap.numRowsGrid ); ...
来源: Laya_社区 发布时间: 20180612
...画如何设置绕自身中心点旋转,我这么设置_ani.pivot(_ani.width/2,_ani.height/2);不行,而且也没有锚点可以设置,如何实现 LayaAir2自带的3D示例项目,项目设置“场景横竖屏”= vertical 后,layanative测试时黑屏 view 设置为false之后是不是...
来源: Laya_社区 发布时间: 20200312
... = this._toolbar.btn_mian_recruit.localToGlobal(new Point(btn_mian_recruit.width/2,btn_mian_recruit.height/2)); 因为你就是拿btn_mian_recruit去转坐标的,所以不能再把位置设置成btn_mian_recruit本身的位置了。谢谢您的反馈,有什么问题再联系 2016-08-01 2 0 分...
来源: Laya_社区 发布时间: 20160801
...tion() { // 不支持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 = "#232628"; Stat.show(); Laya.URL.basePath...
来源: Laya_社区 发布时间: 20200229
...ned 微信小游戏初始化报错Uncaught TypeError:Cannot read property "width" of undifined 实例碰撞体报错,Cannot read property 'btSphereShape' of undefined Laya.stage报null 做了一个最简单的显示微信子域的程序,但是报错Cannot read property 'USER_DATA_PATH' of undefi...
来源: Laya_社区 发布时间: 20220106
...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
...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
...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
...orld(input:Laya.Vector2):Laya.Vector2 { let ratioX = (input.x / Laya.stage.width); let ratioY = (input.y / Laya.stage.height); let clientWidth = Laya.stage.clientScaleX * Laya.stage.width let clientHeight = Laya.stage.clientScaleY * Laya.stage.height // let singleX = (Laya.Browser.width - clientW...
来源: Laya_社区 发布时间: 20180201
...ring;// = canvas.toTempFilePathSync(); canvas.toTempFilePath({ x: 0, y: 0, width: 1280, height: 720, destWidth: 1280, destHeight: 720, success:function(res:Object):void{ imagePath = res.tempFilePath;//这个就是截屏的图片地址,可以将图片生成到相册,也可以使用这个地址用...
来源: Laya_社区 发布时间: 20190515