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

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

111. [laya2.4] 关于代码压缩后let变量重复定义问题 [ 82%]

...item, value) { if (progress != null) { item.progress = value; var num = 0; for (var j = 0; j < items.length; j++) { var item1 = items[j]; if (item1) { let prog = item1.progress == undefined ? 0 : item1.progress; num += item1.size == undefined ? 0 : item1.size * prog; } } var v = num / totalSize; ...

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

112. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 81%]

...clickHandler = new Handler(this,OnShow); // aa.dataSource = {text:"mmmm"}; for(var i:int = 0;i<100;i++){ var img:Image = TestScrollImage(); img.pos(100+i*10,100+i+10); this.addChild(img); } } private function TestScrollImage():Image{ var img:Image = new Image("comp/image.png"); img.scrollRect = n...

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

113. 同一个Graphics里面绘制超过20000个矢量rect的情况下,Uncaught Error: IBQuadrangle count [ 81%]

...但是好像没有效果 var a:Sprite = new Sprite(); var count:int = 0; for(var i:int=0; i<200; i++) { for(var j:int=0; j<100; j++) { if(count == 10000) { var htmlCanvas:HTMLCanvas = a.drawToCanvas(width,height,0,0); var texture:Texture = new Texture(htmlCanvas); var b:Sprite = new Sprite(); ...

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

114. 同一个Graphics里面绘制超过20000个矢量rect的情况下,Uncaught Error: IBQuadrangle count [ 81%]

...但是好像没有效果 var a:Sprite = new Sprite(); var count:int = 0; for(var i:int=0; i<200; i++) { for(var j:int=0; j<100; j++) { if(count == 10000) { var htmlCanvas:HTMLCanvas = a.drawToCanvas(width,height,0,0); var texture:Texture = new Texture(htmlCanvas); var b:Sprite = new Sprite(); ...

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

115. 关于对象池Laya.Pool的用法 [ 81%]

...var SPRITE_SIGN = 'spriteSign'; var sprites = []; function initialize() { for (var i = 0; i < 1000; i++) { var sp = Pool.getItemByClass(SPRITE_SIGN, Sprite) sprites.push(sp); Laya.stage.addChild(sp); } } initialize(); Laya.stage.on("click", this, function() {     var sp;     for(var i...

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

116. 3D粒子特效第一次卡顿最终解决方案 [ 81%]

...._defineDatas.value;var publicDefine:number=0;var materialDefine:number=0; for (var i: number = 0; i < materials.length; i++) {                 var mater: Laya.ShurikenParticleMaterial = materials[i] as Laya.ShurikenParticleMaterial;              var marData:any = mate...

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

117. 请问我看错了吗??文档问题 [ 81%]

...esouList) { var tempResouList:Vector.<Resource> = resouList.slice(); for (var i:int, n:int = tempResouList.length; i < n; i++) { res = tempResouList[i]; if (!res.lock && res._referenceCount === 0) res.destroy(); } } } else { for (var k:String in _idResourcesMap) { res = _idResources...

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

118. bug:laya.Scene.destroy [ 81%]

bug:laya.Scene.destroy var list=laya.display.Scene.unDestroyedScenes; for (var i=0,n=list.length;i < n;i++){//这里缓存了长度,但是在 __proto.destroy=function(destroyChild){ (destroyChild===void 0)&& (destroyChild=true); this._idMap=null; _super.prototype.destroy.call(this,dest...

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

119. 3d下阴影渲染问题求解 [ 81%]

...oolBox,boxSize){ // var i = Math.random()*10; // var j = Math.random()*10; for (var i = 0; i < 10; i++) { for (var j = 0; j < 10; j++) { // var box = parent.addChild(new Laya.MeshSprite3D(new Laya.PlaneMesh(boxSize,boxSize,2,2))); var box = parent.addChild(new Laya.MeshSprite3D(new Laya.BoxMes...

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

120. 混合模式-Lighter [ 80%]

...Height * scaleFactor) / 2; } function createAnimation() { var frames = []; for (var i = 1; i > 16); result.push(color >> 8 & 0xFF); result.push(color & 0xFF); return result; } function onTweenComplete() { evalBgColor(); } function renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRec...

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