@kitware/vtk.js 26.3.1 → 26.3.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.
|
@@ -288,7 +288,7 @@ function vtkOpenGLCellArrayBufferObject(publicAPI, model) {
|
|
|
288
288
|
// Keep track of original point and cell ids, for selection
|
|
289
289
|
if (selectionMaps) {
|
|
290
290
|
selectionMaps.points[pointCount] = i;
|
|
291
|
-
selectionMaps.cells[pointCount] = cellCount;
|
|
291
|
+
selectionMaps.cells[pointCount] = cellCount + options.cellOffset;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
++pointCount; // Vertices
|
|
@@ -1070,9 +1070,9 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
1070
1070
|
|
|
1071
1071
|
if (cabo.getElementCount()) {
|
|
1072
1072
|
// are we drawing edges
|
|
1073
|
-
model.drawingEdges = drawSurfaceWithEdges && (i === primTypes.TrisEdges || i === primTypes.TriStripsEdges);
|
|
1073
|
+
model.drawingEdges = drawSurfaceWithEdges && (i === primTypes.TrisEdges || i === primTypes.TriStripsEdges); // don't draw edges when rendering depth or rendering for picking
|
|
1074
1074
|
|
|
1075
|
-
if (!model.drawingEdges || !model.renderDepth) {
|
|
1075
|
+
if (!model.drawingEdges || !(model.renderDepth || model.lastSelectionState >= 0)) {
|
|
1076
1076
|
model.lastBoundBO = model.primitives[i];
|
|
1077
1077
|
model.primitiveIDOffset += model.primitives[i].drawArrays(ren, actor, representation, publicAPI);
|
|
1078
1078
|
model.vertexIDOffset += model.primitives[i].getCABO().getElementCount();
|
|
@@ -1274,8 +1274,7 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
1274
1274
|
inRep: 'strips',
|
|
1275
1275
|
cells: poly.getStrips()
|
|
1276
1276
|
}];
|
|
1277
|
-
var drawSurfaceWithEdges =
|
|
1278
|
-
actor.getProperty().getEdgeVisibility() && representation === Representation.SURFACE;
|
|
1277
|
+
var drawSurfaceWithEdges = actor.getProperty().getEdgeVisibility() && representation === Representation.SURFACE;
|
|
1279
1278
|
|
|
1280
1279
|
for (var i = primTypes.Start; i < primTypes.End; i++) {
|
|
1281
1280
|
if (i !== primTypes.TrisEdges && i !== primTypes.TriStripsEdges) {
|
|
@@ -1284,13 +1283,15 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
1284
1283
|
} else {
|
|
1285
1284
|
// if we have edge visibility build the edge VBOs
|
|
1286
1285
|
if (drawSurfaceWithEdges) {
|
|
1287
|
-
|
|
1286
|
+
// VBOs for edges in "surface with edges" are the last to be built,
|
|
1287
|
+
// they are not used when picking with a hardware selector so they
|
|
1288
|
+
// don't need selectionWebGLIdsToVTKIds and don't update cellOffset and vertexOffset
|
|
1289
|
+
model.primitives[i].getCABO().createVBO(primitives[i].cells, primitives[i].inRep, Representation.WIREFRAME, _objectSpread(_objectSpread({}, options), {}, {
|
|
1288
1290
|
tcoords: null,
|
|
1289
1291
|
colors: null,
|
|
1290
1292
|
haveCellScalars: false,
|
|
1291
1293
|
haveCellNormals: false
|
|
1292
|
-
})
|
|
1293
|
-
options.vertexOffset += model.primitives[i].getCABO().getElementCount();
|
|
1294
|
+
}));
|
|
1294
1295
|
} else {
|
|
1295
1296
|
// otherwise free them
|
|
1296
1297
|
model.primitives[i].releaseGraphicsResources();
|