在WebGL场景中管理多个卡牌对象的实验 (2)

1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>第二个场景测试,手牌的显示、排列、分组排序,显示瓷砖地面</title> 6 <link href="../CSS/newland.css" rel="stylesheet"> 7 <link href="../CSS/stat.css" rel="stylesheet"> 8 <script src="../JS/LIB/babylon.32.all.maxs.js"></script> 9 <script src="../JS/LIB/stat.js"></script> 10 <script src="../JS/MYLIB/Events.js"></script> 11 <script src="../JS/MYLIB/FileText.js"></script> 12 <script src="../JS/MYLIB/newland.js"></script> 13 <script src="../JS/MYLIB/View.js"></script> 14 <script src="../JS/PAGE/Game.js"></script> 15 <script src="../JS/PAGE/Character.js"></script> 16 <script src="../JS/PAGE/Control20180312.js"></script> 17 <script src="../JS/PAGE/Moves.js"></script> 18 <script src="../JS/PAGE/DrawCard.js"></script> 19 <script src="../JS/PAGE/tab_carddata.js"></script> 20 <script src="../JS/PAGE/tab_somedata.js"></script> 21 <script src="../JS/PAGE/HandleCard2.js"></script> 22 <script src="../JS/PAGE/FullUI.js"></script> 23 </head> 24 <body> 25 <div id="div_allbase"> 26 <canvas id="renderCanvas"></canvas> 27 <div id="fps" style="z-index: 301;"></div> 28 </div> 29 </body> 30 <script> 31 var VERSION=1.0,AUTHOR="lz_newland@163.com"; 32 var machine,canvas,engine,scene,gl,MyGame={}; 33 canvas = document.getElementById("renderCanvas"); 34 engine = new BABYLON.Engine(canvas, true); 35 engine.displayLoadingUI(); 36 gl=engine._gl;//决定在这里结合使用原生OpenGL和Babylon.js; 37 scene = new BABYLON.Scene(engine); 38 var divFps = document.getElementById("fps"); 39 40 var MyGame={}; 41 window.onload=beforewebGL; 42 function beforewebGL() 43 { 44 if(engine._webGLVersion==2.0)//输出ES版本 45 { 46 console.log("ES3.0"); 47 } 48 else{ 49 console.log("ES2.0"); 50 } 51 MyGame=new Game(0,"first_pick","",":8082/");//建立MyGame对象用来进行全局调度 52 /*0-startWebGL 53 * */ 54 webGLStart(); 55 }
。。。
56 </script> 57 </html>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsxyxg.html