大约有 692 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0055 秒)
Laya_社区(333) Laya3.0_api(89) Laya2.0_api(69) Laya2.0_文档(65) laya_api(61) Laya3.0_文档(41) Laya2.0_示例(19) Laya_示例(15)
...显示范围正常 case "resizeShared": { Laya.Browser.window.sharedCanvas.width = message.data.width; Laya.Browser.window.sharedCanvas.height = message.data.height; var tempMatrix = message.data.matrix; var matrix = new Laya.Matrix(); matrix.a = tempMatrix.a; matrix.b = tempMatrix.b; matrix.c = tem...
来源: Laya_社区 发布时间: 20180903
.../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
...tReceive = true; } // 生成一个矩形 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; vertices[index++] = 0; vertices[index++] = 0; vertices[inde...
来源: Laya3.0_文档 发布时间: 20251010
...点显示也会恢复正常。 游戏参数: GameConfig{ static width:number=750; static height:number=1334; static scaleMode:string="showall"; static screenMode:string="vertical"; static alignV:string="middle"; static alignH:string="center"; }...
来源: Laya_社区 发布时间: 20200812
...true); }globalPoint: 绿色框的坐标 -- 舞台中央坐标(Laya.stage.width*.5,Laya.stage.height*.5) localSp:黑框容器对象 直接带入上面方法即可,中央的坐标你只知道相对于绿色框的坐标,则需要转换一下,很简单: globalPoint = greenBox.localToGlobal(n...
来源: Laya_社区 发布时间: 20180502
...__mask = new Laya.Sprite(); this.__mask.graphics.drawRect(0,0,this.img_bar.width,this.img_bar.height,"#000000"); this.setValue(0); } private setValue(v:number):void{ this.__mask.scaleX = v; this.img_bar.mask = null;//第二次设置mask的时候必须给原对象的mask置空,否则无效 this.img_b...
来源: Laya_社区 发布时间: 20170320
...的边界信息 var bounds = ani.getGraphicBounds(); ani.scale(80/bounds.width ,80/bounds.height) this.addChild(ani) } } Laya.class(Item1, "Item1", Box); var List = Laya.List; function setup(effList) { var list = new List(); list.itemRender = Item1; list.repeatX = 3; list.repeatY = 4; list.x = (Laya...
来源: Laya_社区 发布时间: 20170627
...赞同来自: align居中是相对的,你需要为你的label设置一个width值,该值大于你的文本内容即可! 2017-05-22 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 demibug 相关问题 两个对象new了一个相同...
来源: Laya_社区 发布时间: 20170521
...加到舞台上 Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } ``` 上述代码运行效果如动图2所示:  (动图2) **Tips:** Button 组件的属性接口介绍请参考 [Button API](https://...
来源: Laya2.0_文档 发布时间: 20210714
... this.label.pos(500, 400); this.label.width = 300; this.label.align = "center"; // this.label.stroke = 1; this.label.strokeColor = "#000000"; this.label.zOrder=9980 Laya.stage.addChild(this.label); ...
来源: Laya_社区 发布时间: 20190514