SHARE
TWEET

Untitled

techyCoder Dec 11th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // adding the disks to the stack structure, which is a 2d array.
  2.         for(var i = 0;i<5;++i){
  3.             var darkWood = new THREE.MeshPhongMaterial({
  4.                 map: woodTex,
  5.                 color: 0xAAAAAAAA
  6.             });
  7.             var disk = new THREE.Mesh(new THREE.TorusGeometry(0.03+0.01*i,0.03+0.01*i-0.02,32,32),darkWood);
  8.             disk.raised = false;
  9.             disk.castShadow=true;
  10.             disk.receiveShadow=true;
  11.             disk.number = i;
  12.             disk.rotation.set(Math.PI/2,0,0)
  13.             disk.scale.set(1.0,1.0,0.015/(0.03+0.01*i-0.02));
  14.             diskMeshes[i] = disk;
  15.  
  16.             stacks[0].push(i);
  17.         }
  18.         for(var i = 0; i < diskMeshes.length;++i){
  19.             scene.add(diskMeshes[i]);
  20.         }
  21.         stacks[0].reverse();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top