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

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

591. tiledMap类createMap()创建地图 如何理解这个viewRect视口区 [ 55%]

...知道出来的是什么宽高)         console.log(tiledMap.gridWidth,tiledMap.gridHeight);         //地图宽高         console.log(tiledMap.width,tiledMap.height);         //         console.log(tiledMap.numColumnsGrid,tiledMap.numRowsGrid );       ...

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

592. Transform3D::pivot移到哪里了吗?现在Sprite3D该怎样设置描点呢? [ 55%]

...画如何设置绕自身中心点旋转,我这么设置_ani.pivot(_ani.width/2,_ani.height/2);不行,而且也没有锚点可以设置,如何实现 LayaAir2自带的3D示例项目,项目设置“场景横竖屏”= vertical 后,layanative测试时黑屏 view 设置false之后是不是...

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

593. localToGlobal坐标转换 [ 55%]

... = 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

594. 粒子释放问题 [ 55%]

...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

595. cannot read property '1'of null [ 55%]

...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

596. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 55%]

...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

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

...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

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

...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

599. viewportPointToRay产生的射线始终有偏差,是什么? [ 54%]

...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

600. 微信小游戏截图 [ 54%]

...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