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

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

331. Native下http请求,Error事件中的error对象错误码全都是404 [ 77%]

...d, $responseType, $headers); private function onHrCompleteHandler():void { if(this.completeHandler) { this.completeHandler.runWith(this.hr.data); } } private function onHrErrorHandler($error:String):void { if(this.errorHandler) { this.errorHandler.runWith($error); } } 其中就是这个$error,在...

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

332. 分享一个Graphics画圆角矩形的封装 [ 77%]

...number, fillColor: any, lineColor?: any, lineWidth?: number):void {     if(this instanceof Laya.Graphics == false ){ return; }     let sideMin:number = width<=height ? width : height;     if(round<0){ round=0; }else if(round>sideMin/2){ round=sideMin/2; }     this.drawPath(x, y,...

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

333. LayaAir开发笔记(1)五十音图连连看 [ 77%]

... * i, 130 + 140 * j); card[index].on(Laya.Event.CLICK, this, function(e) { if (gameStatue == true) { if ((card_A == -1) && (card_B == -1)) { card_A = e.target.name; button[card_A].color = "red"; } else if ((card_A != -1) && (card_B == -1)) { card_B = e.target.name; if ((g_list_A.inde...

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

334. 怎么清理掉 Sprite3D 相关的缓存资源, 资源destroy后内存还下降、。 [ 77%]

... function destroy(destroyChild:Boolean = true):void {             if(effect3D != null){                 effect3D.destroy();                 effect3D = null;             }             super.destroy(true);             Laya.loader.clearRes(thi...

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

335. 使用百度地图显示当前位置(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 77%]

...换为百度坐标 private function convertToBaiduCoord(data:*):void { if (data.status == 0) { var position:* = data.points[0]; // 设置标注物位置 marker.setPosition(position);   map.panTo(position); } } ``` 在转换完成后设置标注物的位置,并且把视角平移到以标...

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

336. LayaAir引擎1.7 之后as转换js,出现问题 [ 77%]

...public function set visible(value:Boolean):void  { super.visible = value; if (value) _mcAni.removeFromParent(); }   1.7之后的转换 __getset(0,__proto,'visible',function(){ return Laya.superGet(SwatAniUI,this,'visible'); },function(value){ Laya.superSet(SwatAniUI,this,'visible',value); if (valu...

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

337. getimagedata直接调用无法获取有效像素问题 [ 77%]

...tpixels 得到有效数据。__proto.getPixels=function(x,y,width,height){ if (Render.isWebGL){ return RunDriver.getTexturePixels(this,x,y,width,height); }else { Browser.canvas.size(width,height); Browser.canvas.clear(); Browser.context.drawTexture(this,-x,-y,this.width,this.height,0,0); var info=Br...

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

338. 设置cacheAs = bitmap时, drawCanvas 的一个bug [ 77%]

...: HTMLCanvas, x: number, y: number, width: number, height: number): void { if (!canvas) return; var src: Context = canvas.context as Context; var submit: ISubmit; if (src._targets) { //生成渲染结果到src._targets上 /* this._submits[this._submits._length++] = SubmitCanvas.create(src, 0, null);...

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

339. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 77%]

...tPixel(_tex); /************调用该方法导致内存泄漏*************/ if(pixelCount / _initPixelCount < 0.3) { trace("remove"); _htmlCanvas.clear(); _htmlCanvas.destroy(); _tex.destroy(); _colorSpr.off(Event.MOUSE_MOVE, this, __moveHandler); } } private function getPixel(tex:Texture):int { v...

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

340. 加载-加载序列 [ 77%]

...xture) { console.log(texture.source); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } })();module laya { import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_Sequence { private numLoaded: number = 0; p...

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