大约有 411 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0048 秒)
Laya_社区(167) Laya3.0_api(86) Laya2.0_api(57) laya_api(53) Laya2.0_文档(23) Laya2.0_示例(10) Laya_示例(9) Laya3.0_文档(6)
.../ 游戏开始时有一个食物 this.produceFood(); } initSnake() { const Point = Laya.Point; for (let i = 0; i 0) { let prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; let point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.p...
来源: Laya2.0_示例 发布时间: 20241117
...lay(0,true); 然后循环创建依次执行ui的延迟动画 Laya.Tween.to(point,{x:point.x,y:point.y,alpha:1,update:Laya.Handler.create(point,function(){ this.visible = true; })},800,Laya.Ease.backOut,null,i*400); timeline在一开始还在正常执行, 当有一半左右的ui元素进入到场景...
来源: Laya_社区 发布时间: 20180118
...ationInfo = Laya.AccelerationInfo; var Accelerator = Laya.Accelerator; var Point = Laya.Point; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; function Segment(width, height) { Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height /...
来源: Laya_示例 发布时间: 20241117
...复 cuixueying 赞同来自: jinghuhuilai var p1:Point = new Point(10,20); var p2:Point = new Point(100,200); var x:int = p1.x - p2.x; var y:int = p1.y = p2.y; ...
来源: Laya_社区 发布时间: 20170511
viewportPointToRay产生的射线始终有偏差,是为什么? 我使用这种方式构造了一个射线: let point = new Vector2(Laya.stage.mouseX, Laya.stage.mouseY); camera.viewportPointToRay(point, this._ray);然后发现ray构造出来的位置始终不对,我沿着ray的方向放了...
来源: Laya_社区 发布时间: 20180201
...this.onMouseMove); } /**计算两个触摸点之间的距离*/ getDistance(points) { let distance = 0; if (points && points.length == 2) { let dx = points[0].stageX - points[1].stageX; let dy = points[0].stageY - points[1].stageY; distance = Math.sqrt(dx * dx + dy * dy); } return distance; } } new I...
来源: Laya2.0_示例 发布时间: 20241117
...s; import laya.display.Sprite; import laya.events.Event; import laya.maths.Point; import laya.utils.Browser; import laya.webgl.WebGL; import laya.wx.mini.MiniAdpter; public class LayaSample { public var sprite:Sprite = new Sprite(); public function LayaSample() { //初始化引擎 MiniAdpter.init();...
来源: Laya_社区 发布时间: 20190515
...useMove); } /**计算两个触摸点之间的距离*/ function getDistance(points) { var distance = 0; if (points && points.length == 2) { var dx = points[0].stageX - points[1].stageX; var dy = points[0].stageY - points[1].stageY; distance = Math.sqrt(dx * dx + dy * dy); } return distance; } })();mo...
来源: Laya_示例 发布时间: 20241117
...t MapLayer = Laya.MapLayer; import TiledMap = Laya.TiledMap; import Point = Laya.Point; import Rectangle = Laya.Rectangle; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class TiledMap_IsometricWorld { private tiledMap: TiledMap; private lay...
来源: Laya_社区 发布时间: 20201230
...画。给你 一个参考代码 export class CatmullRomSpline { private points: number[]; constructor(points: number[]) { if (points.length < 4 || points.length % 2 !== 0) { throw new Error("At least two points (four numbers) are required, and the total number of values must be even"); } this....
来源: Laya_社区 发布时间: 20241008