大约有 12 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。const ROTATE = "rotate"; class Interaction_CustomEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya....
来源: Laya2.0_示例 发布时间: 20241117
...LayaAirIDE让项目开发更高效。let preRadian = 0; class Interaction_Rotate { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHe...
来源: Laya2.0_示例 发布时间: 20241117
...r = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rotateFrameRateBasedText = this.createText("基于帧频旋转", this.rotateTimeBasedText.x, this.rotateT...
来源: Laya2.0_示例 发布时间: 20241117
...pe2); 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.Browser; import WebGL = Laya.WebGL; e...
来源: Laya2.0_示例 发布时间: 20241117
.../ 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; import WebGL = Laya.WebGL; export ...
来源: Laya2.0_示例 发布时间: 20241117
...t; for (let i = 0; i 0) { let prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; let point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.push(seg); } animate() { let seg = segments[0]; // 更新蛇的位置 targetPosition.x += vx;...
来源: Laya2.0_示例 发布时间: 20241117
...目开发更高效。let colAmount = 100, extraSpace = 50, moveSpeed = 2, rotateSpeed = 2, characterGroup; class PerformanceTest_Cartoon { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Loader = Laya.Loader; // 不支...
来源: Laya2.0_示例 发布时间: 20241117
...t); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#ccc"; text.x = Math.random() * Laya.stage.width; text.y = Math.random() * Laya.stage.height; } //缓存为静态图像 textBox.cacheAs = "bitmap"; } } new Sprite_Cache();module l...
来源: Laya2.0_示例 发布时间: 20241117
...a = 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 Sprite = Laya.Sprite; import Stage...
来源: Laya2.0_示例 发布时间: 20241117
...); 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 = Laya.WebGL; export class Sprite_Containe...
来源: Laya2.0_示例 发布时间: 20241117