大约有 35 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0028 秒)
...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_示例 发布时间: 20241117
...this._doll_area.h = doll_area.h; } // 设置容器的宽高 this.width = Math.max( this._blood_area.w, this._demon_area.w, this._doll_area.w ); this.height = this._blood_area.h + this._demon_area.h + this._doll_area.h; this.graphics.drawRect( 0, 0, this.width, this.height, null, "#ff0000", 1);...
来源: Laya_社区 发布时间: 20180515
...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_示例 发布时间: 20241117
...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_示例 发布时间: 20241117
... 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_示例 发布时间: 20241117
...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_示例 发布时间: 20241117
...er): void { this.view.box_mark.graphics.drawPie(216, 216, 216, -90, (-90 + Math.floor(percent * 360)), "#ff0000"); //画进度 let point: { x: number, y: number, hudu: number } = this.cal(216, 216, 205, Math.abs(Math.floor(percent * 360) ) - 90); //现在是顺时针,如果逆时针旋转 Math.abs...
来源: Laya_社区 发布时间: 20190629
... (c < 0 && a < -c)) { a = c; s = p / 4; } else s = p / PI2 * Math.asin(c / a); return (a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * PI2 / p) + c + b); }可以按照原来的函数仿写自己想要的 2018-01-04 0 2 分享 微博 QZONE 微信 he853066732 赞同来自: 2018-04-0...
来源: Laya_社区 发布时间: 20180104
...结果 let rays = []; for (let i = 0; i < 8; i++) { let radis = i * 2 * Math.PI / 8; rays[i] = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(Math.cos(radis), 0, Math.sin(radis))); let hitResult = new Array(); this.mainScene.physicsSimulation.rayCastAll(rays[i], hitResult); console.log(...
来源: Laya_社区 发布时间: 20190403
...tageX; this.moveY = e.stageY; this.isMode = "run"; // 获取半径 var r = Math.sqrt(Math.pow((this.starX - this.moveX), 2) + Math.pow((this.starY - this.moveY), 2)); //当移动半径大于大圆的半径时,半径等于大圆的0.5的宽度(也就是半径) if (r >= this.moveMax.width/2) ...
来源: Laya_社区 发布时间: 20171030