|
@@ -25,8 +25,6 @@ var Viewport = function ( editor ) {
|
|
|
//
|
|
|
|
|
|
var camera = editor.camera;
|
|
|
- camera.position.fromArray( editor.config.getKey( 'camera/position' ) );
|
|
|
- camera.lookAt( new THREE.Vector3().fromArray( editor.config.getKey( 'camera/target' ) ) );
|
|
|
|
|
|
//
|
|
|
|
|
@@ -238,7 +236,6 @@ var Viewport = function ( editor ) {
|
|
|
// otherwise controls.enabled doesn't work.
|
|
|
|
|
|
var controls = new THREE.EditorControls( camera, container.dom );
|
|
|
- controls.center.fromArray( editor.config.getKey( 'camera/target' ) );
|
|
|
controls.addEventListener( 'change', function () {
|
|
|
|
|
|
transformControls.update();
|
|
@@ -328,21 +325,6 @@ var Viewport = function ( editor ) {
|
|
|
|
|
|
signals.cameraChanged.add( function () {
|
|
|
|
|
|
- if ( saveTimeout !== undefined ) {
|
|
|
-
|
|
|
- clearTimeout( saveTimeout );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- saveTimeout = setTimeout( function () {
|
|
|
-
|
|
|
- editor.config.setKey(
|
|
|
- 'camera/position', camera.position.toArray(),
|
|
|
- 'camera/target', controls.center.toArray()
|
|
|
- );
|
|
|
-
|
|
|
- }, 1000 );
|
|
|
-
|
|
|
render();
|
|
|
|
|
|
} );
|