@kitware/vtk.js 25.9.0 → 25.9.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.
|
@@ -25,18 +25,13 @@ var ClassHierarchy = /*#__PURE__*/function (_Array) {
|
|
|
25
25
|
_createClass(ClassHierarchy, [{
|
|
26
26
|
key: "push",
|
|
27
27
|
value: function push() {
|
|
28
|
-
var _get2;
|
|
29
|
-
|
|
30
|
-
// using a for loop because a filter would trigger the garbage collector
|
|
31
|
-
var newArgs = [];
|
|
32
|
-
|
|
33
28
|
for (var i = 0; i < arguments.length; i++) {
|
|
34
29
|
if (!this.includes(arguments[i])) {
|
|
35
|
-
|
|
30
|
+
_get(_getPrototypeOf(ClassHierarchy.prototype), "push", this).call(this, arguments[i]);
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
33
|
|
|
39
|
-
return
|
|
34
|
+
return this.length;
|
|
40
35
|
}
|
|
41
36
|
}]);
|
|
42
37
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
1
2
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
3
|
import { mat3, mat4, vec3 } from 'gl-matrix';
|
|
3
4
|
import { newInstance as newInstance$1, setGet, obj, vtkErrorMacro as vtkErrorMacro$1 } from '../../macros.js';
|
|
@@ -16,6 +17,9 @@ import { registerOverride } from './ViewNodeFactory.js';
|
|
|
16
17
|
import { PassTypes } from './HardwareSelector/Constants.js';
|
|
17
18
|
import vtkDataSet from '../../Common/DataModel/DataSet.js';
|
|
18
19
|
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
23
|
var FieldAssociations = vtkDataSet.FieldAssociations;
|
|
20
24
|
/* eslint-disable no-lonely-if */
|
|
21
25
|
|
|
@@ -1276,15 +1280,13 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
1276
1280
|
} else {
|
|
1277
1281
|
// if we have edge visibility build the edge VBOs
|
|
1278
1282
|
if (drawSurfaceWithEdges) {
|
|
1279
|
-
model.primitives[i].getCABO().createVBO(primitives[i].cells, primitives[i].inRep, Representation.WIREFRAME, {
|
|
1280
|
-
points: points,
|
|
1281
|
-
normals: n,
|
|
1283
|
+
options.cellOffset += model.primitives[i].getCABO().createVBO(primitives[i].cells, primitives[i].inRep, Representation.WIREFRAME, _objectSpread(_objectSpread({}, options), {}, {
|
|
1282
1284
|
tcoords: null,
|
|
1283
1285
|
colors: null,
|
|
1284
|
-
cellOffset: 0,
|
|
1285
1286
|
haveCellScalars: false,
|
|
1286
1287
|
haveCellNormals: false
|
|
1287
|
-
});
|
|
1288
|
+
}), model.selectionWebGLIdsToVTKIds);
|
|
1289
|
+
options.vertexOffset += model.primitives[i].getCABO().getElementCount();
|
|
1288
1290
|
} else {
|
|
1289
1291
|
// otherwise free them
|
|
1290
1292
|
model.primitives[i].releaseGraphicsResources();
|
package/macros.js
CHANGED
|
@@ -234,7 +234,13 @@ function obj() {
|
|
|
234
234
|
if (!('classHierarchy' in model)) {
|
|
235
235
|
model.classHierarchy = new ClassHierarchy('vtkObject');
|
|
236
236
|
} else if (!(model.classHierarchy instanceof ClassHierarchy)) {
|
|
237
|
-
|
|
237
|
+
var hierarchy = new ClassHierarchy();
|
|
238
|
+
|
|
239
|
+
for (var i = 0; i < model.classHierarchy.length; i++) {
|
|
240
|
+
hierarchy.push(model.classHierarchy[i]);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
model.classHierarchy = hierarchy;
|
|
238
244
|
}
|
|
239
245
|
|
|
240
246
|
function off(index) {
|