大约有 7 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...e = 0; 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...
来源: Laya_示例 发布时间: 20241118
...] - 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...
来源: Laya_示例 发布时间: 20241118
...只猩猩距离中心点150像素 var layoutRadius = 150; var radianUnit = Math.PI / 2; apesCtn = new Sprite(); Laya.stage.addChild(apesCtn); // 添加4张猩猩图片 for (var i = 0; i < 4; i++) { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey" + i + ".png"); ape.pivot(55, 72); // 以...
来源: Laya_示例 发布时间: 20241118
...) { ape.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...
来源: Laya_示例 发布时间: 20241118
...gment.prototype.getPinPosition = function() { var radian = this.rotation * Math.PI / 180; 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...
来源: Laya_示例 发布时间: 20241118
... var 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.tr...
来源: Laya_示例 发布时间: 20241118
...new Laya.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坐标必须做兼容屏幕适配操作 l...
来源: Laya_示例 发布时间: 20241118