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

大约有 474 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)

91. 鼠标交互-双指旋转(多点触控) [ 67%]

...s.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches =...

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

92. 鼠标交互-Hold [ 67%]

...(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress); } function onApePr...

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

93. 缓动-时间线 [ 67%]

...adImage("../../res/apes/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { 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, sc...

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

94. 层级选择问题,以及编辑器设置值的逻辑混乱问题 [ 67%]

...后,是否应该立即清除和它互斥的值呢?同样的,anchor和pivot也有同样的问题   2016-07-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: uyaer你好 1、在层级...

来源: Laya_社区 发布时间: 20160706

95. 鼠标交互-Hold [ 66%]

...pe.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOUSE_DOWN, this, this.onApeP...

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

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

...0, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length...

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

97. 缓动-时间线 [ 66%]

...d(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offset:Number) offset: 标签事件相对于上个...

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

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

...s.sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.sp.size(w, h); this.sp.pivot(w / 2, h / 2); this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches =...

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

99. LayaRender渲染含有多个part的Body存在Bug [ 63%]

...var text = Laya.loader.getRes("res/bar.png"); var w = size, h = size/5; sp.pivot(w/2, h/2); sp.graphics.fillTexture(text, 0, 0, w, h); partA = Matter.Bodies.rectangle(x, y, w, h, { isStatic:true, layaSprite:sp, });  sp = new Laya.Sprite(); w = size/5, h=size; sp.pivot(w/2, h/2); sp.graphics.fillTex...

来源: Laya_社区 发布时间: 20180625

100. 鼠标交互-滑动 [ 63%]

...on = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; button.y = Laya.stage.height / 2; button.on(Event.MO...

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