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

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

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

...onMouseMove(e) { let distance = this.getDistance(e.touches); //判断当前距离与上次距离变化,确定是放大还是缩小 const factor = 0.01; this.sp.scaleX += (distance - lastDistance) * factor; this.sp.scaleY += (distance - lastDistance) * factor; lastDistance = distance; } onMouseUp(e...

来源: Laya2.0_示例 发布时间: 20240929

2. Sprite-容器 [ 71%]

...#232628"; this.createApes(); } private createApes(): void { // 每只猩猩距离中心点150像素 var layoutRadius: number = 150; var radianUnit: number = Math.PI / 2; this.apesCtn = new Sprite(); Laya.stage.addChild(this.apesCtn); // 添加4张猩猩图片 for (var i: number = 0; i < 4; i++) { va...

来源: Laya2.0_示例 发布时间: 20240929

3. 鼠标交互-滑动 [ 68%]

...高效。//swipe滚动范围 let TrackLength = 200; //触发swipe的拖动距离 let TOGGLE_DIST = TrackLength / 2; let buttonPosition, beginPosition, endPosition; let button; class Interaction_Swipe { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya....

来源: Laya2.0_示例 发布时间: 20240929

4. UI-RefreshList [ 60%]

...entName = null; 要侦听的事件名 * @paramthis.moveLimit = null; 移动距离的上限,达到上限后才会抛出要侦听的事件 * @paramthis.distance = null; 相对布局,位于父节点的距离 * @paramthis.time = null; 需要加载多少毫秒后恢复 */ /** 点击标记按钮处理...

来源: Laya2.0_示例 发布时间: 20240929