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

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

141. 如何清除graphics绘制的矢量图 [ 85%]

...           sp.graphics.clear();                 if (count1 == 0) {                     sp.graphics.drawLines(0, 0, path, "#0eff00", 5);                 } else if (count1 == 1) {                     sp.graphics.drawLin...

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

142. LayaBox进阶之UI管理类 [ 85%]

...(clazz: any, view:Laya.Node):void{ let v: Laya.Node = this.getView(clazz); if(!v){ let uiData = {clazz: clazz, view: view}; this.uiList.push(uiData); } }首先判断本地缓存有没有,有的话 不处理,没得话,创建,push到数组中 private getView(clazz: any):Laya.Node{ for(let i:nu...

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

143. Laya2D碰撞问题 [ 85%]

...igidBody['objs'].length; i++) { const element = Laya.RigidBody['objs'][i]; if(element) if(element.owner){ if(element.owner.getComponent(Laya.CircleCollider)){return} if(element.owner.getComponent(Laya.BoxCollider)){ element['_sysPosToPhysic'](); element.owner.getComponent(Laya.BoxCollider)['resetSha...

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

144. [LayaAirIDE3]时间轴动画调了材质引用类型的属性,调用play()接口切状态的时候调用_revertDefaultKeyframeNodes报材质属性空 [ 85%]

...._keyframeNodeOwnerMap[fullPath];         let mat = false;         if (keyframeNodeOwner) {             keyframeNodeOwner.referenceCount++;             clipOwners[nodeIndex] = keyframeNodeOwner;         } else {             var property = propertyOwner;           ...

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

145. emoji表情文字乱码 [ 85%]

...         var code = str.charCodeAt(idx);             if (code >= 0xD800 && code <= 0xDBFF) {                 this._words.push(character + str.charAt(++idx));             } else {                 this._words.push(character...

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

146. BUG:Sprite.event() [ 85%]

...,会报错,我看了编译后的JS代码,的确有问题,data.unshift没有判断是否是数组 if (this.method==null)return null; var id=this._id; if (data==null) var result=this.method.apply(this.caller,this.args); else if (!this.args && !data.unshift)result=this.method.call(this....

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

147. 深入理解LayaAir引擎架构和实现原理(一)跨平台引擎源码编译 [ 85%]

...ublish.js脚本中也做同样的事情就好。 public.bat[code]@echo off if exist ..\..\build ( rmdir /s/q ..\..\build ) if exist ..\..\bin\tsc\layaAir ( rmdir /s/q ..\..\bin\tsc\layaAir ) node index.js cd ..\ gulp build @pause 复制代码[/code] 查看代码易知,在编译前,会先删除bu...

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

148. 字节平台(抖音预览调试),因为一行代码导致无法启动问题 [ 85%]

...到字节是正常的。 public static deepCopy<T>(instance: T): T { if (instance == null) { return instance } if (instance instanceof Date) { return new Date(instance.getTime()) as any } if (instance instanceof Array) { var cloneArr = [] as any[] ;(instance as any[]).forEach((value) => { c...

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

149. 缓存清除方法clearTextureRes [ 85%]

...Loader.getRes(arr[0]):laya.net.Loader.getRes(url);             if (res.bitmap){                 if (Render.isConchApp){                     if (res.bitmap.source.releaseTexture){                         res.bitmap.source.release...

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

150. Laya2自动同步cullingMask方案以及灯光裁剪补丁 [ 85%]

...数中,this._prepareCameraToRender();这一行后面添加如下代码 if(this._scene.lightCullingMask && this._scene.lightCullingMask instanceof Function){this._scene.lightCullingMask(scene,this);} 3、对想要开启灯光裁剪的场景调用 LightCullingMask.enableLightCullingMask(scen...

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