fixed importing buffer geometry with bounding bug

This commit is contained in:
casperlamboo
2015-06-01 12:06:11 +02:00
parent 389dcc27d2
commit 67362c4ba8
5 changed files with 20 additions and 19 deletions

View File

@ -31,20 +31,21 @@ function init () {
var scene = createScene();
var localIp = location.hash.substring(1);
//doodleBox = new D3D.Box(localIp);
doodleBox = new D3D.Box(localIp);
var slicer = new D3D.SlicerWorker();
slicer.setSettings(USER_SETTINGS, PRINTER_SETTINGS["ultimaker"]);
var loader = new THREE.STLLoader();
loader.load("models/stanford_bunny_high.stl", function (geometry) {
loader.load("models/dom.stl", function (geometry) {
//var geometry = new THREE.TorusGeometry(20, 10, 30, 30).clone();
var material = new THREE.MeshPhongMaterial({color: 0x00ff00, wireframe: false});
var mesh = new THREE.Mesh(geometry, material);
mesh.rotation.x = -Math.PI/2;
mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.5;
mesh.position.y = -9.260265119962973e-17;
mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
//mesh.position.y = -9.260265119962973e-17;
mesh.position.x = 100;
mesh.position.z = 100;