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

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

121. 动画-新版骨骼动画 [ 77%]

...名称播放动画 zombieAnimator.play(clipName[++curStateIndex % clipName.length]); }); })); }class SkinAnimation_New { private changeActionButton: Laya.Button; private zombieAnimator: Laya.Animator; private curStateIndex: number = 0; private clipName: Array = ["walk", "attack", "left_fall", "right...

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

122. UI-RadioGroup [ 77%]

...} private initRadioGroups(): void { for (var i: number = 0; i < this.skins.length; ++i) { var rg: RadioGroup = this.createRadioGroup(this.skins[i]); rg.selectedIndex = i; rg.x = i * this.SPACING + this.X_OFFSET; rg.y = this.Y_OFFSET; } } private createRadioGroup(skin: string): RadioGroup { var rg: R...

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

123. 分享:List相关(Item增删功能) [ 76%]

...引不再可索引范围,则终止该函数 if(index&lt;0||index&gt;arr.length)return; var data:Object=arr[index];//获取当前渲染条目的数据 var clip:Clip=cell.getChildByName("clip") as Clip;//获取当前渲染条目的clip组件 var check:CheckBox=cell.getChildByName("check") as CheckBo...

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

124. UI-Input [ 76%]

... } private onLoadComplete(): void { for (var i: number = 0; i < this.skins.length; ++i) { var input: TextInput = this.createInput(this.skins[i]); input.prompt = 'Type:'; input.x = (Laya.stage.width - input.width) / 2; input.y = i * this.SPACING + this.Y_OFFSET; } } private createInput(skin: string):...

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

125. 动画实例在调用含有名字参数的时候获取不到边界 [ 76%]

....enemyUnit[i]); } this.enemyUnitReady+=1; } private aniUrls(aniName:string,length:number):any{ var urls:any = []; for(var i:number = 0;i&lt;length;i++){ //动画资源路径要和动画图集打包前的资源命名对应起来 urls.push(&quot;character/m1/&quot;+aniName+i+&quot;.png&quot;); } retur...

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

126. 用iframe内嵌网页及适配 [ 76%]

...Laya.init(720, 1280); String.prototype.format = function() { if (arguments.length == 0) { return this; } for (var str = this, index = 0; index &lt; arguments.length; ++index) { str = str.replace("{" + index + "}", arguments[index]); } return str; }; var iframe = laya.utils.Browser.window.document.cr...

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

127. 对象池 · LayaAir3.0文档 · LAYABOX [ 76%]

..."Bullet"); // 查看当前对象池内对象数量 console.log( bulletPool.length ); if( bulletPool.length == 0 ) { // 把子弹放入对象池 pool.push( new Bullet() ); } 2.2 清理一个对象池 /** * 清除对象池的对象。 * @param sign 对象类型标识字符。 */ static clearBySign(sig...

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

128. 材质-BlinnPhong-高光贴图 [ 76%]

...At(0); for (var i = 0; i < skinnedMeshSprite3d.skinnedMeshRender.materials.length; i++) { var mat = skinnedMeshSprite3d.skinnedMeshRender.materials[i]; //高光贴图 mat.specularTexture = Laya.Texture2D.load(this.specularMapUrl[i]); } Laya.timer.frameLoop(1, this, function () { dude1.transform.rota...

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

129. 材质-BlinnPhong-法线贴图 [ 76%]

...ew Laya.Vector3(0.002, 0.002, 0.002); for (var i = 0; i < monster2._childs.length; i++) { var meshSprite3D = monster2._childs[i]; var material = meshSprite3D.meshRender.material; //法线贴图 material.normalTexture = Laya.Texture2D.load(this.normalMapUrl[i]); } Laya.timer.frameLoop(1, this, functi...

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

130. WebSocket connection to 'ws://192.168.0.8:8102/' failed: Invalid frame header [ 76%]

...ou are trying to send If it's larger than 125 bytes you need to encode the length in a different manner i.e you must take the extended payload length into consideration. – Cyclonecode Jul 7 '15 at 10:22 Right, of course, so i need to use the next two (or eight) bytes to store the length instea...

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