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

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

41. UI-ColorPicker [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, this.onColorPickerSkinLoaded)); } onColorPickerSkinLoaded() { const ColorPicker = Laya.ColorPicker, Handler = Laya.H...

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

42. Sprite-缓存为静态图像 [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Stat.show(); setup(); })(); function setup() { var textBox = new Sprite(); // 随机摆放文本 var text; for (var i = 0; i < 1000; i++) { text = new Text(); text.fontSi...

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

43. 文本-HTML文本 [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { this.createParagraph(); // 代码创建 this.showExternalHTML(); // 使用外部定义的html } createParagraph() { const HTMLDivEleme...

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

44. 计时器-延迟调用 [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.demonstrate(); } demonstrate() { for (let i = 0; i < 10; i++) { Laya.timer.callLater(this, this.onCallLater); } } onCallLater() { const Text =...

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

45. Sprite-旋转缩放 [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createApe(); })(); function createApe() { ape = new Sprite(); ape.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.x = Laya.stage...

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

46. Sprite-缓存为静态图像 [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.Stat.show(); this.cacheText(); } cacheText() { const Sprite = Laya.Sprite, Text = Laya.Text; let textBox = new Sprite(); Laya.stage.addChild(textBox); // ...

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

47. 屏幕适配的缩放模式详解(TypeScript-2D基础篇(TS)-屏幕适配) [ 89%]

...,我们搜索laya.display.Stage,可以看到关于缩放模式的方法scaleMode共有七种参数,用于实现各种屏幕适配的缩放需求,参数说明如图1所示: ![blob.png](img/1.png) ​ (图1)LayaAir引擎关于缩放模式scaleMode的参数说明 **简单概览一下参...

来源: Laya2.0_文档 发布时间: 20200307

48. Sprite-显示图片 [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; showApe(); })(); function showApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方...

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

49. SCALE_FIXED_WIDTH适配屏幕的问题 [ 89%]

...         //设置舞台缩放模式                 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL;                 Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;             } else {                 Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_WIDTH;        ...

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

50. 动画-图集动画 [ 89%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(aniConfPath, Laya.Handler.create(this, this.createAnimation), null, Laya.Loader.ATLAS); } createAnimation() { const Animation = Laya.Animation;...

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