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

大约有 683 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0059 秒)

451. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 65%]

...被触发 //设置背景图片 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

452. LayaBox HelloWorld实战 [ 65%]

...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

453. 字体切片组件 · LayaAir3.0文档 · LAYABOX [ 65%]

...,此方法只执行一次 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

454. 多行输入文本组件 · LayaAir3.0文档 · LAYABOX [ 64%]

...此方法只执行一次 */ 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

455. 缓动动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 64%]

...移运算符,相当于/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

456. drawToCanvas内存泄漏 [ 64%]

...加了    let htmlC: HTMLCanvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 00);         if (htmlC) {             htmlC.toBase64("image/jpeg", 0.3, (base64) => {                 htmlC.releaseResource(true);          ...

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

457. 微信小游戏好友排行模糊 [ 64%]

...行依据游戏设计尺寸来调节。 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

458. 关于UI编辑器的小建议 [ 64%]

...种是绝对定位,一种是相对定位 绝对定位时,可以使用width,height,x,y 相对定位时,在某些情况下不是很好用 比如说,我有一个按钮,宽高是固定的,100*100,这时我相对于上级的坐标希望是相对位置,right=0,top=0,表示右上...

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

459. 缓动动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 64%]

...运算符,相当于/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

460. 【分享】[UI组件专题] Label 与 Button (附:九宫格,九妹图) [ 64%]

...ntSize属性的值设36,align选择center,调整Lebel的宽高,width 150,height60(读者也可以自行修改面板数值或在画布中用鼠标拉伸调整)在<其他>标签中设置bgColor值#e7c5c5,borderColor设置#000000(标签边框设黑色),ita...

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