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

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

811. [LayaAir3]3D场景里面鼠标感应区域 3.2.1跟3.3不同 [ 67%]

...s.spRole.texture.sourceWidth = Laya.stage.width; this.spRole.texture.sourceHeight = Laya.stage.height; //添加2D精灵, this.owner.addChild(this.spRole); this.spRole.pos(0, 0); this.spRole.size(Laya.stage.width, Laya.stage.height); }); 2025-01-09 0 0 分享 微博 QZONE 微信 为什么被折叠?...

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

812. [LayaAir3]Panel的滚动条要点击一下才有数据出现,可以复现 [ 67%]

...不知道panel 的 size有多大,当时数据内容并没有超过panel height,所以那个bar不会出现,结果也导致数据出现不了。点击一下scroll,进行重新渲染以后,数据内容才出现。  而动态加载,因为已经知道了数据内容超过了panel height,所...

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

813. List anchor问题 [ 67%]

...4 好的 zjw917329684 • 2017-06-02 23:16 是不是因为我没写width和height啊? cuixueying • 2017-06-03 13:40 你试下,应该不是,list的width和height是自动生成的,我没有手动去改! zjw917329684 • 2017-06-02 17:03 看楼下 zjw917329684 • 2017-06-01 21:43 表现...

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

814. 不带格式后缀的图片无法成功加载 [ 67%]

... nodee = new Laya.Sprite() nodee.texture = picTemp nodee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y = 350 Laya.stage.addChild(nodee) }));上面这个图片无法正常显示,打印 texture 的宽是 undefined,如果是带后缀的图片,比如.jpg就可以正常展示图片。 附件...

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

815. 我想问下如果要调用手机本地相册,能不能用HTMLDivElement?该怎么用 [ 67%]

...lt;span>上传文件</span> </label> <canvas width="300" height="300" id="canvas"></canvas> </body> <script> $("#file").change(function (){ var file = new FileReader();//读取文件2进制 file.onload = function(e){ var base64 = e.target.result; var img = new ...

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

816. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 67%]

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

来源: Laya2.0_文档 发布时间: 20210715

817. 2D网格渲染器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 67%]

... /** * 生成一个矩形2D网格 * @param width 矩形的宽度 * @param height 矩形的高度 */ private generateRectVerticesAndUV(width: number, height: number): Laya.Mesh2D { const vertices = new Float32Array(4 * 5); const indices = new Uint16Array(2 * 3); let index = 0; vertices[index++] = 0; ...

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

818. laya.ui.FontClip [ 67%]

...垂直方向中心线的距离(以像素为单位)。 UIComponent clipHeight : Number 竖向分割时每个切片的高度,与 clipY 同时设置时优先级高于 clipY 。 Clip clipWidth : Number 横向分割时每个切片的宽度,与 clipX 同时设置时优先级高于 clipX 。 Clip...

来源: Laya2.0_api 发布时间: 20190513

819. 文本对齐与自动换行(ActionScript-LayaAir基础篇(AS3)-文本) [ 67%]

...景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } ``` ![5](img/5.png) 在实际编码中如果需要其他的对齐模式,请参...

来源: Laya2.0_文档 发布时间: 20210715

820. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 67%]

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

来源: Laya2.0_文档 发布时间: 20210715