Guest User

Untitled

a guest
Jan 22nd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. action_floor_glass.onChange( function (opt_none) {
  2. if (opt_none== true){
  3. geometry_floor2.visible = false;
  4. geometry_floor1.visible = true;
  5. }
  6. if (opt_none== false){
  7. geometry_floor1.visible = false;
  8. geometry_floor2.visible = true;
  9. }
  10. } );
  11.  
  12.  
  13. var plane_gam = new THREE.PlaneBufferGeometry( 2000, 2000 ) ;
  14.  
  15. var glass_mat = { clipBias: 0.003, textureWidth: window.innerWidth * window.devicePixelRatio, textureHeight: window.innerHeight * window.devicePixelRatio, color: 0x889999, recursion: 1 } ;
  16.  
  17. var plane_mat = new THREE.MeshStandardMaterial( { color: 0x808080, roughness: 0, metalness: 0 } ) ;
  18.  
  19. var geometry_floor1 = new THREE.Reflector(plane_gam, glass_mat);
  20. geometry_floor1.rotation.x = - Math.PI / 2;
  21. geometry_floor1.receiveShadow = true
  22. geometry_floor1.visible = false;
  23. scene.add( geometry_floor1 );
  24.  
  25. var geometry_floor2 = new THREE.Mesh( plane_gam, plane_mat );
  26. geometry_floor2.rotation.x = - Math.PI / 2;
  27. geometry_floor2.receiveShadow = true;
  28.  
  29. scene.add( geometry_floor2 );
  30.  
  31. action_floor_glass.onChange( function (opt_none) {
  32. if (opt_none== true){
  33. geometry_floor2.visible = false;
  34. geometry_floor1.visible = true;
  35. }
  36. if (opt_none== false){
  37. geometry_floor1.visible = false;
  38. geometry_floor2.visible = true;
  39. }
  40. } );
  41.  
  42. action_floor_glass.onChange( function (opt_none) {
  43. geometry_floor2.visible = !opt_none;
  44. geometry_floor1.visible = opt_none;
  45. } );
Add Comment
Please, Sign In to add comment