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

大约有 3 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0213 秒)

1. Sprite-缓存为静态图像 [ 100%]

... new Text(); textBox.addChild(text); 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"...

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

2. 混合模式-Lighter [ 72%]

...).slice(-strLen); } private evalBgColor(): void { var color: number = Math.random() * 0xFFFFFF; var channels: Array = this.getColorChannals(color); this.bgColorTweener.to(this.bgColorChannels, { r: channels[0], g: channels[1], b: channels[2] }, this.gradientInterval, null, Handler.create(this, this....

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

3. 2D物理-桥 [ 68%]

...et width = 20, height = 2.5; for (let i = 0; i { let targetX = (300 + Math.random() * 400) / Laya.Physics.PIXEL_RATIO, targetY = 500 / Laya.Physics.PIXEL_RATIO; let newBall = new Laya.Sprite(); Laya.Laya.stage.addChild(newBall); let circleBody = newBall.addComponent(Laya.RigidBody); circleBody.bulle...

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