Loading client/package.json +7 −7 Original line number Diff line number Diff line Loading @@ -14,11 +14,11 @@ "parcel": "^2.8.3", "parcel-reporter-static-files-copy": "^1.5.0", "path-browserify": "^1.0.1", "plotly.js-basic-dist-min": "^2.20.0", "plotly.js-basic-dist-min": "^3.6.0", "process": "^0.11.10", "regenerator-runtime": "^0.13.8", "sequential-workflow-designer": "^0.13.8", "three": "^0.130.1" "three": "^0.184.0" }, "scripts": { "test": "jest", Loading @@ -44,18 +44,18 @@ }, "devDependencies": { "@playwright/test": "^1.30.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^6.9.1", "@types/three": "^0.150.1", "assert": "^2.0.0", "babel-jest": "^29.4.1", "babel-jest": "^30.4.1", "browserify-zlib": "^0.2.0", "buffer": "^5.7.1", "canvas": "^2.11.2", "canvas": "^3.2.3", "constants-browserify": "^1.0.0", "crypto-browserify": "^3.12.0", "events": "^3.3.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.4.1", "jest": "^30.4.2", "jest-environment-jsdom": "^30.4.1", "stream-browserify": "^3.0.0", "string_decoder": "^1.3.0", "util": "^0.12.5" Loading client/src/structure-viewer/ThreeViewer.js +11 −4 Original line number Diff line number Diff line Loading @@ -12,8 +12,13 @@ import { Scene, DirectionalLight, AmbientLight, Vector3 Vector3, LinearSRGBColorSpace, ColorManagement, } from 'three' // Opt out of r152+ color management so hex colors are used as-is (matching r130 behaviour) ColorManagement.enabled = false // import OrthographicTrackballControls from '../../lib/OrthographicTrackballControls.js' import { TrackballControls } from 'three/examples/jsm/controls/TrackballControls.js'; Loading @@ -38,6 +43,8 @@ export default class ThreeViewer{ alpha: true, antialias: true, }); // Match r130 linear output (r152+ defaults to SRGBColorSpace) this.renderer.outputColorSpace = LinearSRGBColorSpace this.params = {orthographicCamera: true}; this.renderer.setSize(this.hostElement.clientWidth, this.hostElement.clientHeight) Loading Loading @@ -142,17 +149,17 @@ export default class ThreeViewer{ */ setupLights() { // Key light let keyLight = new DirectionalLight(0xffffff, 0.5); let keyLight = new DirectionalLight(0xffffff, 0.5 * Math.PI); keyLight.position.set(0, 0, 20); this.mainScene.add(keyLight); // Fill light let fillLight = new DirectionalLight(0xffffff, 0.45); let fillLight = new DirectionalLight(0xffffff, 0.45 * Math.PI); fillLight.position.set(10, -10, -20); this.mainScene.add(fillLight); // White ambient light. let ambientLight = new AmbientLight(0x404040, 2.1); // soft white light let ambientLight = new AmbientLight(0x404040, 2.1 * Math.PI); // soft white light this.mainScene.add(ambientLight); } Loading Loading
client/package.json +7 −7 Original line number Diff line number Diff line Loading @@ -14,11 +14,11 @@ "parcel": "^2.8.3", "parcel-reporter-static-files-copy": "^1.5.0", "path-browserify": "^1.0.1", "plotly.js-basic-dist-min": "^2.20.0", "plotly.js-basic-dist-min": "^3.6.0", "process": "^0.11.10", "regenerator-runtime": "^0.13.8", "sequential-workflow-designer": "^0.13.8", "three": "^0.130.1" "three": "^0.184.0" }, "scripts": { "test": "jest", Loading @@ -44,18 +44,18 @@ }, "devDependencies": { "@playwright/test": "^1.30.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^6.9.1", "@types/three": "^0.150.1", "assert": "^2.0.0", "babel-jest": "^29.4.1", "babel-jest": "^30.4.1", "browserify-zlib": "^0.2.0", "buffer": "^5.7.1", "canvas": "^2.11.2", "canvas": "^3.2.3", "constants-browserify": "^1.0.0", "crypto-browserify": "^3.12.0", "events": "^3.3.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.4.1", "jest": "^30.4.2", "jest-environment-jsdom": "^30.4.1", "stream-browserify": "^3.0.0", "string_decoder": "^1.3.0", "util": "^0.12.5" Loading
client/src/structure-viewer/ThreeViewer.js +11 −4 Original line number Diff line number Diff line Loading @@ -12,8 +12,13 @@ import { Scene, DirectionalLight, AmbientLight, Vector3 Vector3, LinearSRGBColorSpace, ColorManagement, } from 'three' // Opt out of r152+ color management so hex colors are used as-is (matching r130 behaviour) ColorManagement.enabled = false // import OrthographicTrackballControls from '../../lib/OrthographicTrackballControls.js' import { TrackballControls } from 'three/examples/jsm/controls/TrackballControls.js'; Loading @@ -38,6 +43,8 @@ export default class ThreeViewer{ alpha: true, antialias: true, }); // Match r130 linear output (r152+ defaults to SRGBColorSpace) this.renderer.outputColorSpace = LinearSRGBColorSpace this.params = {orthographicCamera: true}; this.renderer.setSize(this.hostElement.clientWidth, this.hostElement.clientHeight) Loading Loading @@ -142,17 +149,17 @@ export default class ThreeViewer{ */ setupLights() { // Key light let keyLight = new DirectionalLight(0xffffff, 0.5); let keyLight = new DirectionalLight(0xffffff, 0.5 * Math.PI); keyLight.position.set(0, 0, 20); this.mainScene.add(keyLight); // Fill light let fillLight = new DirectionalLight(0xffffff, 0.45); let fillLight = new DirectionalLight(0xffffff, 0.45 * Math.PI); fillLight.position.set(10, -10, -20); this.mainScene.add(fillLight); // White ambient light. let ambientLight = new AmbientLight(0x404040, 2.1); // soft white light let ambientLight = new AmbientLight(0x404040, 2.1 * Math.PI); // soft white light this.mainScene.add(ambientLight); } Loading