大约有 1,873 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0060 秒)
Laya_社区(1137) Laya3.0_api(242) Laya2.0_文档(103) Laya2.0_示例(94) Laya_示例(91) Laya2.0_api(82) laya_api(76) Laya3.0_文档(48)
...te_:Sprite = new Sprite(); var bitmap_:BitmapData = new BitmapData(_loader.width, _loader.height); bitmap_.draw(_loader, new Matrix()); var matrix:Matrix = new Matrix(); matrix.rotate(Math.PI/4); sprite_.graphics.beginBitmapFill(bitmap_, matrix, true); sprite_.graphics.drawRect(100, 50, 200, 90); sp...
来源: Laya_社区 发布时间: 20170414
...read-only] 对象的显示高度(以像素为单位)。 Sprite displayWidth : Number[read-only] 对象的显示宽度(以像素为单位)。 Sprite drawCallOptimize : BooleanSprite filters : Array滤镜集合。可以设置多个滤镜组合。Sprite globalRotation : Number[read-only] ...
来源: Laya2.0_api 发布时间: 20190513
...候生成的数据出错 var htmlCanvas1:HTMLCanvas = bg.drawToCanvas(bg.width, bg.height,0,0); var canvas:* = htmlCanvas1.getCanvas(); var imgData:String = canvas.toDataURL("image/jpeg"); 代码是这样的,情况是我这个bg内的子节点发生变化后重新生成图片的base64数据的时...
来源: Laya_社区 发布时间: 20170921
...高为舞台大小,这样才不会拉伸变形 this.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-0...
来源: Laya_社区 发布时间: 20250109
...-02 23:14 好的 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
...ile" /> <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; va...
来源: Laya_社区 发布时间: 20170111
...0, 0, 0, 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"...
来源: Laya2.0_文档 发布时间: 20210715
...一个矩形网格的写法, /** * 生成一个矩形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 inde...
来源: Laya3.0_文档 发布时间: 20251120
...设置文本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } ```  在实际编码中如果需要其他的对...
来源: Laya2.0_文档 发布时间: 20210715
...的高度,与 clipY 同时设置时优先级高于 clipY 。 Clip clipWidth : Number 横向分割时每个切片的宽度,与 clipX 同时设置时优先级高于 clipX 。 Clip clipX : intX轴(横向)切片数量。Clip clipY : intY轴(竖向)切片数量。Clip customRenderEnable : Boo...
来源: Laya2.0_api 发布时间: 20190513