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

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

1. 高级应用-闪光 [ 100%]

...; Laya.timer.frameLoop(1, this, loop); function loop() { scaleValue = Math.sin(scaleDelta += 0.01); pos1.elements[0] = pos2.elements[0] = scaleValue * 13; pos1.elements[1] = Math.sin(scaleValue * 20) * 2; pos2.elements[1] = Math.sin(scaleValue * 20) * 2; glitter.addGlitterByPositions(pos1, pos2); }c...

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

2. 其他引擎的Demo-Example_05 [ 96%]

...3d = 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 * Math.sin(vz)); ty = (ox *...

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

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

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

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

4. Sprite-容器 [ 82%]

...圆周排列猩猩 ape.pos( Math.cos(radianUnit * i) * layoutRadius, Math.sin(radianUnit * i) * layoutRadius); apesCtn.addChild(ape); } apesCtn.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.timer.frameLoop(1, this, animate); } function animate(e) { apesCtn.rotation += 1; } })();module laya ...

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

5. 照相机-3D空间转2D空间 [ 74%]

...aya.Vector3(); var scaleDelta = 0; function animate() { _position.x = Math.sin(scaleDelta += 0.01); layaMonkey3D.transform.position = _position; camera.viewport.project(layaMonkey3D.transform.position, camera.projectionViewMatrix, _outPos); //获取的2d坐标必须做兼容屏幕适配操作 layaMo...

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

6. Sprite3D-Sprite3D变换 [ 71%]

...scaleDelta = 0; var scaleValue = 0; function animate() { scaleValue = Math.sin(scaleDelta += 0.1); _position.y = scaleValue / 2; layaMonkey1.transform.position = _position; layaMonkey2.transform.rotate(_rotate, false, false); _scale.x = _scale.y = _scale.z = Math.abs(scaleValue); layaMonkey3.transfo...

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

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

...0; var tx = this.x + Math.cos(radian) * this.width; var ty = this.y + Math.sin(radian) * this.width; return new Point(tx, ty); } this.size(width, height); this.init(); } Laya.class(Segment, "Segment", Sprite); var seg; var segments = []; var foods = []; var initialSegmentsAmount = 5; var vx = 0, vy ...

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