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

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

541. SCALE_FIXED_WIDTH适配屏幕的问题 [ 61%]

SCALE_FIXED_WIDTH适配屏幕的问题 主要设置屏幕横屏与竖屏切换时,有少部分andriod机器有比较大的概率出现半屏的情况。请问下是引擎不兼容呢,还是代码写的不完善 问题重现方法:先卸载微信后再安装最新版本的微信,一定要卸...

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

542. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 61%]

...ickRect = new Laya.Sprite(); clickRect.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height-100 ); clickRect.pos( 0, 0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e...

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

543. tiledmap有时尺寸不正确 [ 61%]

...._mTiledMap.createMap(conf.fileName + ".json", new Rectangle(0, 0, Browser.width, Browser.height), Handler.create(this, this.onCompleteHandler)); } /** * 销毁当前地图 */ public destroy():void{ if (this._mTiledMap) this._mTiledMap.destroy(); if (this._mLevelConf) this._mLevelConf = null; this._...

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

544. 设置适配SCALE_FIXED_WIDTH,结果少部分andriod机型不能正确适配屏幕 [ 61%]

设置适配SCALE_FIXED_WIDTH,结果少部分andriod机型不能正确适配屏幕 主要设置屏幕适配的代码是下面,大部分手机是好的,有少部分andriod机器有比较大的概率出现半屏的情况。请问下是引擎不兼容呢,还是代码写的不完善  class Mai...

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

545. 关于创建Sprite获取大小 [ 61%]

...拿不到真实的大小?    这个建议官方改下接口,理论上width和height用来检测碰撞,那你看到的就应该是碰撞的边缘,按照官方的注释显然不太合理。   谢谢。 2018-05-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果...

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

546. 骨骼动画-换装 [ 61%]

....Sprite; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } ...

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

547. 官方的API为什么找不到pivot和pos? [ 61%]

...不到pivot和pos? var bounds = ani.getGraphicBounds(); ani.pivot(bounds.width / 2, bounds.height / 2); ani.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(ani);   上面pivot和pos都是什么意思?官方API为什么找到说明? 2018-05-09 添加评论 免费帖 --> ...

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

548. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 61%]

...() { /** * 背景类 * */ function Background(){ //图片的宽度 this.BG_WIDTH = 1600; //记录当前移动的值 this.moveX = 0; //定义背景1 this.bg1 = null; //定义背景2 this.bg2 = null; //草堆 this.grass = null; Background.__super.call(this); this.init(); } //Background 是一个显示...

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

549. 2.3微信截图分享问题 [ 61%]

...分享。 var tempFilePath = canvas.toTempFilePathSync( { x: 0, y: 0, width: 100, height: 100, destWidth: 100, destHeight: 100, fileType: 'jpg', quality: 1.0 });   var canvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0).getCanvas();   这是第二种写法。...

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

550. Text 居中 搭配 Tween 显示结果有问题。 [ 61%]

...试"; txt.x = 0; txt.y = 0; txt.color = "#FFFFFF"; txt.fontSize = 12; txt.width = 800; txt.height = 600; txt.align = "center"; txt.valign = "middle"; Laya.stage.addChild(txt); Laya.Tween.to(txt, { scaleX:2, scaleY:2, }, 1000, Laya.Ease.elasticOut,null,1000);  画布800x600,在屏幕正中间显示...

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