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

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

141. UI-List [ 72%]

....addChild(list); // 设置数据项为对应图片的路径 var data = []; for (var i = 0; i = []; for (var i: number = 0; i < 10; ++i) { data.push("../../res/ui/listskins/1.jpg"); data.push("../../res/ui/listskins/2.jpg"); data.push("../../res/ui/listskins/3.jpg"); data.push("../../res/ui/listskins...

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

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

...ts._elements); allLights = allLights.concat(scene._pointLights._elements); for (let i = 0; i &lt; allLights.length; ++i) { let light = allLights[i]; for (let layer = 0; layer &lt; 32; ++layer) { let layerMask = Math.pow(2,layer); light.active = (camera.cullingMask &amp; layerMask) &amp;&amp; (light....

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

143. 鼠标交互-键盘交互 [ 72%]

...oardInspector() { var numKeyDown = keyDownList.length; var newText = '[ '; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.s...

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

144. bug:laya.Scene.destroy [ 72%]

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

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

145. 1.7.8新版本3d骨骼动画如何获取绑点呢 [ 72%]

...aya.loader.getRes(&quot;res/LayaScene_Fire/Fire.lh&quot;); 先查到节点 for(var i:int = 0;i&lt;ani._avatarNodes.length;i++) { if(AnimationNode(ani._avatarNodes[i]).name == &quot;weaponEffect&quot;) { animationNodeTemp = ani._avatarNodes[i]; break; } } 然后通过loop来设置 effectTemp.transfor...

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

146. 编译的时候报错 [ 72%]

编译的时候报错 Undefined symbols for architecture arm64:   "_OBJC_CLASS_$_conchConfig", referenced from:       objc-class-ref in GameReadingViewController.o   "_OBJC_CLASS_$_conchRuntime", referenced from:       objc-class-ref in GameReadingViewController.o   "_OBJC_IVAR_$_conch...

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

147. 其他引擎的Demo-Example_04 [ 72%]

... { Laya.init(w, h, WebGL); createText(); start(); })(); function start() { for (var i = 0; i w) { stars[i].x = stars[i].x - w; } else if (stars[i].x h) { stars[i].y = stars[i].y - h; } else if (stars[i].y = []; private w:number = Browser.width; private h:number = Browser.height; private slideX:numbe...

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

148. 小米手机三指点击后,后续获得的触摸点失效 [ 71%]

...E_DOWN, this, (data: Laya.Event) =&gt; { let str = ""; if (data.touches) { for (let i = 0; i &lt; data.touches.length; i++) { str += ` {${i} : ${data.touches[i].pos.toString()}}`; } } console.log("drag mouse down", str); }); Laya.stage.on(Laya.Event.MOUSE_UP, this, (data: Laya.Event) =&gt; { let str...

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

149. 关于Button Skin 切图问题 [ 71%]

...rt math from PIL import Image  # if png pngs=[] maxWith = 0 maxHeight = 0 for idx in range(1,4): fname = os.path.join( os.path.curdir, "btn_{0}.png".format(idx)) if os.path.exists( fname) : im=Image.open( fname) pngs.append( im) maxWith = max( maxWith, im.width) maxHeight = max( maxHeight, im.heigh...

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

150. 优化DrawCall--渲染顺序 [ 71%]

...有20个文字跟20张图片,有两种方式 可以实现 第一种就是for 循环 20次 创建 文字跟图片 第二种就是 弄一个文字的容器 在弄一个图片的容器 在for 循环时 把文字 addchild到文字容器, 图片 addchild 图片容器(这样是性能最高的) zho...

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