Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into inceptionv3
  • Loading branch information
syt123450 committed Nov 21, 2018
2 parents 8e6c348 + f1075ee commit 9f56e16
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/scene/SceneInitializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ SceneInitializer.prototype = {

updateCamera: function() {

let modelDepth = this.layers.length;
let modelDepth = this.depth;
let controlRatio = getControlRatio( modelDepth );

this.camera.position.set(
Expand Down
8 changes: 8 additions & 0 deletions src/tsp-model/AbstractModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ function AbstractModel( container, config ) {

this.hoveredLayer = undefined;

/**
* Model's depth in visualization.
*
* @type { Int }
*/

this.depth = undefined;

/**
* Model configuration.
* Initialized with user's model config and default model config.
Expand Down
5 changes: 4 additions & 1 deletion src/tsp-model/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ Model.prototype = Object.assign( Object.create( AbstractModel.prototype ), {

this.createGraph();
this.assembleLayers();
this.updateCamera( this.layers.length );

this.depth = this.levelMap.length;

this.updateCamera();
this.createModelElements();
this.registerModelEvent();
this.animate();
Expand Down
4 changes: 3 additions & 1 deletion src/tsp-model/Sequential.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ Sequential.prototype = Object.assign( Object.create( AbstractModel.prototype ),

initTSPModel: function() {

this.updateCamera( this.layers.length );
this.depth = this.layers.length;

this.updateCamera();
this.createModelElements();
this.registerModelEvent();
this.animate();
Expand Down

0 comments on commit 9f56e16

Please sign in to comment.