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

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

1. 其他引擎的Demo-Example_05 [ 100%]

...] - 1; } x3d = tpoint1[i]; y3d = tpoint2[i]; z3d = tpoint3[i]; ty = (y3d * Math.cos(vx)) - (z3d * Math.sin(vx)); tz = (y3d * Math.sin(vx)) + (z3d * Math.cos(vx)); tx = (x3d * Math.cos(vy)) - (tz * Math.sin(vy)); tz = (x3d * Math.sin(vy)) + (tz * Math.cos(vy)); ox = tx; tx = (tx * Math.cos(vz)) - (ty...

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

2. Sprite-容器 [ 90%]

...Ape() { const Sprite = Laya.Sprite; const layoutRadius = 150, radianUnit = Math.PI / 2; // 该容器用于装载4张猩猩图片 this.apesCon = new Sprite(); Laya.stage.addChild(this.apesCon); // 添加4张猩猩图片 let ape; for (let i = 0; i < 4; i++) { ape = new Sprite(); this.apesCon.addChild(...

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

3. Sprite-旋转缩放 [ 84%]

...pe.rotation += 2; //心跳缩放 this.scaleDelta += 0.02; let scaleValue = Math.sin(this.scaleDelta); this.ape.scale(scaleValue, scaleValue); } } new Sprite_RoateAndScale();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser;...

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

4. 输入设备-贪吃蛇(重力感应) [ 81%]

...ze); food.graphics.drawRect(0, 0, foodSize, foodSize, "#00BFFF"); food.x = Math.random() * Laya.stage.width; food.y = Math.random() * Laya.stage.height; } } class Segment extends Laya.Sprite { constructor(width, height) { super(); this.size(width, height); this.init(); } init() { this.graphics.drawR...

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