@kitware/vtk.js 29.1.0 → 29.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Common/Core/DataArray.js
CHANGED
|
@@ -514,6 +514,9 @@ function extend(publicAPI, model) {
|
|
|
514
514
|
// Object methods
|
|
515
515
|
obj(publicAPI, model);
|
|
516
516
|
set(publicAPI, model, ['name', 'numberOfComponents']);
|
|
517
|
+
if (model.size % model.numberOfComponents !== 0) {
|
|
518
|
+
throw new RangeError('model.size is not a multiple of model.numberOfComponents');
|
|
519
|
+
}
|
|
517
520
|
|
|
518
521
|
// Object specific methods
|
|
519
522
|
vtkDataArray(publicAPI, model);
|
|
@@ -241,7 +241,7 @@ function convertItkToVtkPolyData(itkPolyData) {
|
|
|
241
241
|
vtkClass: 'vtkPoints',
|
|
242
242
|
name: '_points',
|
|
243
243
|
numberOfComponents: 3,
|
|
244
|
-
size: itkPolyData.
|
|
244
|
+
size: itkPolyData.points.length,
|
|
245
245
|
dataType: 'Float32Array',
|
|
246
246
|
buffer: itkPolyData.points.buffer,
|
|
247
247
|
values: itkPolyData.points
|
|
@@ -9,6 +9,8 @@ import '../../Common/Core/DataArray.js';
|
|
|
9
9
|
import '../../Common/DataModel/PolyData.js';
|
|
10
10
|
import '../Core/Actor.js';
|
|
11
11
|
import '../Core/Mapper.js';
|
|
12
|
+
import '../OpenGL/RenderWindow.js';
|
|
13
|
+
import '../WebGPU/RenderWindow.js';
|
|
12
14
|
|
|
13
15
|
// Process arguments from URL
|
|
14
16
|
const userParams = vtkURLExtract.extractURLParameters();
|
|
@@ -60,6 +60,7 @@ function vtkOpenGLVolume(publicAPI, model) {
|
|
|
60
60
|
} else {
|
|
61
61
|
mat3.fromMat4(model.normalMatrix, model.MCWCMatrix);
|
|
62
62
|
mat3.invert(model.normalMatrix, model.normalMatrix);
|
|
63
|
+
mat3.transpose(model.normalMatrix, model.normalMatrix);
|
|
63
64
|
}
|
|
64
65
|
model.keyMatrixTime.modified();
|
|
65
66
|
}
|