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

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

71. 和原生Dom交互 · LayaAir3.4 · 引擎文档 · LAYABOX [ 53%]

... window.onclick = function() { // Fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // This gives us the actual ArrayBuffer that contains the data var nowBuffering = myArrayBuffer.getChannelData(channel); for (var i ...

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

72. 动态加载的 animation第二次加载的时候不显示 [ 53%]

... if (i!=whichistrue) { aniname="lose_1_"+aniname+".ani"; } else { ran=Math.random(); aniname="win_1_"+aniname+".ani"; } item.loadAnimation(aniname); item.x=60+(i-1)*120; item.y=y; item.size(80,80); item.name=aniname; this.doworkui.addChild(item);   2017-11-06 0 0 分享 微博 QZONE 微信 ysshao ...

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

73. 关于缓动函数from的一些问题记录 [ 52%]

...function changeColor(text){ console.log("update"); var c = Math.floor(Math.random()*4); console.log(c); switch(c) { case 0:text.color='red';break; case 1:text.color="blue";break; case 2:text.color ='black';break; case 3:text.color = 'green';break; case 4:text.color = "yellow";break; } console.log(te...

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

74. 请问代码有缓存怎么办,更新出去的代码,浏览器没有更新到 [ 52%]

...ei - as3、as2、h5 赞同来自: <script src='LayaSample.max.js?'+Math.random() loader='laya'></script> 我是在后面加个随机数,这样能看到更新的laya js,如果更新同名图片,在loadImg时在图片后面加个图片版本号“图片url?v=”+imgVersion,每次...

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

75. iOS平台,WiFi连网正常,4G下经常失败 [ 50%]

... = (yield asyncs.downloadSync(urlpath + 'update/assetsid.txt?rand=' + Math.random() * Date.now(), false, null)); console.log("assetsid old:" + curassets + " new:" + assetsidStr); if (!assetsidStr) { if (curassets && curassets != "") { if (window["onLayaInitError"]) { isDccOk = false; window[...

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

76. 2D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 49%]

...(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).toFixed(0); this.text.color="#CCCCCC"; this.text.x=Math.random()*550; this.text.y=Math.random()*400; textBox.addChild(this.text); } Laya.stage.addChild(textBox); } } 下面是笔者电脑上的运行时截图,...

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

77. dcc和cdn的问题 [ 49%]

...更新了,会自动给文件加版本号:res.cdn.xxx/res/a.png?v=Math.random 这种方式么,这种好像只能破坏本地缓存,无法破坏节点缓存吧? 麻烦给个详细解释,感谢!

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

78. 分享:Sprite 转换成3D贴图(Texture2D)的方法,如果有更好的方法,请告诉我。 [ 47%]

...r texture2D:Texture2D = new Texture2D(); texture2D["onAsynLoaded"](""+Math.random(),texture.bitmap); createTextureCallBack.call(callbackThis,texture2D); }3. 最终的调用: public function init(){ var s:sprite = create_a_big_sprite(); Laya.timer.once(250,this,function():void{ GameUtil.createTextu...

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

79. webgl 下当对象子显示对象存在panel且panel有子集时,旋转此显示对象会导致此显示对象的同级对象消失!(1.7.10beta) [ 45%]

...会导致显示异常,其他child消失 parent.child_1.rotation = Math.random() * 180; } } class ChildView extends ui.ChildViewUI{ constructor(){ super(); var panel = new Laya.Panel(); panel.pos(0,0); panel.size(200,50); this.addChild(panel); var panelChild = new Laya.Sprite(); panelChild.pos(0,0)...

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

80. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 45%]

...个素材是 32 * 20 拼起来的 this.y = 32 * 6 + 32 * parseInt(8 * Math.random()); if(this.bg == null){ //贴图纹理 this.bgTexture = Laya.loader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 ...

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