Time series indicators#647
Conversation
…ud because it is multiplied by two in the the shader. Fixing will require additional work. Will leave for now
There was a problem hiding this comment.
Code Review
This pull request introduces TransectMeshes.tsx, which provides SquareMeshes and ColumnMeshes components to visualize time-series indicators across various plot types including DataCube, FlatMap, PointCloud, and Sphere. It also updates coordinate parsing and shader logic to support these new visualizations. Several critical issues were identified in the new components: a break statement in a loop should be a continue to avoid skipping valid data, and the manual instantiation of Three.js objects within useMemo without disposal will cause GPU memory leaks. Additionally, ColumnMeshes in DataCube.tsx lacks proper scaling to align with the main geometry, and using array indices as React keys for the meshes may cause rendering bugs.
There was a problem hiding this comment.
Code Review
This pull request introduces a new component, TransectMeshes.tsx, which provides SquareMeshes and ColumnMeshes for visualizing transect data across several plot types, including DataCube, FlatMap, PointCloud, and Sphere. It also updates the time series data structure to include normal and UV coordinates and includes minor optimizations to the point vertex shader. Feedback focuses on critical memory management issues in the new components, specifically the creation of Three.js geometries and materials within loops inside useMemo without disposal. Additionally, a logic bug was identified in SquareMeshes where a break statement incorrectly terminates a loop that should continue processing other entries.
Previously I had highlighted timeseries in the shaders. This was really convoluted and would have made it even more convoluted to include the colors of the lines. Additionally, the info didn't carry between plots.
This update creates meshes for each of the time series
And they persist in the other formats
Closes #592
Bug Fix
ynormals to select timeseriesKnown issue
Because the pointcloud uses different logic for timescaling the columns along time don't lineup with the timelength of the point cloud plot. Trying to accomodate for this variable scaling is the reason the AxisLines got so complicated in #445. Instead of trying to accomodate I will keep things simpler and think about how I can make the pointcloud scaling more intuitive and mesh with other components in the future. So for now the timeseries doesn't work as expected in pointcloud.