Skip to content
Snippets Groups Projects
Commit 9874bcbd authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

able to drop voxels in place

parent ccc1dc58
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
(function () {
var octHeight = 3*30/8*Math.sqrt(5);
var octHeight = 3*30/8*Math.sqrt(5);//this isn't quite right
var cellGeometry1 = new THREE.OctahedronGeometry(30/Math.sqrt(2));
cellGeometry1.applyMatrix(new THREE.Matrix4().makeRotationZ(-3*Math.PI/12));
......@@ -23,7 +23,7 @@
function Cell(position) {
if ((position.z/octHeight)%2==0){
if (Math.round(position.z/octHeight)%2==0){
this.mesh = THREE.SceneUtils.createMultiMaterialObject(cellGeometry1, cellMaterials);
} else {
this.mesh = THREE.SceneUtils.createMultiMaterialObject(cellGeometry2, cellMaterials);
......
......@@ -5,7 +5,7 @@
function ThreeModel(){
var camera = new THREE.PerspectiveCamera(60, window.innerWidth/window.innerHeight, 1, 2000);
var camera = new THREE.PerspectiveCamera(60, window.innerWidth/window.innerHeight, 1, 4000);
var scene = new THREE.Scene();
var renderer = new THREE.WebGLRenderer({antialias:false});
var objects = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment