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

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

101. UI-List [ 91%]

...Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.Stage; var List = Laya.List; var Handler = Laya.Handler; var WebGL = Laya.WebGL;...

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

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

...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function 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...

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

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

...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function 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...

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

104. 屏幕适配-缩放-Show All [ 91%]

...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function 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...

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

105. 屏幕适配-缩放-Extract Fit [ 91%]

...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function 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...

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

106. 骨骼动画进阶(JavaScript-2D进阶篇(JS)-动画进阶) [ 91%]

... skeleton0.showSkinByIndex(1); //播放 skeleton0.play(0,true); Laya.stage.addChild(skeleton0); //创建第二个动画 var skeleton1; skeleton1=templet.buildArmature(0); skeleton1.pos(500,700); skeleton1.showSkinByIndex(1); skeleton1.play(0,true); Laya.stage.addChild(skeleton1); } ``` **二、骨...

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

107. UI-Image [ 91%]

... = Laya.Image; let dialog = new Image("res/ui/dialog (3).png"); Laya.stage.addChild(dialog); dialog.pos(165, 62.5); } } new UI_Image();module laya { import Stage = Laya.Stage; import Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切...

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

108. 计时器-延迟执行 [ 91%]

...2; button1.y = (Laya.stage.height - button1.height - vGap) / 2; Laya.stage.addChild(button1); button1.on(Event.CLICK, this, onDecreaseAlpha1); button2 = createButton("点我60帧之后 alpha - 0.5"); button2.pos(button1.x, button1.y + vGap); Laya.stage.addChild(button2); button2.on(Event.CLICK, this...

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

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

...e(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { 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 Sta...

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

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

...e(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOSCALE();module laya { import Sprite = Laya.Sprite; import Stag...

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