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

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

41. graphics drawPath drawLine 鼠标 画笔 画线 锯齿 [ 90%]

graphics drawPath drawLine 鼠标 画笔 画线 锯齿 mouseMove(e:Laya.Event){ /**/ var p:Laya.Point=this.startPoint; this.cls.graphics.drawPath(0,0,[ ["moveTo", p.x,p.y], ["lineTo", e.stageX,e.stageY] ],null,{strokeStyle:"#ff0000",lineWidth:15,lineJoin:"round",lineCap:"round"}); //*/ //this.cls.g...

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

42. 计时器-延迟执行 [ 90%]

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var button1, button2; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alig...

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

43. 射线检测-碰撞器混合 [ 90%]

...te3D.addComponent(Laya.Rigidbody); //添加键盘事件 Laya.stage.on(Laya.Event.KEY_DOWN, this, onKeyDown); this.collider = this.scene.getChildByName("Collider"); this.collider.active = false; //是否开启debug模式 Laya.stage.on(Laya.Event.MOUSE_UP, this, drawCollider); } function onKeyDown(e) ...

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

44. 鼠标交互-Hold [ 90%]

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Texture = Laya.Texture; var Browser = Laya.Browser; var Ease = Laya.Ease; var Handler = Laya.Handler; var Tween = Laya.Tween; var WebGL = Laya.WebGL; const HOLD_TRIGGER_TIME = 1000; const apePath = "../...

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

45. 缓动-时间线 [ 90%]

...ya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createApe(); this.createTimerLine(); Laya.stage.on(Event.KEY_DOWN, this, this.keyDown); } createApe() { const Sprite = Laya.Sprite; this.target = new Sprite(); Laya.stage.addChild(this.target); this.t...

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

46. 鼠标交互-修正交互区域 [ 90%]

...} setup() { this.buildWorld(); this.createLogger(); } buildWorld() { const Event = Laya.Event; this.createCoralRect(); this.createDeepSkyblueRect(); this.createDarkOrchidRect(); // 设置舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, this.onDown); } createCoralRect(...

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

47. 关于多点触控e.touches问题 [ 90%]

关于多点触控e.touches问题 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, onCtrlMoveRockerTouchDown);     function onCtrlMoveRockerTouchDown(e) {    console.log("onCtrlMoveRockerTouchDown()");    this.ctrlMoveRockerPosX...

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

48. iOS wkWebView [ 89%]

...le.log("connect...."); this.hr = new Laya.HttpRequest(); this.hr.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.hr.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete); this.hr.once(Laya.Event.ERROR, this, this.onHttpRequestError); this.hr.send('http://tdev.sanguoh5.com:800...

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

49. 鼠标交互-修正交互区域 [ 89%]

...ar Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Event = Laya.Event; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var logger; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stag...

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

50. 一个LayaAir moveout target 设计上的疑问? [ 89%]

...   sp[j + i * 10].pos(i * 60, j * 60);         sp[j + i * 10].on(Laya.Event.MOUSE_OVER, this, over);         sp[j + i * 10].on(Laya.Event.MOUSE_OUT, this, out);     } } function over(e) {     e.target.graphics.drawRect(0, 0, 50, 50, "red"); } function out(e) {     //正常大家可能...

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