|
@@ -78,7 +78,8 @@
|
|
loader = new THREE.SEA3D( {
|
|
loader = new THREE.SEA3D( {
|
|
|
|
|
|
autoPlay : true, // Auto play animations
|
|
autoPlay : true, // Auto play animations
|
|
- container : scene // Container to add models
|
|
|
|
|
|
+ container : scene, // Container to add models
|
|
|
|
+ progressive : true // Progressive download
|
|
|
|
|
|
} );
|
|
} );
|
|
|
|
|
|
@@ -87,13 +88,11 @@
|
|
// Get camera from SEA3D Studio
|
|
// Get camera from SEA3D Studio
|
|
// use loader.get... to get others objects
|
|
// use loader.get... to get others objects
|
|
|
|
|
|
- var cam = loader.getCamera( "Camera007" );
|
|
|
|
- camera.position.copy( cam.position );
|
|
|
|
- camera.rotation.copy( cam.rotation );
|
|
|
|
|
|
+ //var cam = loader.getCamera( "Camera007" );
|
|
|
|
+ //camera.position.copy( cam.position );
|
|
|
|
+ //camera.rotation.copy( cam.rotation );
|
|
|
|
|
|
- controls = new THREE.OrbitControls( camera );
|
|
|
|
-
|
|
|
|
- animate();
|
|
|
|
|
|
+ console.log("SEA3D asset loaded!");
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
@@ -110,7 +109,10 @@
|
|
document.body.appendChild( container );
|
|
document.body.appendChild( container );
|
|
|
|
|
|
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 );
|
|
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 );
|
|
- camera.position.set( 1000, - 300, 1000 );
|
|
|
|
|
|
+ camera.position.set( 1000, 1000, 1000 );
|
|
|
|
+ camera.lookAt( new THREE.Vector3() );
|
|
|
|
+
|
|
|
|
+ controls = new THREE.OrbitControls( camera );
|
|
|
|
|
|
renderer = new THREE.WebGLRenderer();
|
|
renderer = new THREE.WebGLRenderer();
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
@@ -185,6 +187,8 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ animate();
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|