大约有 14 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...目开发更高效。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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
.../ phoenixHeight); // 混合模式的凤凰 let blendedPhoenix = this.createAnimation(); blendedPhoenix.blendMode = Laya.BlendMode.LIGHTER; // 指定要使用的混合模式 blendedPhoenix.scale(scaleFactor, scaleFactor); blendedPhoenix.y = (Laya.stage.height - phoenixHeight * scaleFactor) / 2; // ...
来源: Laya2.0_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
...#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_示例 发布时间: 20241118
....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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118