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

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

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_示例 发布时间: 20240930

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_示例 发布时间: 20240930

3. UI-Image [ 91%]

... 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_示例 发布时间: 20240930

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

...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_示例 发布时间: 20240930

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

...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_示例 发布时间: 20240930

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

...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_示例 发布时间: 20240930

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

...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_示例 发布时间: 20240930

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

... 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_示例 发布时间: 20240930

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

...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_示例 发布时间: 20240930

10. 加载-多种类型资源加载 [ 88%]

...;module laya { import Loader = Laya.Loader; import Handler = Laya.Handler; export class Loader_MultipleType { private ROBOT_DATA_PATH: string = "res/skeleton/robot/robot.bin"; private ROBOT_TEXTURE_PATH: string = "res/skeleton/robot/texture.png"; constructor() { Laya.init(100, 100); var assets: Arra...

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