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

大约有 152 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0019 秒)

1. 调试-帧率统计 [ 100%]

...ser = Laya.Browser; import Stat = Laya.Stat; export class Debug_FPSStats { constructor() { Laya.init(Browser.clientWidth, Browser.clientHeight); Stat.show(Browser.clientWidth - 120 >> 1, Browser.clientHeight - 100 >> 1); } } } new laya.Debug_FPSStats();package { import laya.utils.Browser; import lay...

来源: Laya_示例 发布时间: 20241118

2. 屏幕适配-对齐模式 [ 98%]

... laya { import Stage = Laya.Stage; export class SmartScale_Align_Contral { constructor() { Laya.init(100, 100); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.bgColor = "#232628"; } } } new laya.SmartScale_Align_...

来源: Laya_示例 发布时间: 20241118

3. 屏幕适配-缩放-No Scale [ 91%]

... Laya.Stage; export class SmartScale_Scale_NOSCALE { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dra...

来源: Laya_示例 发布时间: 20241118

4. 屏幕适配-缩放-No Border [ 91%]

...Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dr...

来源: Laya_示例 发布时间: 20241118

5. 高级应用-基于物理渲染 [ 91%]

...yName("Camera"); camera.addComponent(CameraMoveScript); });class PBRDemo { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene: Laya.Scene = Laya.stage.addChild(Laya.Scene.load("../../res/t...

来源: Laya_示例 发布时间: 20241118

6. 屏幕适配-缩放-Show All [ 90%]

...Laya.Stage; export class SmartScale_Scale_SHOW_ALL { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dra...

来源: Laya_示例 发布时间: 20241118

7. 屏幕适配-缩放-Extract Fit [ 90%]

...a.Stage; export class SmartScale_Scale_EXTRACT_FIT { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dr...

来源: Laya_示例 发布时间: 20241118

8. UI-Image [ 90%]

...ort Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgCo...

来源: Laya_示例 发布时间: 20241118

9. 性能测试-卡通人物2 [ 89%]

...r1, character2, character3, character4]; var characters = []; var text; // Constructor (function() { Laya.init(1280, 720, WebGL); Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Stat.enable(); Laya.stage.loadImage("../../res/cartoon2/background.jpg", 0, 0, 1280, 900); createCharacters(); text = new...

来源: Laya_示例 发布时间: 20241118

10. 其他引擎的Demo-Example_04 [ 89%]

... = this.w / 2; private slideY:number = this.h / 2; private speedInfo:Text; constructor() { Laya.init(this.w, this.h, WebGL); this.createText(); this.start(); } private start():void { for (var i:number = 0; i this.w) { this.stars[i].x = this.stars[i].x - this.w; } else if (this.stars[i].x this.h) { t...

来源: Laya_示例 发布时间: 20241118