Skip to content

Commit e37815a

Browse files
authored
Merge branch 'master' into fix-obbtree-tests
2 parents 8e66a24 + 3c071fb commit e37815a

File tree

230 files changed

+11589
-8606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+11589
-8606
lines changed

.github/workflows/build-test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,22 @@ jobs:
1515
uses: actions/setup-node@v1
1616
with:
1717
node-version: ${{ matrix.node }}
18-
cache: 'npm'
1918
- name: Install dependencies
2019
run: |
2120
npm ci
2221
sudo apt-get install xvfb
2322
- name: Build
2423
run: npm run build:release
24+
- name: Archive build output
25+
uses: actions/upload-artifact@v3
26+
with:
27+
name: build-results
28+
path: dist
29+
retention-days: 15
30+
- name: Validate generated typescript definitions
31+
run: |
32+
npx tsc -p tsconfig.esm-check.json
33+
npx tsc -p tsconfig.umd-check.json
2534
- name: Chrome and Firefox tests
2635
run: xvfb-run --auto-servernum npm run test -- --browsers Chrome,Firefox
2736
- name: Archive test results

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ jobs:
2626
sudo apt-get install xvfb
2727
- name: Build
2828
run: npm run build:release
29-
- name: Validate
29+
- name: Validate code style
3030
run: npm run validate
31+
- name: Validate generated typescript definitions
32+
run: |
33+
npx tsc -p tsconfig.esm-check.json
34+
npx tsc -p tsconfig.umd-check.json
3135
- name: Chrome and Firefox tests
3236
run: xvfb-run --auto-servernum npm run test -- --browsers Chrome,Firefox
3337
- name: Archive test results

BREAKING_CHANGES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## From 23.x to 24
22

3-
All old-style widgets except OrientationMarkerWidget and PiecewiseGaussianWidget have been removed.
3+
- All old-style widgets except OrientationMarkerWidget and PiecewiseGaussianWidget have been removed.
44

55
| **Old-style/deprecated widget** | **New-style widget** |
66
|-----------------------------------|---------------------------------|
@@ -15,6 +15,16 @@ All old-style widgets except OrientationMarkerWidget and PiecewiseGaussianWidget
1515
| ResliceCursor | ResliceCursorWidget |
1616

1717
- In SVGLandmarkRepresentation: `model.showCircle` is replaced by `model.circleProps.visible`
18+
- In vtk.js subclasses, prefix with '_' the following "protected" model variables:
19+
- vtk*: model.openglRenderWindow -> model._openglRenderWindow
20+
- vtk*: model.openglRenderer -> model._openglRenderer
21+
- vtkInteractorObserver, vtkOrientationMarkerWidget : model.interactor -> model._interactor
22+
- vtkAbstractWidget, vtkViewNode: model.parent -> model._parent
23+
- vtkProp: model.parentProp -> model._parentProp
24+
- vtkRenderWindowInteractor: model.view -> model._view
25+
- vtkRenderer: model.renderWindow -> model._renderWindow
26+
- vtkHardwareSelector: model.renderer -> model._renderer
27+
- vtkAbstractWidget: model.widgetManager -> model._widgetManager
1828

1929
## From 22.x to 23
2030

Documentation/content/docs/develop_webxr.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ vtk.js supports virtual and augmented reality rendering via the [WebXR device AP
4040

4141
[![VR Cone Example][VrCone]](../examples/VR.html)
4242
[![SkyboxViewer Example][SkyboxViewerVR]](../examples/SkyboxViewer.html?fileURL=https://data.kitware.com/api/v1/file/5ae8a89c8d777f0685796bae/download)
43+
[![XR Volume Example][WebXRVolume]](../examples/WebXRVolume.html)
4344

4445
</div>
4546

@@ -51,6 +52,7 @@ vtk.js supports virtual and augmented reality rendering via the [WebXR device AP
5152
[![GeometryViewer Example][GeometryViewer]](../examples/GeometryViewer.html?fileURL=https://data.kitware.com/api/v1/item/59de9de58d777f31ac641dc5/download)
5253
[![GeometryViewer Brain Blood Vessels][GeometryViewerBrainBloodVessels]](../examples/GeometryViewer/GeometryViewer.html?fileURL=[https://data.kitware.com/api/v1/file/61f041f14acac99f42c2ff9a/download,https://data.kitware.com/api/v1/file/61f042024acac99f42c2ffa6/download,https://data.kitware.com/api/v1/file/61f042b74acac99f42c30079/download])
5354
[![GeometryViewer Chest CT][GeometryViewerchestCT]](../examples/GeometryViewer/GeometryViewer.html?fileURL=[https://data.kitware.com/api/v1/file/61f044354acac99f42c30276/download,https://data.kitware.com/api/v1/file/61f0440f4acac99f42c30191/download,https://data.kitware.com/api/v1/file/61f044204acac99f42c30267/download])
55+
[![XR Volume Example][WebXRVolume]](../examples/WebXRVolume.html)
5456

5557
</div>
5658

225 KB
Loading

Documentation/content/docs/intro_vtk_as_es6_dependency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title: Using vtk.js as an ES6 dependency
1+
title: Using vtk.js as an ES dependency
22
---
33

44
This guide illustrates how to consume vtk.js as an ES dependency.

Documentation/tpl/__en__

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sidebar:
2222
getting_started: Getting Started
2323
overview: Overview
2424
external: Script usage
25-
es6_dep: ES6 usage
25+
es6_dep: ESM usage
2626
tutorial: Tutorials and Training
2727
develop: Development
2828
requirement: Requirements

Examples/Geometry/_MeshClipPlane/controlPanel.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

Examples/Geometry/_MeshClipPlane/index.js

Lines changed: 0 additions & 116 deletions
This file was deleted.

Examples/Rendering/Actor2D/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ fpsElm.style.bottom = '10px';
3939
fpsElm.style.background = 'rgba(255,255,255,0.5)';
4040
fpsElm.style.borderRadius = '5px';
4141

42-
fpsMonitor.setContainer(document.querySelector('body'));
43-
fpsMonitor.setRenderWindow(renderWindow);
42+
// fpsMonitor.setContainer(document.querySelector('body'));
43+
// fpsMonitor.setRenderWindow(renderWindow);
4444

4545
fullScreenRenderer.setResizeCallback(fpsMonitor.update);
4646

@@ -92,10 +92,14 @@ mapper2D.setScalarVisibility(false);
9292

9393
const actor = vtkActor.newInstance();
9494
actor.setMapper(mapper);
95+
actor.getProperty().setEdgeVisibility(true);
96+
actor.getProperty().setEdgeColor([0.5, 0, 0.6]);
97+
actor.getProperty().setLineWidth(3);
9598
const actor2D = vtkActor2D.newInstance();
9699
actor2D.setMapper(mapper2D);
97100
actor2D.getProperty().setColor([1, 0, 0]);
98101
actor2D.getProperty().setOpacity(0.5);
102+
actor2D.getProperty().setLineWidth(3);
99103
actor2D.getProperty().setDisplayLocation(DisplayLocation.FOREGROUND);
100104
actor2D.getProperty().setRepresentation(Representation.SURFACE);
101105

@@ -116,13 +120,15 @@ const resolutionChange = document.querySelector('.resolution');
116120
representationSelector.addEventListener('change', (e) => {
117121
const newRepValue = Number(e.target.value);
118122
actor2D.getProperty().setRepresentation(newRepValue);
123+
actor.getProperty().setRepresentation(newRepValue);
119124
renderWindow.render();
120125
fpsMonitor.update();
121126
});
122127

123128
resolutionChange.addEventListener('input', (e) => {
124129
const resolution = Number(e.target.value);
125130
sphereSource.setThetaResolution(resolution);
131+
coneSource.setResolution(resolution);
126132
renderWindow.render();
127133
fpsMonitor.update();
128134
});
@@ -135,5 +141,8 @@ resolutionChange.addEventListener('input', (e) => {
135141
global.source = coneSource;
136142
global.mapper = mapper;
137143
global.actor = actor;
144+
global.sphereSource = sphereSource;
145+
global.mapper2D = mapper2D;
146+
global.actor2D = actor2D;
138147
global.renderer = renderer;
139148
global.renderWindow = renderWindow;

0 commit comments

Comments
 (0)