aa17a48533
* fix(viewer-lib): Transformed is no longer baked in if matrix is identity * fix(viewer-lib): Do not use uint32 indices unless we have to * fix(viewer-lib): Do not use Float64 array unless the batch needs RTE * feat(viewer-lib): Update on reducing memory allocation during startup: - Geometry data is now stored as separate DataChunks as they come - Dechunking now no longer allocates memory. It just returns the DataChunk array - Updated the SpeckleGeometryConverter to work with chunk arrays - Updated Geometry and triangulation to work with chunk arrays - All geometry type batches now work with chunk arrays instead of flattened arrays - Chunks are tracked by use and deleted after all render views are done with them. The chunks also track their usage across different render views so they aren't deleted until all render views that use tham are finished with them - In order to better support this new way of working with geometry data, VirtualArray and ChunkArray classes have been implemented. They make it easier to work with segmented data and offer a unified view on the array of array segments * chore(viewer-lib): Denormalized normals to keep parity, even though they should be normalized * feat(viewer-lib): Geometry transformation is now deferred until we build batches, and we transform the batched arrays leaving the original data chunks intact. Text and TextBatchObject now use the render view's 'transform' property to store it's final startup transformation and not 'bakeTransform' anymore * fix(viewer-lib): Fixed the issues caused by chunking geometry to the acceleration structures. * chore(viewer-lib): Made a pass on the entire viewer project and removed pointless typed array backing buffer re-allocations * feat(viewer-lib): Updates on better large model support: - Fixed an issue in LineBatach that broke building it - Improved VirtualArray performance and added some extra functionality - Already triangulated faces no longer allocate redundant memory, they get processed in place - Moved triangulation to SpeckleConverter so that processed index chunks get stored in local storage so we don't have to re-triangulate each time * feat(viewer-lib): Gave up on trying to cache triangulated indice. Too much hasle and edge cases to handle when only some chunks get saved as triangulated in a multi chunk setup * fix(viewer-lib): Fixed non triangulted geometry converter return * feat(viewer-lib): Glow-up to our triangulation implementation. Faster, zero allocation * fix(viewer-lib): Frontfacing not backfacing triangles * chore(viewer-lib): Fixed compile errors * fix(viewer-lib): Already processed chunks just copy over * fix(viewer-lib): Skip processed chunks when computing triangulation index size * fix(viewer-lib): Some fixes: - Fixed an issue where instances that will not be rendered as instanced geometry were not correctly transformed - Removed geometry duplication from instances that were de-instanced in the batcher - Fixed an issue with LineBatch and buffer type * fix(viewer-lib): Implemented box3 bounds generation from ChunkArray which takes care to respect inter-chunk bounds for vec3. Without this, box3s were incorrectly calculated by computing a box3 for each chunk * fix(viewer-lib): Fixed an issue where transformations that contain non-uniform scaling incorrectly produce node render views aabb values. So we recompute them based on the post-transform geometry when building batches * fix(viewer-lib): When mixing triangles with ngons we also need to increment total tris count for the triangle case as well * fix(viewer-lib): If geometry is invalid, clear it all * fix(viewer-lib): Instanced rvs no longer transform their aabbs when building the render tree because they don't need to * fix(viewer-lib): aabb for render views needs to be recomputed when de-instanced by the batcher
The Speckle Viewer
Documentation
Complete documentation here Migration guide here
Examples
You can find readily available examples in the documentation here
Development
- run
yarnin the repo root to install and link all required dependencies. - run
yarn devin the viewer package (here) to start a dev build with automatic code refresing of the viewer code. - run
yarn devin the viewer-sandbox package to start the viewer sandbox.
Feedback
We would love to hear your feedback in this forum thread.
Community
If in trouble, the Speckle Community hangs out on the forum. Do join and introduce yourself! We're happy to help.
License
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. If you have any questions, don't hesitate to get in touch with us via email.