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

messing around

parent c58758c1
No related branches found
No related tags found
No related merge requests found
/**
* Created by aghassaei on 1/8/15.
*/
$(function(){
$("#elementCube").click(function(e){
e.preventDefault();
for ( var i = 0; i < 500; i ++ ) {
var mesh = createCubeGeometry(10);
mesh.position.x = ( Math.random() - 0.5 ) * 1000;
mesh.position.y = ( Math.random() - 0.5 ) * 1000;
mesh.position.z = ( Math.random() - 0.5 ) * 1000;
mesh.updateMatrix();
mesh.matrixAutoUpdate = false;
three.scene.add( mesh );
}
three.render();
});
function createCubeGeometry(size){
var geometry = new THREE.BoxGeometry(size, size, size);
var material = new THREE.MeshLambertMaterial( { color:0xffffff, shading: THREE.FlatShading } );
return new THREE.Mesh( geometry, material );
}
});
\ No newline at end of file
......@@ -2,13 +2,13 @@
* Created by aghassaei on 1/8/15.
*/
//todo - put stl loading in background thread, allow scaling when loaded
//todo - put stl loading in background thread
$(function(){
three = three || {};
var modelMesh;
var modelMesh = {};
var modelScaleSlider = $('#stlModelScale');
function loadSTL(file){
......@@ -69,6 +69,4 @@ $(function(){
function setFileName(name){
$("#STLFilename").html("Current file loaded:&nbsp&nbsp"+name);
}
});
\ No newline at end of file
......@@ -33,6 +33,7 @@
<script src="js/main.js"></script>
<script src="dependencies/loaders/STLLoader.js"></script>
<script src="js/importMenu.js"></script>
<script src="js/elementMenu.js"></script>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
......
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