大约有 20 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0026 秒)
...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Timer_CallLater { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage...
来源: Laya2.0_示例 发布时间: 20241118
...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Timer_Interval { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height...
来源: Laya2.0_示例 发布时间: 20241118
...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Timer_DelayExcute { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.hei...
来源: Laya2.0_示例 发布时间: 20241118
...e.width / 2; this.ape.y = Laya.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_RoateAnd...
来源: Laya2.0_示例 发布时间: 20241118
...ent = Laya.Event; // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this, this.onHold); Laya.stage.on(Event.MOUSE_UP, this, this.onApeRelease); } onHold() { const Tween = Laya.Tween, Ease = Laya.Ease; Tween.to(this.ape, { "scaleX": 1, "scaleY": 1 }, 500, Ease.bou...
来源: Laya2.0_示例 发布时间: 20241118
..."; this.progressBar.changeHandler = new Handler(this, this.onChange); Laya.timer.loop(100, this, this.changeValue); } changeValue() { if (this.progressBar.value >= 1) { this.progressBar.value = 0; } this.progressBar.value += 0.05; } onChange(value) { console.log("进度:" + Math.floor(value * 100)...
来源: Laya2.0_示例 发布时间: 20241118
...) { this.createPhoenixes(); // 动态背景渲染 this.evalBgColor(); Laya.timer.frameLoop(1, this, this.renderBg); } createPhoenixes() { let scaleFactor = Math.min( Laya.stage.width / (phoenixWidth * 2), Laya.stage.height / phoenixHeight); // 混合模式的凤凰 let blendedPhoenix = this.createAn...
来源: Laya2.0_示例 发布时间: 20241118
...STOPPED, this, this.completeHandler); this.play(); this.changeSkin(); Laya.timer.loop(1000, this, this.changeSkin); } changeSkin() { mCurrSkinIndex++; let skinLength = mSkinList.length; if (mCurrSkinIndex >= skinLength) { mCurrSkinIndex = 0; } mArmature.showSkinByName(mSkinList[mCurrSkinIndex]); } c...
来源: Laya2.0_示例 发布时间: 20241118
...cleBody.linearVelocity = { x: velocityX * 5, y: velocityY * 5 }; Laya.Laya.timer.frameOnce(120, this, function () { newBall.destroy(); }); }); let label = this.label = Laya.Laya.stage.addChild(new Laya.Label("双击屏幕,仿生机器人向相反方向运动\n单击产生新的小球刚体")); lab...
来源: Laya2.0_示例 发布时间: 20241118
...oint.enableMotor = true; box.addComponentIntance(revoluteJoint); Laya.Laya.timer.frameLoop(1, this, this.addMiniBox); } addMiniBox() { let box = this.box; if (this.count >= this.totalBox) { return; } let sp = new Laya.Sprite(); Laya.Laya.stage.addChild(sp); sp.x = box.x; sp.y = box.y; sp.addComponen...
来源: Laya2.0_示例 发布时间: 20241118