diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c87a03..ba24c141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,29 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v3.9.0](https://github.com/simularium/simularium-viewer/compare/v3.8.4...v3.9.0) + +- Bounding box toggle in tweakpane [`#434`](https://github.com/simularium/simularium-viewer/pull/434) +- testbed file organization [`#429`](https://github.com/simularium/simularium-viewer/pull/429) +- fix test bed download button [`#427`](https://github.com/simularium/simularium-viewer/pull/427) +- remove pauseOn property [`#425`](https://github.com/simularium/simularium-viewer/pull/425) +- Caching: remove vis data workers [`#420`](https://github.com/simularium/simularium-viewer/pull/420) +- Caching: refactor, memory improvements, trimming [`#411`](https://github.com/simularium/simularium-viewer/pull/411) +- Bump webpack from 5.90.3 to 5.95.0 in /examples [`#418`](https://github.com/simularium/simularium-viewer/pull/418) +- Bump cookie and express in /examples [`#421`](https://github.com/simularium/simularium-viewer/pull/421) +- Bump webpack from 5.90.3 to 5.94.0 [`#408`](https://github.com/simularium/simularium-viewer/pull/408) +- update dependencies: typescript, three, jest [`#416`](https://github.com/simularium/simularium-viewer/pull/416) +- Bump express from 4.19.2 to 4.21.0 in /examples [`#414`](https://github.com/simularium/simularium-viewer/pull/414) +- remove unused references to colorchange interface [`#410`](https://github.com/simularium/simularium-viewer/pull/410) +- code cleanup: dragAndDrop and JSON caching code [`#409`](https://github.com/simularium/simularium-viewer/pull/409) +- npm won't install anything until I bump ts-jest [`19fa8f6`](https://github.com/simularium/simularium-viewer/commit/19fa8f6ffdb2ad56fbcee70649098ef54ada4476) +- more package wrangling to fix tests (where was lodash?!) [`efa53fc`](https://github.com/simularium/simularium-viewer/commit/efa53fcf64e770c38fb036b1d5561c62450c8284) +- bump rimraf too, since it was complaining [`bce9f7e`](https://github.com/simularium/simularium-viewer/commit/bce9f7edc9762c10e9c321709d1751e871bf12e7) + #### [v3.8.4](https://github.com/simularium/simularium-viewer/compare/v3.8.3...v3.8.4) +> 22 August 2024 + - Feature/session colors [`#400`](https://github.com/simularium/simularium-viewer/pull/400) - export AgentData type properly from /types and / simularium [`#401`](https://github.com/simularium/simularium-viewer/pull/401) - Bump ws from 7.5.9 to 7.5.10 [`#399`](https://github.com/simularium/simularium-viewer/pull/399) diff --git a/babel.config.cjs b/babel.config.cjs index ea0fd8f8..b1548957 100644 --- a/babel.config.cjs +++ b/babel.config.cjs @@ -1,23 +1,20 @@ -module.exports = (api) => { - const isTest = api.env("test"); - return { - plugins: [ - "@babel/plugin-transform-class-properties", - "const-enum", - "@babel/plugin-transform-runtime", - ], - presets: [ - ["@babel/preset-env", { modules: false }], - "@babel/preset-typescript", - "@babel/preset-react", - ], - env: { - es: { - presets: [["@babel/preset-env", { modules: false }]], - }, - test: { - presets: [["@babel/preset-env", { modules: "auto" }]], - }, +module.exports = { + plugins: [ + "@babel/plugin-transform-class-properties", + "const-enum", + "@babel/plugin-transform-runtime", + ], + presets: [ + ["@babel/preset-env", { modules: false }], + "@babel/preset-typescript", + "@babel/preset-react", + ], + env: { + es: { + presets: [["@babel/preset-env", { modules: false }]], }, - }; + test: { + presets: [["@babel/preset-env", { modules: "auto" }]], + }, + }, }; diff --git a/examples/src/Components/AgentMetadata.tsx b/examples/src/Components/AgentMetadata.tsx index 91e692f8..bafbed37 100644 --- a/examples/src/Components/AgentMetadata.tsx +++ b/examples/src/Components/AgentMetadata.tsx @@ -15,10 +15,10 @@ const AgentMetadata = ({ agentData }: AgentMetadataProps): JSX.Element => {
uniqueID: {agentData.instanceId}
agentType: {agentData.type}
- position: x = {agentData.x}, y = {agentData.y}, z ={agentData.z} + position: x = {agentData.x}, y = {agentData.y}, z = {agentData.z}
- rotation: x = {agentData.xrot}, y = {agentData.yrot}, z = + rotation: x = {agentData.xrot}, y = {agentData.yrot}, z ={" "} {agentData.zrot}
radius: {agentData.cr}
diff --git a/examples/src/Components/ConversionForm/InputSwitch.tsx b/examples/src/Components/ConversionForm/InputSwitch.tsx index 471df29d..3917ae8d 100644 --- a/examples/src/Components/ConversionForm/InputSwitch.tsx +++ b/examples/src/Components/ConversionForm/InputSwitch.tsx @@ -1,7 +1,7 @@ import { map } from "lodash"; import React from "react"; -import BaseInput from "./BaseInput" -import CollectionInput from "./CollectionInput" +import BaseInput from "./BaseInput"; +import CollectionInput from "./CollectionInput"; interface InputSwitchProps { handler: (path: string[], key: string, value: any) => void; diff --git a/examples/src/Components/ConversionForm/index.tsx b/examples/src/Components/ConversionForm/index.tsx index a39c3830..6342cbbb 100644 --- a/examples/src/Components/ConversionForm/index.tsx +++ b/examples/src/Components/ConversionForm/index.tsx @@ -1,6 +1,6 @@ import { map } from "lodash"; import React from "react"; -import InputSwitch from "./InputSwitch" +import InputSwitch from "./InputSwitch"; interface InputFormProps { template: { [key: string]: any }; diff --git a/package-lock.json b/package-lock.json index debc54d8..c8950fdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@aics/simularium-viewer", - "version": "3.8.4", + "version": "3.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@aics/simularium-viewer", - "version": "3.8.4", + "version": "3.9.0", "license": "MIT", "dependencies": { "@babel/plugin-transform-runtime": "^7.23.6", diff --git a/package.json b/package.json index 65d023c8..4e0f4718 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aics/simularium-viewer", - "version": "3.8.4", + "version": "3.9.0", "description": "An npm package to view simulations.", "main": "es/index.js", "type": "module", diff --git a/src/test/DummyRemoteSimulator.ts b/src/test/DummyRemoteSimulator.ts index 6dbe226d..d2ecbabd 100644 --- a/src/test/DummyRemoteSimulator.ts +++ b/src/test/DummyRemoteSimulator.ts @@ -152,6 +152,7 @@ export class DummyRemoteSimulator extends RemoteSimulator { this.frameCounter = frameNumber; const msg: NetMessage = JSON.parse(this.getDataBundle(frameNumber)); + this.frameCounter++; this.onJsonIdVisDataArrive(msg); }, this.commandLatencyMS); } diff --git a/src/visGeometry/index.ts b/src/visGeometry/index.ts index 0788661d..60d296b7 100644 --- a/src/visGeometry/index.ts +++ b/src/visGeometry/index.ts @@ -145,6 +145,7 @@ class VisGeometry { public hemiLight: HemisphereLight; public boundingBox!: Box3; public boundingBoxMesh!: Box3Helper; + public showBounds: boolean; public tickMarksMesh!: LineSegments; public tickIntervalLength: number; // front and back of transformed bounds in camera space @@ -227,6 +228,7 @@ class VisGeometry { this.instancedMeshGroup.name = "instanced meshes for agents"; this.scene.add(this.instancedMeshGroup); + this.showBounds = true; this.resetBounds(DEFAULT_VOLUME_DIMENSIONS); this.dl = new DirectionalLight(0xffffff, 0.6); @@ -439,6 +441,7 @@ class VisGeometry { g: this.backgroundColor.g * 255, b: this.backgroundColor.b * 255, }, + showBounds: true, }; this.gui.addInput(settings, "bgcolor").on("change", (event) => { @@ -448,6 +451,9 @@ class VisGeometry { event.value.b / 255.0, ]); }); + this.gui.addInput(settings, "showBounds").on("change", (event) => { + this.setShowBounds(event.value); + }); this.gui.addButton({ title: "Capture Frame" }).on("click", () => { this.render(0); const dataUrl = @@ -1064,8 +1070,8 @@ class VisGeometry { ); // final pass, add extra stuff on top: bounding box and line paths - this.boundingBoxMesh.visible = true; - this.tickMarksMesh.visible = true; + this.boundingBoxMesh.visible = this.showBounds; + this.tickMarksMesh.visible = this.showBounds; this.agentPathGroup.visible = true; this.threejsrenderer.autoClear = false; @@ -1241,7 +1247,6 @@ class VisGeometry { boundsAsTuple: Bounds ): void { const [minX, minY, minZ, maxX, maxY, maxZ] = boundsAsTuple; - const visible = this.tickMarksMesh ? this.tickMarksMesh.visible : true; const longestEdgeLength = Math.max(...volumeDimensions); // Use the length of the longest bounding box edge to determine the tick interval (scale bar) length @@ -1371,14 +1376,11 @@ class VisGeometry { color: BOUNDING_BOX_COLOR, }); this.tickMarksMesh = new LineSegments(lineGeometry, lineMaterial); - this.tickMarksMesh.visible = visible; + this.tickMarksMesh.visible = this.showBounds; } public createBoundingBox(boundsAsTuple: Bounds): void { const [minX, minY, minZ, maxX, maxY, maxZ] = boundsAsTuple; - const visible = this.boundingBoxMesh - ? this.boundingBoxMesh.visible - : true; this.boundingBox = new Box3( new Vector3(minX, minY, minZ), new Vector3(maxX, maxY, maxZ) @@ -1387,7 +1389,7 @@ class VisGeometry { this.boundingBox, BOUNDING_BOX_COLOR ); - this.boundingBoxMesh.visible = visible; + this.boundingBoxMesh.visible = this.showBounds; } public resetBounds(volumeDimensions?: number[]): void { @@ -1873,8 +1875,7 @@ class VisGeometry { } public setShowBounds(showBounds: boolean): void { - this.boundingBoxMesh.visible = showBounds; - this.tickMarksMesh.visible = showBounds; + this.showBounds = showBounds; } public showPathForAgent(id: number, visible: boolean): void {