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

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

1. 渲染性能实例问题 [ 100%]

...ew Laya.Sprite();for(var i=0;i<10000;i++){txt=new Text();txt.text=(Math.random()*100).toFixed(0);txt.color="#CCCCCC";txt.x=Math.random()*550;txt.y=Math.random()*400;textBox.addChild(txt);}Laya.stage.addChild(textBox); 附件 : --> 2019-05-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

2. 3D网格添加刚体后设置欧拉角出现位置错误 [ 84%]

...         //设置旋转角度         this.tmpVector.setValue(Math.random() * 360, Math.random() * 360, Math.random() * 360);         box.transform.rotationEuler = this.tmpVector;         //设置掉落位置         this.tmpVector.setValue(-2, 2, -2);         box.transform.p...

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

3. toFixed(0)函数是什么作用? [ 81%]

...什么作用? text = new Text(); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#CCCCCC"; 2018-03-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个...

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

4. LayaAir开发笔记(1)五十音图连连看 [ 74%]

...假名和片假名,然后用g_list_C作为索引,每次开始时用GetRandomNum把索引打乱,然后随便取12的平假名和12个片假名进行初始排名,开始执行timer计时器。注意,一定要用个gameStatue变量来控制游戏状态,否则不点开始就可以点卡片了...

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

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

...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

6. drawTexture 画出来的数据会有以前的数据 [ 60%]

...ent.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.timer.frameLoop(10,this,refresh); } private function refresh():void { IconSpr.graphics.clear(); iconSpr.graphics.clear(); if(htmlCanvas) htmlCan...

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

7. 【简单跑酷--JS版】---Lv.6 终篇 [ 59%]

...个素材是 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_社区 发布时间: 20160803