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

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

1. 鼠标交互-鼠标交互 [ 100%]

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

2. 屏幕适配-屏幕适配 [ 96%]

...e(); bg.skin = "res/bg.jpg"; Laya.stage.addChild(bg); //实例一个文本 this.txt = new Text(); this.txt.text = "点击我切换适配模式(noscale)"; this.txt.bold = true; this.txt.pos(0, 200); this.txt.fontSize = 30; this.txt.on("click", this, this.onTxtClick); Laya.stage.addChild(this.txt); //...

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

3. 骨骼动画-适配版Spine [ 96%]

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

4. 区块地图-滚动地图 [ 96%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); Stat.show(); } // 创建地图 createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectang...

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

5. 骨骼动画-Spine事件 [ 96%]

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

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

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let ...

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

7. 骨骼动画-多纹理 [ 95%]

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

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

8. 骨骼动画-藤蔓 [ 95%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; 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(Ev...

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

9. 骨骼动画-橡胶人 [ 95%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; 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); mFactor...

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

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

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite...

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