|
@@ -851,7 +851,7 @@ Object.assign( THREE.VTKLoader.prototype, THREE.EventDispatcher.prototype, {
|
|
|
|
|
|
if ( ele[ '#text' ] ) {
|
|
if ( ele[ '#text' ] ) {
|
|
|
|
|
|
- var content = ele[ '#text' ].replace( /\n/g, ' ' ).split( ' ' ).filter( function ( el ) {
|
|
|
|
|
|
+ var content = ele[ '#text' ].split( /s+/ ).filter( function ( el ) {
|
|
|
|
|
|
if ( el !== '' ) return el;
|
|
if ( el !== '' ) return el;
|
|
|
|
|
|
@@ -872,6 +872,10 @@ Object.assign( THREE.VTKLoader.prototype, THREE.EventDispatcher.prototype, {
|
|
|
|
|
|
var txt = new Float32Array( content );
|
|
var txt = new Float32Array( content );
|
|
|
|
|
|
|
|
+ } else if ( ele.attributes.type == 'Int32' ) {
|
|
|
|
+
|
|
|
|
+ var txt = new Int32Array( content );
|
|
|
|
+
|
|
} else if ( ele.attributes.type === 'Int64' ) {
|
|
} else if ( ele.attributes.type === 'Int64' ) {
|
|
|
|
|
|
var txt = new Int32Array( content );
|
|
var txt = new Int32Array( content );
|
|
@@ -959,7 +963,7 @@ Object.assign( THREE.VTKLoader.prototype, THREE.EventDispatcher.prototype, {
|
|
|
|
|
|
// If it has a DataArray in it
|
|
// If it has a DataArray in it
|
|
|
|
|
|
- if ( section.DataArray ) {
|
|
|
|
|
|
+ if ( section && section.DataArray ) {
|
|
|
|
|
|
// Depending on the number of DataArrays
|
|
// Depending on the number of DataArrays
|
|
|
|
|