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

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

11. 鼠标交互-滑动 [ 94%]

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Browser = Laya.Browser; var Tween = Laya.Tween; var WebGL = Laya.WebGL; //swipe滚动范围 var TrackLength = 200; //触发swipe的拖动距离 var TOGGLE_DIST = TrackLength / 2; var buttonPosition, beg...

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

12. 骨骼动画-Spine事件 [ 94%]

...tX = 400, mStartY = 500, mCurrIndex = 0, mLabelSprite; class Skeleton_SpineEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Sprite = Laya.Sprite; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeig...

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

13. 鼠标交互-修正交互区域 [ 94%]

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

14. 区块地图-滚动地图 [ 94%]

...() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Event = Laya.Event, Stat = Laya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scale...

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

15. Animation组件on绑定的Laya.Event.CLICK无法触发 [ 94%]

Animation组件on绑定的Laya.Event.CLICK无法触发 我想实现一个卡片点击然后跟随鼠标移动。卡片的显示我是用Animation做的为了方便以后卡片销毁等动画,Animation.on绑定的Laya.Event.CLICK、Laya.Event.MOUSE_UP、Laya.Event.MOUSE_DOWN都无法触发。我...

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

16. 骨骼动画-藤蔓 [ 94%]

...Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes5/vine.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on(Event.ERROR, this, this.onError); mFactory.loadAni(mAniPath); } ...

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

17. 骨骼动画-橡胶人 [ 94%]

...Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes4/stretchyman.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on(Event.ERROR, this, this.onError); mFactory.loadAni(mAniPa...

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

18. 骨骼动画-多纹理 [ 94%]

...function() { var Skeleton = Laya.Skeleton; var Templet = Laya.Templet; var Event = Laya.Event; var Browser = Laya.Browser; var Stat = Laya.Stat; var WebGL = Laya.WebGL; var mAniPath; var mStartX = 400; var mStartY = 500; var mFactory; var mActionIndex = 0; var mCurrIndex = 0; var mArmature; var mCur...

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

19. 2D物理-碰撞过滤器 [ 94%]

...s.createHouse(); for (let i = 1; i mouseJoint).onMouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.destoryJoint); Laya.stage.on(Event.MOUSE_OUT, this, this.destoryJoint); // 方案二,自己实现,可以实现更大程度的控制 // Laya.stage.on(Event.MOUSE_MOVE, this, this.mouseMove); // L...

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

20. 骨骼动画-藤蔓 [ 94%]

...function() { var Skeleton = Laya.Skeleton; var Templet = Laya.Templet; var Event = Laya.Event; var Browser = Laya.Browser; var Stat = Laya.Stat; var WebGL = Laya.WebGL; var mAniPath; var mStartX = 200; var mStartY = 500; var mFactory; var mActionIndex = 0; var mCurrIndex = 0; var mArmature; var mCur...

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