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

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

911. 屏幕适配-缩放-Extract Fit [ 82%]

...olor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPos(): void { this.rect.x = Laya.stage.width / 2; this.rect...

来源: Laya2.0_示例 发布时间: 20260303

912. 屏幕适配-缩放-Show All [ 82%]

...olor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPos(): void { this.rect.x = Laya.stage.width / 2; this.rect...

来源: Laya2.0_示例 发布时间: 20260303

913. laya.physics.BoxCollider [ 82%]

... Public Methods Show Inherited Public Methods MethodDefined By destroy():void 销毁组件 Component onReset():void 重置组件参数到默认值,如果实现了这个函数,则组件会被重置并且自动回收到对象池,方便下次复用 如果没有重置,则不进行回收复用...

来源: Laya2.0_api 发布时间: 20190513

914. WebSocket通信 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

...//组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注册事件监听 this.socket.on(Laya.Event.OPEN, this, this.onSocketOpen); this.socket.on(Laya.Event.MESSAGE, this, this.onMessageReceived); this.socket.on(Laya.Event.CLOSE, this, ...

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

915. laya.maths.Point [ 82%]

...Number 计算当前点和目标点(x,y)的距离。 Point  normalize():void 标准化向量。 Point  recover():void 回收到对象池,方便复用 Point  reset():Point 重置 Point  setTo(x:Number, y:Number):Point 将 Point 的成员设置为指定值。 Point  toString():String返...

来源: Laya2.0_api 发布时间: 20190513

916. list里面可以加入多个view吗? [ 82%]

...er.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { list=new List(); Laya.stage.addChild(list); list.itemRender=Item; list.repeatX=1; list.repeatY=6; list.x=((Laya.stage.width-Item.WID)/2); list.y=((Laya.stage.height-Item.HEI*list.repeatY)/2); list.vScrollBarSkin="comp/...

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

917. laya.sprite精灵无缝拼接地图,会出现黑线跟白线,使用laya的2.0.1beta版本 [ 82%]

...ctor() { super(); }  loadImageAndPos(name:string,posX:number,posY:number):void { this.name = name; this.anchorX = 0; this.anchorY = 0; this.x = posX; //这里是256*整数倍的叠加 每张图片都是256*256大小的地图块 this.y = posY; //这里是256*整数倍的叠加 每张图片都是256*...

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

918. laya.net.URL_API3.0 [ 81%]

...式化后的地址。 Returns string Methods Static __init__ __init__(): void Defined in laya/net/URL.ts:31 Returns void Static customFormat customFormat(url: string): string Defined in laya/net/URL.ts:70 自定义URL格式化的方式。例如: customFormat = function(url:String):String{} Paramet...

来源: Laya3.0_api 发布时间: 20231115

919. laya.d3.resource.SolidColorTexture2D [ 81%]

...olidColorTexture2DProtected Methods  MethodDefined By  detoryResource():void[override] 销毁资源。 SolidColorTexture2D  recreateResource():void[override] 重新创建资源,如果异步创建中被强制释放再创建,则需等待释放完成后再重新加载创建。 SolidColorTextur...

来源: laya_api 发布时间: 20170929

920. laya.map.TiledMap [ 81%]

... changeViewPort(moveX:Number, moveY:Number, width:Number, height:Number):void 改变视口大小 TiledMap  changeViewPortBySize(width:Number, height:Number, rect:Rectangle = null):Rectangle 在锚点的基础上计算,通过宽和高,重新计算视口 TiledMap  createMap(mapName:String, vi...

来源: laya_api 发布时间: 20170929