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

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

11. 加载TiledMap 不显示 [ 94%]

...ge.mouseY, p);         this.layer.getScreenPositionByTilePos(Math.floor(p.x), Math.floor(p.y), p);         this.sprite.pos(p.x, p.y);     }      private mapLoaded(): void {         this.layer = this.tiledMap.getLayerByIndex(0);          var radiusX...

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

12. 陀螺仪与加速计(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 94%]

... rotationInfo:RotationInfo):void  {  info.text =   "alpha:" + Math.floor(rotationInfo.alpha) + '\n' +  "beta :" + Math.floor(rotationInfo.beta) + '\n' +  "gamma:" + Math.floor(rotationInfo.gamma); } ``` ## 2、加速计 ​ `Accelerator`类定期发送设备的运动传感器检...

来源: Laya2.0_文档 发布时间: 20210714

13. 陀螺仪与加速计 · LayaAir3.4 · 引擎文档 · LAYABOX [ 93%]

... rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } } new Gyroscope_Sample(); 2、加速计 ​ Accelerator类定期发送设备的运动传感器...

来源: Laya3.0_文档 发布时间: 20251010

14. 陀螺仪与加速计(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 93%]

... rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } } new Gyroscope_Sample(); ``` ## 2、加速计 ​ `Accelerator`类定期发送设备的运动...

来源: Laya2.0_文档 发布时间: 20210715

15. 引擎 TiledMap 居然不支持图块翻转 [ 93%]

...ap.ORIENTATION_STAGGERED:                         tileX = Math.floor(tileX);                         tileY = Math.floor(tileY);                         screenPos.x = tileX * this._map.tileWidth + (tileY & 1) * this._tileWidthHalf;                    ...

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

16. 十几秒以后动画渲染时间变长,帧率变慢,是怎么回事? [ 92%]

..._path_radians = Math.PI / 180 * this._path_angle ; this._tail_pos.x = Math.floor( this._head_pos.x + this._path_length * Math.cos( this._path_radians ) ); this._tail_pos.y = Math.floor( this._head_pos.y + this._path_length * Math.sin( this._path_radians ) );  // // 确保路径的终点不能超出...

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

17. _calculateCacheRect函数有bug [ 92%]

...c.y - CacheStyle.CANVAS_EXTEND_EDGE;                 tRec.x = Math.floor(tRec.x + x) - x;                 tRec.y = Math.floor(tRec.y + y) - y;                 tRec.width = Math.floor(tRec.width);                 tRec.height = Math.floor(tRec.height);            ...

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

18. 颜色滤镜 差值变化 [ 89%]

... result = { r: -1, g: -1, b: -1 }; result.b = color % 256; result.g = Math.floor((color / 256)) % 256; result.r = Math.floor((color / 256) / 256); return result; } let result = spliceColor(color); let lastResult = spliceColor(lastColor); let colorMatrix = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, ...

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

19. 【简单跑酷--JS版】---Lv.6 终篇 [ 86%]

...ion () { /** * 游戏入口 */ function RunGame(){ this.bg = null; this.mapFloor = null; this.player = null; this.flyEnergy = null; this.speedEnergy = null; RunGame.__super.call(this); this.init(); } //RunGame 是一个显示对象 继承此 Sprite Laya.class(RunGame,"RunGame", laya.display.Sprite);...

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

20. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 85%]

...(二连跳) 3、玩家悬浮   在之前的教程中 我们有写到Floor.js Player.js MapFloor.js RunGame.js 本节 会在之前的基础上进行细微修改 认真看哈~~ 为了方便测试代码 我们首先要将地板的运动关闭 不然地板一直在动 不太适合我们调试代码...

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