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

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

181. 本地双击html如何打开laya项目? [ 71%]

...ON_VIEW); File file = new File(filePath); if (file != null && file.length() > 0 && file.exists() && file.isFile()) { i.setDataAndType(Uri.parse("file://" + filePath), "application/vnd.android.package-archive" ); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActiv...

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

182. 请问如何获取MeshSprite3D模型中的点和面信息. [ 70%]

...7:27 你好,我尝试理解了下不知道对不对,【因为positions.length%3!=0,那么如果要表示一个面的话,应该用 positions[0],positions[1],positions[2],第二个面的话是positions[1],positions[2],positions[3]】,直到结尾,面的个数应该是positions.length-2? ym...

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

183. 为什么字符串不能连接? [ 70%]

...; let str:String="#"; for(let i:number=0;i<6;i++){ let index:number=arr.length*Math.random(); str+=arr[index];//在IDE里面这句报错 [ts] Operator '+' cannot be applied to types 'String' and 'String'. } return str; }   2017-11-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

184. DOM元素-表单输入 [ 70%]

...; return input; } function fitDOMElements(){ for (var i = 0; i < arguments.length; i++) { var dom = arguments[i]; Laya.Utils.fitDOMElementInArea(dom, this.form, 100, i * (this.rowSpacing + this.rowHeight), 150, this.rowHeight); } }class DOM_Form{ private form:Laya.Sprite; private rowHeight:number = ...

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

185. Text.as中parseLines方法里的问题 [ 70%]

...text.replace(/\r\n/g, "\n").split("\n"); for (var i:int = 0, n:int = lines.length; i &lt; n; i++) { var line:String = lines[i]; // 开启了自动换行需要计算换行位置 // overflow为hidden需要计算截断位置 if (needWordWrapOrTruncate) parseLine(line, wordWrapWidth); else { _lineWidths...

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

186. VR的demo有没有加载3D场景的啊,实在不知怎么加 [ 70%]

...ull, function(sprite) { //console.log(scene.numChildren+","+sprite._childs.length); setMeshParams(sprite, Laya.StandardMaterial.RENDERMODE_OPAQUE, new Laya.Vector4(3.5, 3.5, 3.5, 1.0), new Laya.Vector3(0.6823, 0.6549, 0.6352), new Laya.Vector2(25.0, 25.0), "TERRAIN"); //setMeshParams(sprite, Laya.St...

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

187. 同时使用雾和粒子系统,粒子的颜色变成雾的颜色 [ 70%]

...#ifdef FOG   vec3 toEye=u_CameraPosition-v_PositionWorld;   float toEyeLength=length(toEye);   toEye/=toEyeLength;      float lerpFact=clamp((toEyeLength-u_FogStart)/u_FogRange,0.0,1.0);   #ifdef ADDTIVEFOG    gl_FragColor.rgb=mix(gl_FragColor.rgb,vec3(0.0,0.0,0.0),lerpFact);   #els...

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

188. laya的socket怎么跟flash的socket不一样 [ 70%]

...2-14 11:49 flash.utils.ByteArray.readBytes(bytes:ByteArray, offset:uint=0, length:uint=0):void 从字节流中读取 length 参数指定的数据字节数。从 offset 指定的位置开始,将字节读入 bytes 参数指定的 ByteArray 对象中,并将字节写入目标 ByteArray 中。 这个...

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

189. DOM元素-表单输入 [ 70%]

...ld(input); return input; } fitDOMElements(){ for (let i = 0; i < arguments.length; i++) { let dom = arguments[i]; Laya.Utils.fitDOMElementInArea(dom, this.form, 100, i * (this.rowSpacing + this.rowHeight), 150, this.rowHeight); } } } new DOM_Form();class DOM_Form{ private form:Laya.Sprite; private r...

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

190. 引擎socket类_onMessage bug [ 70%]

...data);             return;         }         if (this._input.length &gt; 0 &amp;&amp; this._input.bytesAvailable &lt; 1) {             this._input.clear();             this._addInputPosition = 0;         }         var pre: number = this._input.pos;         !this...

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