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

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

31. 计时器-延迟调用 [ 81%]

...可见该函数仅触发了一次"; text.size(Laya.stage.width, Laya.stage.height); text.wordWrap = true; text.valign = "middle"; text.align = "center"; Laya.stage.addChild(text); } } new Timer_CallLater();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browse...

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

32. Sprite-缓存为静态图像 [ 81%]

...WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = 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() { c...

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

33. UI-Input [ 81%]

...ar WebGL = Laya.WebGL; var SPACING = 100; var INPUT_WIDTH = 300; var INPUT_HEIGHT = 50; var Y_OFFSET = 50; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMo...

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

34. UI-Input [ 81%]

...rIDE让项目开发更高效。let SPACING = 100, INPUT_WIDTH = 300, INPUT_HEIGHT = 50, Y_OFFSET = 50, skins; class UI_Input { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Lay...

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

35. list item 添加事件后无法监听 [ 80%]

...神解答     // 初始化ListView function createListView(x, y, width, height, item_width, item_height) {     var list = new Laya.List();     list.itemRender = initItem(item_width, item_height);      list.repeatX = 1;     list.size(width, height);     list.x = x;     list...

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

36. 缓动-逐字缓动 [ 80%]

...WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var w = 400; var of...

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

37. UI-RefreshList [ 79%]

...的资源 this.baseBox = new Box(); this.baseBox.width = 443; this.baseBox.height = 622; this.baseBox.pos(30, 28); this.baseBox.bgColor = "#ffffff"; // 加载进度条 this.refreshLoading = new Box(); this.refreshLoading.pos(133, 0); this.refreshLoading.bottom = 10; this.refreshLoading.visible = fal...

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

38. Sprite-容器 [ 79%]

...WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showApe(); } showApe() { const Sprite = Laya.Spr...

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

39. Sprite-容器 [ 79%]

...WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createApes(); })(); function createApes() { // 每只猩猩距...

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

40. 为什么laya的Button渲染逻辑顺序是先渲染,再获取素材切片? [ 79%]

...ole.log("lose skin",this._skin); return; }; var width=img.sourceWidth; var height=img.sourceHeight / this._stateNum; img.$_GID || (img.$_GID=Utils.getGID()); var key=img.$_GID+"-"+this._stateNum; var clips=AutoBitmap.getCache(key); if (clips)this._sources=clips; else { this._sources=; if (this._stat...

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