* WIP on measurements. Got some basic functionalities going
* New update for measurements. We're no showing multiple lines towards the measurement endpoint for better reference. Added dotted lines. Added text. Added measurement end and start points. Added the possibility to add multiple measurements.
* When double clicking, Input will not ignore the second click and will not send a click event. It will send the first click event, then a double click event. Implemented auto perpendicular measurement by using double click
* Added the option to have fixed sized measurement gizmos. As in, the are the same size regardless of the camera zoom. Implemented gizmo styles which lets us control and change at runtime the way the gizmos look. Currently they're only programatic, but I'll add controls for them in the sandbox next
* Implemented measurement management. Added picking, cancelling, removing and highlighting of measurements. Measurements are all now on their special ObjectLayer
* Added frame lock, so mouse events do not trigger intersection tests more than once per frame for the measurements. Added opacity options in the measurement gizmos. Made the end gizmo line transparent by default. Added preprocessor macro in the line shader which enables opacity as a uniform as opposed to attribute only like we had it before
* Point is now fixed size when style imposes it
* WIP on text aligning with the line. Still needs some things to be clarified since it can get complicated. Fixed some color issues. Added a maximum constraint to the screen space gizmo sizes. It's empirical, but seems to be workign decently for the all the various stream sizes I've trid
* Measurement gizmo now flashes red a few times if requrested to auto-lazer and no intersection was found
* Added unit conversion to measurment text, unit display and precision
* Implemented proper billboarding (fixed size and non fixed size) in the text and basic vertex programs as well as support for them in the text and basic speckle materials. Overhauled how the measurements look based on the forge reference
* Split measurements by type and added an abstract superclass. Point to point measurement has it's own implementation now
* Implemented screen space snapping for point to point measurements. Text background now gets dyanamically resized when needed
* End point gizmo is now only shown when required
* Added clamp guard to acos since dot can return outside of [-1,1] due to fp precision issues. Fixed an issue where existing measurements could be selected in the process of creating another measurement
* Added function for adding measurements programatically. Currently only start and end point make sense as measuremetn data
* Added an 100nm offset from the original point along the surface normal for auto-lazer function because sometimes it would intersect itself and report incorrect length
* Separated all measurement related rendering into a separate 'Overlay' pass. We now have better control over the rendering order of the individal elements of the measurement gizmos. This fixed the issue of having the measurement line overlap the end points
* Billboarded shaders now also work correctly with section planes
* Measurement tool no longer considers surfaces clipped by the section box
* Implemented correct raycasting for billboarded and fixed sized bibboarded objects, like the measurement's text
* Implemented zooming in to measurements when double clicking
* Big update to measurements which addresses most if not all requirements regarding UX/UI, API, and generaly functionalities. Additionally, a fix or an ancient issue in Units where kilometers were incorrectly calculated, and added automatically resolution updates to the SpeckleLineMaterial
* Added dpr factor into billboard size calculations. Fixed an issue with the round rect geometry generation function which would fail on macos. Added the billboard text background size into the text's style so it's configurable
* Text can now be updated for perpendicular measurements also when in it's complete state
* Fixed an exception which was thorwn when double clicking on another measurement while measuring
* When changing the measurement type while the measurement is still in it's dangling start state, the measurement gets cancelled and a new one with the new type gets started. If the measurement is in it's dangling end state, then it does not. This is now forge viewer does it
* Implemented screen space surface normal indicator line
* Measurements now work on visible and non-ghosted objects. Removed the surface normal indicator from the point to point measurement
* Fixed an issue with orthogrtaphic camera and NDC normal computation. Implemented fixed sized gizmo disc for orthographic camera
* Fixed an issue where the pipeline would not get properly reset after zooming in orthographic mode
* Fixed some regressions with the pre-existing application measurements functionalit and text. Fixed an issue where auto-lazer measurements were not vertically centered.
* Font loading (hidden under a .png for now). Simple experiments with rendering text
* Added some text rendering tests. WIP on billboarding
* Added tests using troika-text-three library which uses sdf font textures instead of generating text geometry
* WIP on supporting speckle text objects
* Some more work on speckle text object integration. Worked on text materials, text batch and text object. We're now rendering basic text
* We're now rendering the text for various dimension types. Changed text to use display style first, since that's the one that contains it's color.
* Implemented text selection. Text can now be selected and works the same way every other speckle objects works when selecting
* Implemented the rest of the filtering features for text.
* Batch building can now be async. Building text batches needs to be async because that's how the troika libary works. Fixed an issue with the section box not clippin text properly
* Removed dummy text geometry data from it's RenderData. Enabled render views with metadata to count as valid. getRenderableRenderViews now returns nodes with metadata as well. Text now supports proper unit conversion. Text now is being displayed correctly(-ish) when inside blocks. Autocad text is now being displayed
* Fixed an issue with curves doubling up on geometry and also not being selectable after the last filtering changes. Added the options to make lines transparent. Added lines to diffing
* Points now are diff-able and support proper visual diff-ing. Visual diff filters are now chosen internally by the Differ. Fixed an issue with LineBatch and transparency
* Implemented PLAIN visual diff mode, where all objects keep their original materil, but opacity is manipulated via the diff time. Added API member function to switch between the PLAIN and COLORED visual diff modes
* Diffing fixes for instances and blocks. Things seem to be working fine, but there are some caveats. Additionally, some older issues were fixed and diffing now works better on all the rest of the streams
* Fixed the diffing issues with revit instances and hosted elements and nesting, etc. SetUserMaterial now accepts an optional list of rvs to apply the filter to, instead of figuring out the rvs itself.
* WIP on naive diffing
* WIP on animating modified objects after diff
* Some more work on this
* Default building
* Removed and added now get opacity transitions as well
* Updated starting model
* Implemented two 'subpasses' in side the color pass, where opaque and transparent draw groups are rendered individually. Disabled double side depth rendering when visual diffing, to avoid AO generated by backfaces, visible through transparent diffed objects. Removed previous hacks
* Finished with cleaning up diff-ing related viewer functionality.
* Implemented UserMaterialState into filtering manager, as a 'sticky' filter which always gets applied before any other filters, until removed. Visual diff-ing and undiff-ing now go through the filtering manager so other filters can be stacked on top of it
* diff API function now checks to see if the diffing streams exist, if not, it loads them, computes the diff and applies the visual diff all in one call. Added undiff in the API which removes all the diff related sticky filters. Added setDiffTime in the API. DiffResult now holds modifiedOld and modifiedNew speckle objects in the same member as 2 item sequential arrays
* There was an unreported git conflict in one of the shaders. Fixed that
* Fixed an issue with HDRIs not generating proper PMREMs over multiple viewer instances
* WIP on makign the world tree multiple instanced
* The WorldTree is no longer static. Each viewer has it's own instance and it hands it over to whoever needs it.
* Fixed an issue with filtering and the new non-static tree. Also removed the 'root' key from the NodeData structure since it's not needed
* Added an guard when building batches for situations where all render views have invalid geometries. This generally means there is somethign wrong with the stream itself
* multi-viewer css fixes
---------
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
* The ObjectLoader and ViewerObjectsLoaders are disposed upon loading complete.
* Added viewer parameter for keeping or discarding original geometry data. Defaults to discarding it. WIP on mesh and point cloud implementation for actual discarding it
* Geometry data from raw nodes is now disposed after building their reder views
* Removed raw geometry data from points and lines
* Removed the float64 array which was persisted pointlessly by the section plane outlines feature. Also fixed a bug for this feature regarding resizing the point buffer and RTE
* Implemented BVHs in local space, relative to world origin. This cuts down on it's redundant memory footprint by half
* Implemented SpeckleMeshBVH which completely hides the RTE-related transformations that we're making to reduce memory footprint.
* Added some clarifications to the SpeckleMeshBVH class
* Implemented async walk for the world tree. Implemented asyn render tree building and async batch building. Implemented progressive loading
* WIP tree walk async that actually works using a generator
* Async walking now properly works and can be interrupted
* Properly working async walk
* Added loadObjectAsync function in the API which should be used if stream loading needs to be cancelled and for 'progressive' loading. Added a priority argument to the loadObjectAsync and to walkAsync functions which makes the async-iness so to speak configurable.
* Refactored the sync and async subtree batch building to remove duplicate code. Changed some logs for better clarity
* Fixed an issue with point clouds and material creation
* Added a verbose flag in the viewer params. Default is false and it's equivalent to the ERROR level
* Piggybacked the original pointer event into the SelectionEvent