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

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

1. 缓动-时间线 [ 100%]

...ateTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, scaleY:1, alpha:1},2000,null,0) .addLabel("turnLeft",0).to(target,{x:100, y:300, scaleX:1, scaleY:0.2, alpha:0.1},2000,null,0) ...

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

2. 鼠标交互-Hold [ 88%]

...vent.MOUSE_UP, this, onApeRelease); } function onHold() { Tween.to(ape, { "scaleX": 1, "scaleY": 1 }, 500, Ease.bounceOut); isApeHold = true; } /** 鼠标放开后停止hold */ function onApeRelease() { // 鼠标放开时,如果正在hold,则播放放开的效果 if (isApeHold) { isApeHold = fal...

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

3. 其他引擎的Demo-Example_23 [ 75%]

... - pos2.y; var dist = Math.sqrt(distX * distX + distY * distY) + 40; laser.scaleX = dist / 20; laser.pos(pos1.x, pos1.y); laser.pivotY = 43 / 2; laser.blendMode = "lighter"; laser.rotation = (Math.atan2(distY, distX) + Math.PI) * 180 / Math.PI; lasers.push(laser); Laya.stage.addChild(laser); frequen...

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

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

...上次距离变化,确定是放大还是缩小 const factor = 0.01; sp.scaleX += (distance - lastDistance) * factor; sp.scaleY += (distance - lastDistance) * factor; lastDistance = distance; } function onMouseUp(e) { Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); } /**计算两个触摸点...

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

5. 屏幕适配-屏幕适配 [ 69%]

...BoyClick(e) { //点击后小人会放大缩小 var boy = e.target; if (boy.scaleX === 1) { boy.scale(1.2, 1.2); } else { boy.scale(1, 1); } } function onTxtClick(e) { //点击后切换适配模式 e.stopPropagation(); index++; if (index >= modes.length) index = 0; Laya.stage.scaleMode = modes[index]...

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