File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/brainbrowser/surface-viewer/modules Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ BrainBrowser.SurfaceViewer.modules.rendering = function(viewer) {
199199 camera . position . set ( 0 , 0 , default_camera_distance ) ;
200200 light . position . set ( 0 , 0 , default_camera_distance ) ;
201201
202+ var offset = model . userData . offset || new THREE . Vector3 ( 0 , 0 , 0 ) ;
202203 model . children . forEach ( function ( shape ) {
203204 var centroid = shape . userData . centroid ;
204205 var recentered = shape . userData . recentered ;
@@ -209,12 +210,12 @@ BrainBrowser.SurfaceViewer.modules.rendering = function(viewer) {
209210 if ( shape . userData . original_data ) {
210211 if ( centroid && recentered ) {
211212 shape . position . set (
212- centroid . x ,
213- centroid . y ,
214- centroid . z
213+ centroid . x + offset . x ,
214+ centroid . y + offset . y ,
215+ centroid . z + offset . z
215216 ) ;
216217 } else {
217- shape . position . set ( 0 , 0 , 0 ) ;
218+ shape . position . set ( 0 + offset . x , 0 + offset . y , 0 + offset . z ) ;
218219 }
219220 shape . rotation . set ( 0 , 0 , 0 ) ;
220221 shape . material . opacity = 1 ;
You can’t perform that action at this time.
0 commit comments