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

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

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

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

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

12. 2D物理-桥 [ 68%]

...et width = 20, height = 2.5; for (let i = 0; i { let targetX = (300 + Math.random() * 400) / Laya.Physics.PIXEL_RATIO, targetY = 500 / Laya.Physics.PIXEL_RATIO; let newBall = new Laya.Sprite(); Laya.Laya.stage.addChild(newBall); let circleBody = newBall.addComponent(Laya.RigidBody); circleBody.bulle...

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

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

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

14. drawTexture 画出来的数据会有以前的数据 [ 58%]

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

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

...个素材是 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

16. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

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

17. 缓动动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 49%]

... * txt 缓动对象 */ function updateColor(txt){ var c = 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; } } /** * 缓动完成后的回调方法 * txt ...

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

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

...*/ 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; } } /** * 缓动完成后的回调方法 * txt...

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

19. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 47%]

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

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

20. 2D性能优化 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...(var i=0;i&lt;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