Adem Posted December 20, 2016 Share Posted December 20, 2016 Hello guys, i want to create a scoreboard with div in babylonjs, can u give me a sample, this is my code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Babylon.js sample code</title> <!-- Babylon.js --> <script src="http://www.babylonjs.com/hand.minified-1.2.js"></script> <script src="http://www.babylonjs.com/cannon.js"></script> <script src="http://www.babylonjs.com/oimo.js"></script> <script src="http://www.babylonjs.com/babylon.js"></script> <style> html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; } #renderCanvas { width: 100%; height: 100%; touch-action: none; } #ammoLabel { position:absolute; top:20px; left : 20px; color:green; font-size: 2em; } </style> </head> <body> <div id="scoreBoard">Score: 3</div> Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 20, 2016 Share Posted December 20, 2016 https://pryme8.github.io/LSBAG/ Look at the UI overlay. Adem 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 20, 2016 Share Posted December 20, 2016 un-related, but do you really want to load both cannon & oimo? Adem 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 20, 2016 Share Posted December 20, 2016 me or him? If I did it was an oversite, I pumped out that demo in like 30 mins for someone. Adem 1 Quote Link to comment Share on other sites More sharing options...
Adem Posted December 20, 2016 Author Share Posted December 20, 2016 @JCPalmer which one is better, should I remove oimo.js? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 20, 2016 Share Posted December 20, 2016 depends on what you are trying to accomplish... I perfer Cannon, but there are benefits to using oimo Adem 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.