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

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

1. Sprite-显示图片 [ 100%]

...ya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 2D场景不显示时打开 Laya.Config.isAntialias = true; // 2D场景显示错乱时打开 Laya.Config.useWebGL2 = false; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV =...

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

2. 计时器-延迟调用 [ 94%]

....font = "SimHei"; text.fontSize = 30; text.color = "#FFFFFF"; text.text = "打开控制台可见该函数仅触发了一次"; text.size(Laya.stage.width, Laya.stage.height); text.wordWrap = true; text.valign = "middle"; text.align = "center"; Laya.stage.addChild(text); } } new Timer_CallLater();modu...

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

3. IDE-显示IDE创建的界面 [ 77%]

...显示 this.list.array = arr; //还可以自定义list渲染方式,可以打开下面注释看一下效果 //list.renderHandler = new Handler(this, onListRender); } private onListRender(item: Laya.Box, index: number): void { //自定义list的渲染方式 var label: Label = item.getChildByName("la...

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

4. UI-Tree [ 74%]

...识别为树结构的文件夹开启状态图表。2帧:折叠状态、打开状态。 folder.x = 14; folder.y = 4; this.addChild(folder); let label = new Label("treeItem"); label.name = "label"; // 设置 label 的name 为“label”时,此值将用于树结构数据赋值。 label.fontSize = 2...

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

5. UI-RefreshList [ 63%]

...的上次坐标位置 */ this.moveLastPos = null; /** 列表单元是否已打开 */ this.itemIsOpen=false; /**展开的单元格索引ID */ this.itemOpenId=-1; /**展开的单元格对象 */ this.openedItem = null; /** 记录模拟数据的红点状态 */ this.redHotStatus =[]; /** 纪录鼠标按...

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