大约有 683 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0059 秒)
Laya_社区(327) Laya3.0_api(89) Laya2.0_api(69) Laya2.0_文档(65) laya_api(61) Laya3.0_文档(38) Laya2.0_示例(19) Laya_示例(15)
...被触发 //设置背景图片 this.bgimg = new Laya.Sprite(); this.bgimg.width=2*scronw; this.bgimg.height=2*scronh; //加载显示图片,坐标位于0,0 var temptexture=Loader.getRes(pic); if (typeof(temptexture)!="undefined"){ this.bgimg.texture=Loader.getRes(pic) }else{ this.bgimg.loadImage(pi...
来源: Laya_社区 发布时间: 20171024
...nstance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('comp/button.png'); button.label='Hello World!'; button.name = Laya.Dialog.CLOSE; button.width=26...
来源: Laya_社区 发布时间: 20190117
...,此方法只执行一次 onAwake(): void { this.fontclp.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.fontclp.size(500, 60); //大小 this.fontclp.pivot(this.fontclp.width/2, this.fontclp.height/2); //轴心点 this.fontclp.skin = "atlas/comp/fontClip_num.png"; thi...
来源: Laya3.0_文档 发布时间: 20230901
...此方法只执行一次 */ 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_文档 发布时间: 20230629
...移运算符,相当于/2 用>>效率更高) var offsetX:int = Laya.stage.width - w >> 1; //显示的字符串 var demoString:String = "LayaBox"; var letterText:Text; //根据"LayaBox"字符串长度创建单个字符,并对每个单独字符使用缓动动画 for (var i:int = 0, len:int = demoSt...
来源: Laya2.0_文档 发布时间: 20210715
...加了 let htmlC: HTMLCanvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0); if (htmlC) { htmlC.toBase64("image/jpeg", 0.3, (base64) => { htmlC.releaseResource(true); ...
来源: Laya_社区 发布时间: 20200511
...行依据游戏设计尺寸来调节。 Laya.Browser.window.sharedCanvas.width = 667; Laya.Browser.window.sharedCanvas.height = 1334; 2019-01-11 1 2 分享 微博 QZONE 微信 相识不弃 赞同来自: LayaAir 1.7.19.1 beta用最新版本的引擎 2019-01-09 0 0 分享 微博 QZONE 微信 为什...
来源: Laya_社区 发布时间: 20190109
...种是绝对定位,一种是相对定位 绝对定位时,可以使用width,height,x,y 相对定位时,在某些情况下不是很好用 比如说,我有一个按钮,宽高是固定的,100*100,这时我相对于上级的坐标希望是相对位置,right=0,top=0,表示右上...
来源: Laya_社区 发布时间: 20170217
...运算符,相当于/2 用>>效率更高) var offsetX:number = Laya.stage.width - w >> 1; //显示的字符串 var demoString:string = "LayaBox"; var letterText:Laya.Text; //根据"LayaBox"字符串长度创建单个字符,并对每个单独字符使用缓动动画 for(var i:number = 0,len:number...
来源: Laya2.0_文档 发布时间: 20210715
...ntSize属性的值设为36,align选择为center,调整Lebel的宽高,width为 150,height为60(读者也可以自行修改面板数值或在画布中用鼠标拉伸调整)在<其他>标签中设置bgColor值为#e7c5c5,borderColor设置为#000000(标签边框设为黑色),ita...
来源: Laya_社区 发布时间: 20171222