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

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

21. 引擎 TiledMap 居然不支持图块翻转 [ 91%]

... this._map.viewPortWidth || this.y < 0 || this.y > this._map.viewPortHeight) {                     this.hide();                 }                 else {                     this.show();                 }             }             else { ...

来源: Laya_社区 发布时间: 20220627

22. 输入设备-摇一摇 [ 91%]

...console); console.y = picH + 10; console.width = Laya.stage.width; console.height = Laya.stage.height - console.y; console.color = "#FFFFFF"; console.fontSize = 50; console.align = "center"; console.valign = 'middle'; console.leading = 10; } startShake() { const Shake = Laya.Shake; Shake.instance.st...

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

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

...ction updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();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_N...

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

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

...ction updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();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_S...

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

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

...ction updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();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.SCAL...

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

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

...teRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOBORDER();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.st...

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

27. UI-Button [ 90%]

...rIDE让项目开发更高效。let COLUMNS = 2, BUTTON_WIDTH = 147, BUTTON_HEIGHT = 165 / 3, HORIZONTAL_SPACING = 200, VERTICAL_SPACING = 100, xOffset, yOffset, skins; class UI_Button { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = ...

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

28. 计时器-间隔循环 [ 90%]

...// 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100...

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

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

...teRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_EXTRACT_FIT();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_EXTRACT_FIT { private rect: Sprite; constructor() { Laya.init(550, 400); L...

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

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

...teRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_SHOW_ALL();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.st...

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