Advertisement
yskang

threejs-minecraft-30

Apr 21st, 2020
1,932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.40 KB | None | 0 0
  1. // js/index.js
  2. const resetBtn = document.getElementById( 'reset' );
  3.  
  4. resetBtn.addEventListener( 'click', function() {
  5.     rayHelper.detach( scene );
  6.     creeper.reset();
  7. });
  8.  
  9. // css/index.css
  10. button#reset {
  11.     z-index: 10;
  12.     position: absolute;
  13.     left: 70px;
  14. }
  15.  
  16. <!-- index.html -->
  17. <body>
  18.     <button type="button" id="reset">Rest</button>
  19.     <!-- ... -->
  20. </body>
  21.  
  22. <!-- ... -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement