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

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

631. SCALE_FIXED_WIDTH适配屏幕的问题 [ 67%]

...rowser/6.2 T     代码如下,另附上demo  class Main {         private _roomId = 0;         constructor(roomId?: number) {             this._roomId = roomId;             Laya.init(750, 1218, Laya.WebGL);             Laya.Browser.document.title = 'GG游戏;       ...

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

632. 2D灯光与网格 · LayaAir3.4 · 引擎文档 · LAYABOX [ 67%]

...) mesh1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh2: Laya.Sprite; private light1Render: Laya.FreeformLight2D; private mesh1Render: Laya.Mesh2DRender; private mesh2Render: Laya.Mesh2DRender; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次...

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

633. layaAir如何实现for循环加载多张图片,并且通过事件按比例缩小 [ 67%]

...这样实现了,但觉得不应该这样弄,求指点:         private function showPic():void         {             apesCtn=new Sprite()             Laya.stage.addChild(apesCtn);             for (var i:int = 0; i < 4; i++ )             {   ...

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

634. 文本-多行输入 [ 67%]

...aleMode = "showall"; Laya.stage.bgColor = "#232628"; this.createInput(); } private createInput(): void { var inputText: Input = new Input(); // 移动端输入提示符 inputText.prompt = "Type some word..."; //多行输入 inputText.multiline = true; inputText.wordWrap = true; inputText.size(350, 1...

来源: Laya_示例 发布时间: 20260303

635. UI加载完成后无法获取控件的大小——超详细版问题 [ 67%]

...ypan.vScrollBar.on(Laya.Event.CHANGE, this, this.fitDOMElements_scroll); } private fitDOMElements(a, b, c, d, e, f): void { console.log("----------the event resize-------") console.log("ref-resize:", this.myref.getBounds()); console.log("pan-resize", this.mypan.getBounds()); } private fitDOMElements...

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

636. laya.d3.resource.Texture2D [ 67%]

...Texture2D  onAsynLoaded(url:String, data:*, params:Array):void[override] private Texture2DProtected Methods  MethodDefined By  detoryResource():void[override] 销毁资源。 Texture2D  recreateResource():void[override] 重新创建资源,如果异步创建中被强制释放再创建,则...

来源: laya_api 发布时间: 20170929

637. hitTestPrior点击穿透 [ 67%]

...200); spchild.on(Event.CLICK,this,onClickSpChild); sp.addChild(spchild); } private function onClickSpChild(e:Event):void { e.stopPropagation(); trace("child"); } private function onClickSp(e:Event):void { trace("sp"); } } } 2017-09-18 1 4 分享 微博 QZONE 微信 lllzzz6311 赞同来自: 怎样才...

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

638. 为什么字符串不能连接? [ 67%]

为什么字符串不能连接? private getRandomColor():String { let arr:Array<String>=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; let str:String="#"; for(let i:number=0;i<6;i++){ let index:number=arr.length*Math.random(); str+=arr[index];//在IDE里面这句报...

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

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

..."#1b2436"; //创建缓动文本 this.createTween(); } //创建缓动文本 private createTween():void{ //"LayaBox字符串总宽度" var w:number = 800; //文本创建的起始位置(>>在此使用右移运算符,相当于/2 用>>效率更高) var offsetX:number = Laya.stage.width - w >> 1; //显...

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

640. LayaFlash如何使用chrome调试问题? [ 67%]

... { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(event:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSize(960, 640); //2D项目中设置场景尺寸 IFlash.setOrientationEx(1); //是否为横屏模式 IFlash.setBgcolor...

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