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

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

1. 基础文本 · LayaAir3.4 · 引擎文档 · LAYABOX [ 100%]

...t;/li> <li>橘子</li> 定义列表 <img src='image_url' width = 200 height=100/> <img src='atlas/comp/image.png' width = 200 height=100/> 显示一张图片,还可以使用百分比指定图片的大小 <a href='xxx'>link text</a> <a href='www.layabox.com...

来源: Laya3.0_文档 发布时间: 20251010

2. 显示文本组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 88%]

...,此方法只执行一次 */ onAwake(): void { this.lab.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.lab.size(500, 30); //大小 this.lab.pivot(this.lab.width/2, this.lab.height/2); //轴心点 this.lab.text = "大家好,欢迎大家来到LayaAir IDE"; //文本...

来源: Laya3.0_文档 发布时间: 20251010

3. 水平滚动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 87%]

...his.hscroll.skin = "atlas/comp/hscroll.png";//滚动条皮肤 this.hscroll.width = 300;//滚动条的宽度 this.hscroll.pos(300, 300);//滚动条的位置 this.hscroll.min = 0;//滑块的最小滚动位置 this.hscroll.max = 10;//滑块的最大滚动位置 this.hscroll.scrollSize = 1;//点击按...

来源: Laya3.0_文档 发布时间: 20251010

4. 陀螺仪与加速计 · LayaAir3.4 · 引擎文档 · LAYABOX [ 85%]

...info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onDeviceorientation); } private onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo): void...

来源: Laya3.0_文档 发布时间: 20251010

5. 进度条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

...res/ui/progressBar.png"); this.progressBar.pos(100, 500); this.progressBar.width = 400; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); }); } // 模拟...

来源: Laya3.0_文档 发布时间: 20251010

6. 2D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

.../monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 直接调用size设置: Laya.loader.load("res/apes/monkey2.png",Laya.Handler.create(this,func...

来源: Laya3.0_文档 发布时间: 20251010

7. HTTP通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...= "#FFFFFF"; this.text.font = "Impact"; this.text.fontSize = 25; this.text.width = 800; this.text.anchorX = 0.5; this.text.align = "center"; this.text.y = 20; this.text.centerX = 0; this.owner.addChild(this.text); } /** * 发起HTTP连接请求 */ private connect(): void { //创建HttpRequest对象 ...

来源: Laya3.0_文档 发布时间: 20251010

8. 垂直滚动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...his.vscroll.skin = "atlas/comp/vscroll.png";//滚动条皮肤 this.vscroll.width = 300;//滚动条的宽度 this.vscroll.pos(300, 300);//滚动条的位置 this.vscroll.min = 0;//滑块的最小滚动位置 this.vscroll.max = 10;//滑块的最大滚动位置 this.vscroll.scrollSize = 1;//点击按...

来源: Laya3.0_文档 发布时间: 20251010

9. 多行输入文本组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...此方法只执行一次 */ onAwake(): void { this.txtarea.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txtarea.size(500, 200); //大小 this.txtarea.pivot(this.txtarea.width/2, this.txtarea.height/2); //轴心点 this.txtarea.text = "大家好,欢迎各位开发...

来源: Laya3.0_文档 发布时间: 20251010

10. 和原生Dom交互 · LayaAir3.4 · 引擎文档 · LAYABOX [ 79%]

...现这种效果。 var data = '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">' + '<foreignObject width="100%" height="100%">' + '<div xmlns="http://www.w3.org/1999/xhtml" style="font-size:40px">' + '<em>I</em> like ' + '<span style="color:white; te...

来源: Laya3.0_文档 发布时间: 20251010