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

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

91. 分享,扩展Laya.Text组件实现简单的富文本 [ 28%]

...overflow != Text.VISIBLE) { var func = this.overflow == Text.HIDDEN ? Math.floor : Math.ceil; lineCount = Math.min(lineCount, func((this.height - this.padding[0] - this.padding[2]) / (this.leading + this._charSize.height))); }; var startLine = this.scrollY / (this._charSize.height + this.leading) | ...

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

92. 缓动动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 27%]

...动对象 */ private updateColor(txt:Laya.Text):void{ var c:number = Math.floor(Math.random()*3); switch (c) { case 0: txt.color = "#eee000"; break; case 1: txt.color = "#ffffff"; break; case 2: txt.color = "#ff0000"; break; default: txt.color = "#eee000"; break; } } /** * 缓动完成后的回调...

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

93. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 26%]

...就是面向对象编程的魔力。   谢谢~~~ 下节将会开始讲解 Floor 和 MapFloor 也就是地板的制作方式   PS:附件是这一节的源码     附件 : --> LayaAir_简单跑酷JS版_-_01-添加场景背景.zip 2016-07-22 3 条评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

94. socket大型项目回调 [ 25%]

...); if (id) { // 7.x do { var tmp:number = id % 128; var next:number = Math.floor(id / 128); if (next != 0) { tmp = tmp + 128; } buffer.writeByte(tmp); id = next; } while (id != 0); // 5.x // var len:Array = []; // len.push(id & 0x7f); // id >>= 7; // while(id > 0) // { // len.push(id &a...

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

95. 缓存工具-layadcc · LayaAir3.4 · 引擎文档 · LAYABOX [ 25%]

...rl, localfile, (total, now, speed) => { console.log(`downloading:${Math.floor((now / total) * 100)}`) return false;0 }, (curlret, httpret) => { if (curlret != 0 || httpret < 200 || httpret >= 300) { resolve(null); } else { resolve(localfile); } }, 10, 100000000); } ); } let zipfile = awa...

来源: Laya3.0_文档 发布时间: 20251010

96. 3D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 25%]

...Position(positionRanvge); //随机一个颜色索引 let colorIndex = Math.floor(Math.random() * this._colorNums); //设置节点的 Laya.ENodeCustomData.custom_0 为对应的颜色索引 render.setNodeCustomData(Laya.ENodeCustomData.custom_0, colorIndex); } } private _getRandomPosition(positionRanv...

来源: Laya3.0_文档 发布时间: 20251010

97. 3D灯光与阴影 · LayaAir3.4 · 引擎文档 · LAYABOX [ 24%]

...Z值会影响Cluster接受区域光(点光、聚光)影响的数量,Math.floor(2048 / lightClusterCount.z - 1) * 4 为每个Cluster的最大平均接受区域光数量,如果每个Cluster所接受光源影响的平均数量大于该值,则较远的Cluster会忽略其中多余的光照影响。...

来源: Laya3.0_文档 发布时间: 20251010

98. LAYABOX游戏实时语音之APP版本 [ 23%]

...var str = ''; for (var i = 0; i < len; i++) { str += $chars.charAt(Math.floor(Math.random() * maxPos)); } return str;; } class LoginView extends ui.LoginUI { constructor() { super(); this.login.on(Laya.Event.CLICK, this, this.Loginyim); this.joinroom.on(Laya.Event.CLICK, this, this.JoinRoom); thi...

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

99. 运行配置 · LayaAir3.4 · 引擎文档 · LAYABOX [ 15%]

...集群区域能够容纳的最大区域光源数量,计算公式为 Math.floor(2048 / lightClusterCount.z - 1) * 4。 这些集群参数会被用于多个关键环节:在初始化阶段创建 Cluster 实例和相应的纹理缓冲区;在运行时根据相机参数动态计算集群平面位置...

来源: Laya3.0_文档 发布时间: 20251231