Skip to content

Commit

Permalink
VTKLoader: fix parsing VTP containing DataArrays of type Int32 (mrdoo…
Browse files Browse the repository at this point in the history
…b#23699)

Fix parsing of VTP files who contain DataArray nodes
of type "Int32". Those nodes were currently ignored.
  • Loading branch information
Eino Gourdin authored and abernier committed Sep 16, 2022
1 parent ca9eaa1 commit 5056623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/js/loaders/VTKLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@

txt = new Float32Array();

} else if ( ele.attributes.type === 'Int64' ) {
} else if ( ele.attributes.type === 'Int32' || ele.attributes.type === 'Int64' ) {

txt = new Int32Array();

Expand Down Expand Up @@ -737,7 +737,7 @@
content = new Float32Array( content );
txt = Float32Concat( txt, content );

} else if ( ele.attributes.type === 'Int64' ) {
} else if ( ele.attributes.type === 'Int32' || ele.attributes.type === 'Int64' ) {

content = new Int32Array( content );
txt = Int32Concat( txt, content );
Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/loaders/VTKLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class VTKLoader extends Loader {

txt = new Float32Array( );

} else if ( ele.attributes.type === 'Int64' ) {
} else if ( ele.attributes.type === 'Int32' || ele.attributes.type === 'Int64' ) {

txt = new Int32Array( );

Expand Down Expand Up @@ -786,7 +786,7 @@ class VTKLoader extends Loader {
content = new Float32Array( content );
txt = Float32Concat( txt, content );

} else if ( ele.attributes.type === 'Int64' ) {
} else if ( ele.attributes.type === 'Int32' || ele.attributes.type === 'Int64' ) {

content = new Int32Array( content );
txt = Int32Concat( txt, content );
Expand Down

0 comments on commit 5056623

Please sign in to comment.