@@ -121,49 +121,6 @@ class Scene extends Component<SceneProps, IState> {
121121 }
122122 }
123123
124- static async loadGradientMesh (
125- meshSupport : MeshSupport = MeshSupport . FSAVERAGE5 ,
126- meshType : MeshType = MeshType . PIAL ,
127- hemisphereSide : HemisphereSide = HemisphereSide . LEFT
128- ) {
129- switch ( hemisphereSide ) {
130- case HemisphereSide . LEFT :
131- return Scene . load (
132- `datasets/ibc/mesh/${ meshSupport } /edges_${ meshType } _left.gltf`
133- ) . then ( ( gltf : any ) => {
134- return gltf . scene . children [ 0 ] as any ;
135- } ) ;
136- case HemisphereSide . RIGHT :
137- return Scene . load (
138- `datasets/ibc/mesh/${ meshSupport } /edges_${ meshType } _right.gltf`
139- ) . then ( ( gltf : any ) => {
140- return gltf . scene . children [ 0 ] as any ;
141- } ) ;
142- case HemisphereSide . BOTH :
143- // Load both meshes
144- const loadLeft = Scene . load (
145- `datasets/ibc/mesh/${ meshSupport } /edges_${ meshType } _left.gltf`
146- ) ;
147- const loadRight = Scene . load (
148- `datasets/ibc/mesh/${ meshSupport } /edges_${ meshType } _right.gltf`
149- ) ;
150-
151- // Merge them in a common Mesh
152- return Promise . all ( [ loadLeft , loadRight ] ) . then ( ( values : any ) => {
153- const mergedBufferGeometries = BufferGeometryUtils . mergeBufferGeometries (
154- [
155- values [ 0 ] . scene . children [ 0 ] . geometry ,
156- values [ 1 ] . scene . children [ 0 ] . geometry ,
157- ]
158- ) ;
159-
160- const mesh = new THREE . Mesh ( mergedBufferGeometries ) ;
161-
162- return mesh ;
163- } ) ;
164- }
165- }
166-
167124 // Static method to build mesh from geometry and surface map.
168125 // In case surface map is given, simply apply it to mesh.
169126 // Otherwise, generate and apply random material.
0 commit comments