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

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

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

...ts();module laya { import Browser = 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 ...

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

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

... } new SmartScale_Align_Contral();module 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 = "#2...

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

3. UI-Image [ 93%]

... Stage = Laya.Stage; import 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_...

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

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

...ER();module laya { import Sprite = Laya.Sprite; import Stage = 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 createCantra...

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

5. 屏幕适配-缩放-No Scale [ 93%]

...LE();module laya { import Sprite = Laya.Sprite; import Stage = 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 createCantralR...

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

6. 屏幕适配-缩放-Extract Fit [ 92%]

...IT();module laya { import Sprite = Laya.Sprite; import Stage = Laya.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 createCan...

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

7. 屏幕适配-缩放-Show All [ 92%]

...LL();module laya { import Sprite = Laya.Sprite; import Stage = 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 createCantral...

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

8. 区块地图-PerspectiveWall [ 92%]

... Laya.Rectangle; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class TiledMap_PerspectiveWall { private tiledMap: TiledMap; constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(700, 500, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_...

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

9. 区块地图-带动画的地图 [ 92%]

...ya.TiledMap; import Rectangle = Laya.Rectangle; import WebGL = Laya.WebGL; export class TiledMap_AnimationTile { private tiledMap: TiledMap; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1100, 800, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_...

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

10. 动画-SWF动画 [ 90%]

...ge = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Animation_SWF { private SWFPath: string = "res/swf/dragon.swf"; private MCWidth: number = 318; private MCHeight: number = 406; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWid...

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