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

大约有 2 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0011 秒)

1. Sprite-缓存为静态图像 [ 100%]

...t.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#CCCCCC"; text.x = Math.random() * Laya.stage.width; text.y = Math.random() * Laya.stage.height; textBox.addChild(text); } //缓存为静态图像 textBox.cacheAsBitmap = true; Laya.stage.addChild(textBox);...

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

2. 输入设备-指南针 [ 80%]

...方位并非正确方位。"); } // 更新角度显示 degreesText.text = 360 - Math.floor(info.alpha) + "°"; compassImg.rotation = info.alpha; // 更新方位指示器 directionIndicator.x = -1 * Math.floor(info.gamma) / 90 * 70 + compassImg.x; directionIndicator.y = -1 * Math.floor(info.beta) / 9...

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