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

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

1. 屏幕适配-缩放-No Border [ 100%]

...is.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOBORDER();module laya { import Sprite = Laya...

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

2. 屏幕适配-缩放-No Scale [ 100%]

...is.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOSCALE();module laya { import Sprite = Laya....

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

3. 屏幕适配-缩放-Extract Fit [ 99%]

...is.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_EXTRACT_FIT();module laya { import Sprite = L...

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

4. 屏幕适配-缩放-Show All [ 99%]

...is.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_SHOW_ALL();module laya { import Sprite = Laya...

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

5. 屏幕适配-自动竖屏 [ 97%]

...; let text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } } new SmartScale_Portrait();module laya { import Stage ...

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

6. 屏幕适配-自动横屏 [ 97%]

... let text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } } new SmartScale_Landscape();module laya { import Stage...

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

7. 滤镜-颜色滤镜 [ 69%]

...is, this.setup)); } setup() { this.normalizeApe(); this.makeRedApe(); this.grayingApe(); } normalizeApe() { let originalApe = this.createApe(); originalApe.x = (Laya.stage.width - apeTexture.width * 3) / 2; originalApe.y = (Laya.stage.height - apeTexture.height) / 2; } makeRedApe() { const ColorFilt...

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