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

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

1. UI-RefreshList [ 100%]

...ya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** 滚动条效果是否停止 */ this.scro...

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

2. 骨骼动画-适配版Spine [ 99%]

... var SpineTemplet = Laya.SpineTemplet; class SpineBinary { constructor() { this.aniPath = "res/bone/spineboy-pma.skel"; this.index = -1; Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; Stat.show(); this.startFun(); } startF...

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

3. 2D物理-碰撞过滤器 [ 98%]

...{ 'use strict'; class Physics_Physics_CollisionFiltering { constructor() { this.preMovementX = 0; this.preMovementY = 0; Laya.Config.isAntialias = true; Laya.Laya.init(1200, 700, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage...

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

4. UI-Clip [ 98%]

..."#232628"; Laya.loader.load([buttonSkin, clipSkin, bgSkin], Handler.create(this, this.onSkinLoaded)); } onSkinLoaded() { this.showBg(); this.createTimerAnimation(); this.showTotalSeconds(); this.createController(); } showBg() { const Image = Laya.Image; let bg = new Image(bgSkin); bg.size(224, 302);...

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

5. 鼠标交互-鼠标交互 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createInteractiveTarget(); this.createLogger(); } createInteractiveTarget() { const Event = Laya.Event, Sprite = Laya.Sprite; let rect = new Sprite(); rect.graphics.drawRect(0, 0, 200, 200, "#D2...

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

6. 鼠标交互-滑动 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); this.drawTrack(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w...

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

7. 加载-销毁Texture使用的图片资源 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this....

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

8. 骨骼动画-换装 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes2/goblins.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on...

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

9. 骨骼动画-Spine事件 [ 98%]

... Laya.stage.bgColor = "#ffffff"; mLabelSprite = new Sprite(); Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes6/alien.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on(E...

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

10. 计时器-延迟执行 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; let vGap = 100; this.button1 = this.createButton("点我3秒之后 alpha - 0.5"); this.button1.x = (Laya.stage.width - this.button1.width) / 2; this.button1.y = (Laya.stage....

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