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

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

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

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

12. 区块地图-等角地图 [ 82%]

...stage.mouseX, Laya.stage.mouseY, p); layer.getScreenPositionByTilePos(Math.floor(p.x), Math.floor(p.y), p); sprite.pos(p.x, p.y); } function mapLoaded() { layer = tiledMap.getLayerByIndex(0); var radiusX = 32; var radiusY = Math.tan(180 / Math.PI * 30) * radiusX; var color = "#FF7F50"; sprite = new ...

来源: Laya_示例 发布时间: 20260303

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

... 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. 区块地图-等角地图 [ 82%]

...地图坐标得到屏幕坐标 this.layer.getScreenPositionByTilePos(Math.floor(p.x), Math.floor(p.y), p); this.sprite.pos(p.x, p.y); } mapLoaded() { this.layer = this.tiledMap.getLayerByIndex(0); var radiusX = 32; var radiusY = Math.tan(180 / Math.PI * 30) * radiusX; // 14.37 var color = "#FF7F50";...

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

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

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

16. [LayaAir3]Laya旧版本的TiledMap如何隐藏某一层级的格子贴图 [ 81%]

...Map.scale; //将地图坐标转换为地图格子坐标 const gridX = Math.floor(uiPosX / this.tMap.tileWidth); const gridY = Math.floor(uiPosY / this.tMap.tileHeight); console.log("点击地图格子坐标:" + gridX + "," + gridY); const tileLayer = this.tMap.getLayerByName("Ground") as Laya.MapL...

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

17. _calculateCacheRect函数有bug [ 81%]

...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. 引擎 TiledMap 居然不支持图块翻转 [ 80%]

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

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

19. 颜色滤镜 差值变化 [ 78%]

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

20. 加载TiledMap 不显示 [ 78%]

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