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

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

1. 文本-自动调整文本尺寸 [ 100%]

...= this.createSampleText(); widthLimitText.width = 100; widthLimitText.y = 180; //该文本被限制了高度 var heightLimitText = this.createSampleText(); heightLimitText.height = 20; heightLimitText.y = 320; } createSampleText() { const Text = Laya.Text; let text = new Text(); Laya.stage.addChild(...

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

2. 网络和格式-Socket [ 98%]

... Laya.Event; socket = new Socket(); //socket.connect("echo.websocket.org", 80); socket.connectByUrl("ws://echo.websocket.org:80"); output = socket.output; socket.on(Event.OPEN, this, this.onSocketOpen); socket.on(Event.CLOSE, this, this.onSocketClose); socket.on(Event.MESSAGE, this, this.onMessageRe...

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

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

..."#ff0000",text:"Hello LayaAir"} this.box.dataSource = {slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: {color: "#ff0000", text: "Hello LayaAir"}}; //list赋值,先获得一个数据源数组 var arr = []; for (var i = 0; i /// import test = game.ui.test.TestPageUI; import L...

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

4. 其他引擎的Demo-Example_23 [ 79%]

...ser.width, viewHeight = Browser.height, lasers = [], tick = 0, frequency = 80, type = 0; class PIXI_Example_23 { constructor() { const WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(viewWidth, viewHeight, WebGL); ...

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

5. UI-RefreshList [ 74%]

...12"; this.msgBG.pos(0, 7); this.msgBG.autoSize = true; this.msgBG.height = 80; this.msgBG.left = 7; this.msgBG.right = 7; // 选中效果 this.selectBox = new Image("res/ui/refreshList/img_bg21.png"); this.addChild(this.selectBox); this.selectBox.sizeGrid = "12,10,8,12"; this.selectBox.pos(0, 7); th...

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

6. 2D物理-仿生机器人 [ 59%]

...structor() { this.scale = 2.5; this.pos = [500, 400]; this.m_offset = [0, -80 * this.scale]; this.pivot = [0, 8 * this.scale]; Laya.Config.isAntialias = true; Laya.Laya.init(1200, 700, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya...

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