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

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

31. 为何我的stage.height不能随着实际窗口自动改变呢? [ 94%]

为何我的stage.height不能随着实际窗口自动改变呢? 这导致我的UI设置bottom属性无效,请问是怎么回事呢   谢谢     static width:number=450;     static height:number=1000;     static scaleMode:string="fixedwidth";     static screenMode:string="...

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

32. 文本-多行输入 [ 94%]

...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"; createInput(); })(); function createInput() { var inputText = n...

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

33. 滤镜-发光滤镜 [ 94%]

...// 不支持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"; Laya.loader.load(apePath, Laya.Handler.create(this, t...

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

34. 文本-多行输入 [ 94%]

...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.createInput(); } createInput() { const Input = L...

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

35. UI-Tree [ 94%]

... {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "right": "0", "clipY": "2"}}, {"type": "Clip", "props": {"y": "4", "x": "14", "name": "folder", "clipX": "1", "skin": "ui/clip_tree_folder.png", "clipY": "3...

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

36. UI-Tree [ 94%]

..., 300); tree.x = (Laya.stage.width - tree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; Laya.stage.addChild(tree); } } const Box = Laya.Box, Clip = Laya.Clip, Label = Laya.Label; // 此类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12",...

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

37. 输入设备-摇一摇 [ 94%]

...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_示例 发布时间: 20240930

38. 文本-位图字体 [ 94%]

...// 不支持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"; this.loadFont(); } loadFont() { const BitmapFont = La...

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

39. DOM元素-表单输入 [ 94%]

...,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; var rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标签 showLabel("邮箱", 0, rowHeightDelta * ...

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

40. UI-Button [ 94%]

...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_示例 发布时间: 20240930