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

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

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

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Point = Laya.Point; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var viewWidth = Browser.width; var viewHeight = Browser.height; var lasers = []; var tick = 0; var frequency = 80; var type = 0; (function() { Laya.init(v...

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

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

...1; var current = 0; var objs = 17; var vx = 0; var vy = 0; var vz = 0; var points1 = []; var points2 = []; var points3 = []; var tpoint1 = []; var tpoint2 = []; var tpoint3 = []; var balls = []; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); ...

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

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

...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_示例 发布时间: 20241124

4. 区块地图-等角地图 [ 96%]

...aya.Stage; var MapLayer = Laya.MapLayer; var TiledMap = Laya.TiledMap; var Point = Laya.Point; var Rectangle = Laya.Rectangle; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var tiledMap; var layer; var sprite; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(1600, 800, WebGL);...

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

5. 射线检测-放置物体 [ 89%]

... = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); var point = new Laya.Vector2(); var _outHitInfo = new Laya.RaycastHit(); function checkHit() { //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mo...

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

6. 鼠标交互-双指缩放(多点触控) [ 82%]

...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_示例 发布时间: 20241124

7. 射线检测-点击行走 [ 80%]

... = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); var point = new Laya.Vector2(); var _position = new Laya.Vector3(0, 0.25, 0); var _quaternion = new Laya.Quaternion(); var _outHitInfo = new Laya.RaycastHit(); function checkHit() { box.transform.position = _position; box.transfo...

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