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

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

1. 动画-图集动画 [ 100%]

...目开发更高效。let aniConfPath = "res/fighter/fighter.atlas"; class Animation_Altas { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN...

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

2. 性能测试-卡通人物2 [ 97%]

...prite { constructor(images) { super(); this.speed = 5; this.bloodBar; this.animation; this.nameLabel; this.createAnimation(images); this.createBloodBar(); this.createNameLabel(); } createAnimation(images) { const Animation = Laya.Animation; this.animation = new Animation(); this.animation.loadImages...

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

3. 混合模式-Lighter [ 94%]

.../ phoenixHeight); // 混合模式的凤凰 let blendedPhoenix = this.createAnimation(); blendedPhoenix.blendMode = Laya.BlendMode.LIGHTER; // 指定要使用的混合模式 blendedPhoenix.scale(scaleFactor, scaleFactor); blendedPhoenix.y = (Laya.stage.height - phoenixHeight * scaleFactor) / 2; // ...

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

4. 动画-SWF动画 [ 91%]

...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Animation_SWF { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_M...

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

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

...#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.aniFly = new Animation(); this.aniFly.loadAtlas(Path...

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

6. Sprite-旋转缩放 [ 89%]

....stage.height / 2; this.scaleDelta = 0; Laya.timer.frameLoop(1, this, this.animate); } animate() { this.ape.rotation += 2; //心跳缩放 this.scaleDelta += 0.02; let scaleValue = Math.sin(this.scaleDelta); this.ape.scale(scaleValue, scaleValue); } } new Sprite_RoateAndScale();module laya { import S...

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

7. Sprite-容器 [ 88%]

...tage.width / 2, Laya.stage.height / 2); Laya.timer.frameLoop(1, this, this.animate); } animate() { this.apesCon.rotation += 1; } } new Sprite_Container();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Lay...

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

8. Sprite-节点控制 [ 87%]

...s.ape1); this.ape1.addChild(this.ape2); Laya.timer.frameLoop(1, this, this.animate); } animate() { this.ape1.rotation += 2; this.ape2.rotation -= 4; } } new Sprite_NodeControl();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Bro...

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

9. Sprite-轴心点 [ 87%]

...idth / 2 + gap, Laya.stage.height / 2); Laya.timer.frameLoop(1, this, this.animate); } animate() { this.ape1.rotation += 2; this.ape2.rotation += 2; } } new Sprite_Pivot();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; ...

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

10. 其他引擎的Demo-Example_21 [ 85%]

...b"; Stat.show(); this.createCanvases(); Laya.timer.frameLoop(1, this, this.animate); Laya.stage.on('mousedown', this, this.onMouseDown); Laya.stage.on('mousemove', this, this.onMouseMove); Laya.stage.on('mouseup', this, this.onMouseUp); } createCanvases() { const Sprite = Laya.Sprite; let graphicsCa...

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