* feat(viewer-lib): WIP on the new OrientedSectionTool
* feat(viewer-lib): Added proper face pulling for the oriented section box
* feat(viewer-lib): Several updates on the oriented sectioning tool
- Implemented section planes calculation and propagation
- Unified obb computation from all gizmos
- Implemented proper setBox function
- Updated the viewer-core to work with OBB instead of AABB for it's clipping volume
- Updated the intersections to work with OBB for their intersting bounds
- Added extension methods to Box3 and OBB
* feat(viewer-lib): Better way of handling gizmo input events overlapping
* fix(viewer-lib): Updated clippingVolume occurences to OBB
* feat(viewer-lib): Section outlines now work with oriented section tool!
* feat(viewer-lib): Integrated new section tool with the frontend and API
- Defined an archtype for SectionTool which all section tools can derive from
- The old section tool is renamed to AxisAlignedSectionTool
- Replaced the old section tool with the oriented one in the frontend
* fix(viewer-lib): Fixed compile errors
* feat(viewer-lib): Some updates:
- Section tool outline, the visible box, is now rendered as before however it's correctly being RTE'd. And we can also make it thinner/thicker now
- Fixed the issue where the scale controls had 'exponential' growth. It's now linear like the translate one
* feat(viewer-lib): Implemented highlghting the box face when clicking on it to extend/retract it
* fix(viewer-lib): A bunch of fixes for the oriented section tool
* feat(viewer-lib): Some updates:
- Documented new OrientedSectionTool code
- Fixed som issues related to section box reseting
- Hid the translation and rotation gizmos that we aren't using
- Tidied up a bit
* feat(viewer-lib): Set the translate and rotate gizmos in local space so the rotation will affect them as wll
* chore(viewer-lib): Purged the old section tool
* chore(viewer-lib): Updated section box data type. Updated LegacyViewer section box data handling. Updated frontend to use new data type. Still not working doe
* fix(viewer-lib): Fixed an issue where comments with section boxes did not enable section outlines at startup
* chore(frontend): Fixed ci compiler error
* fix(viewer-lib): Fixes WEB-1593
* feat(viewer-lib): Adding outline rendering support for all/any pipeline:
- Implemented EdgesPipeline as a standalone pipeline. Can be used as is, but it's mostly used by other pipelines to add outline rendering support
- Moved the MRT/non-MRT versions for edge generation inside the EdgesPipeline. This removed a lot of redundant pipelines
- Added optional outline rendering support for all relevant pipelines
* feat(viewer-lib): Added optional edges to the TAA pipeline.
* chore(viewer-lib): Renamed some of the pipelines to be more consistent with the names given by the frontend. Cleaned up older stuff
* chore(viewer-lib): ViewportPass makes sure it requests renders until matcap texture finished loading
* chore(frontend-2): Updated the frontend with the new view mode type changes
* feat(viewer-lib): Some updates on view modes:Added support for outline thickness and color. Removed the background texture option from edges pass
* feat(viewer-lib): Handles WEB-3147:
- Outlines are now displayable on top of any dom element.
- There is one asterisk. Pure black colored outlines (0) do not blend properly because of some browser weirdness
* feat(viewer-lib): All pipelines besides pen now draw the outlines of transparent objects with a bunch of downsides
* chore(viewer-lib): Fixed sandbox errors
* feat(viewer-lib): Updated ViewModes extension to work with pipeline options. Defined EdgesPipelineOptions
* chore(viewer-lib): Fixed sandbox compile errors
* chore(sandbox): Viewer load not object loader only
* chore(viewer-lib): Fixed linting issues. are now optional when setting view modes
* feat(fe): View mode menu changes with no integration
* feat(fe): Frontend view mode menu integration
* fix(viewer-lib): Fixed the false gradient generated at the edges of the screen when in pen mode
* fix(fe): Better naming. Parse line weight to number
* chore(viewer-lib): A few updates:
- ViewModes now caches it's current options so it can properly determine when to do a full pipeline change and when to just update options
- Default pipeline options are now exported by the viewer
- Default pipeline options have edges enabled
* feat(fe): Design changes. Remove unneeded watch. Fix shortcuts
* feat(fe): use dark mode colours. add colour controls
* fix(fe): shortcuts and colours
* fix(fe): reactive defaultColor
* feat(fe): New descriptions. New hex colours.
* feat(fe): add mixpanel. watch darkmode
* fix(fe): fix dark mode watch
---------
Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
* fix(viewer-lib): Figured out the source for the inconsistencies between the TAS node transformation and the shade transformation in regards to using pivot points for RTE.
* feat(viewer): BatchObject now stores the pivot value. Added convenience setters for positions, rotation and scale in BatchObject
* chore(viewer-lib): Updated the rest of the shaders with the scaling fix
* chore(viewer-lib): Reset default stream
- The aabb is created only when not existing. This is to keep the different significance of having a null|undefined bounding box as opposed to an empty one
- computeAABB no longer nukes the aaabb if no position attribute exists on the render view
* feat(viewer-lib): Perpendicular measurement direction now follows mouse
* fix(viewer-lib): Handled WEB-1381. Rogue disc no longer appears
* fix(viewer-lib): Handled WEB-1781. Measurements are no longer selectable by clicking on their line, only the label
* chore(viewer-lib): Added a couple of comments
* fix(viewer-lib): Render is requested after auto lazering
- Basit pass and pipeline have been renamed to Shaded
- Viewer now exports all implemented passes
- Viewer now exports the pass option types as well as defaults
* fix(viewer-lib): Fixed an issue where the section tool inside an empty world would throw off three's clipping plane calculation causing the infamous 'i.toArray is not a function' seen in datadog. Additionally the 'Cannot read properties of undefined (reading 'transparent')' error might also be resolved along side since it seems it was caused by it
* fix(viewer-lib): Fixed another error seen in datadog
* fix(viewer-lib): Fixed another error reported by datadog where diffing materials did not have clipping planes initialized causing exceptions to be thrown in some cases
* fix(viewer-lib): Compiler error
* Color hash from object id attribute
* feat(viewer-lib): Implemented screen space outlines based on object id gradients. Still slightly WIP, but the concept seems to be working fine
* Added engine model for testing outlines update
* feat(viewer-lib): Updates to object-id based gradients
- Id gradients now are now binary. If they are greater than 0, they will get updated to 1. This fixes the issue where similar nearby objects that happen to have similar colors would exhibit a fainter gradient
- Fixed an issue with DepthNormalIdPass where linear depth was not being used
- Cleaned up the edge generator shader
* feat(viewer-viewer): Added instancing support for screen space outline from color id gradients
- Instances now generate a correct and unique color hash based off a batch index and gl_InstanceID when running WebGL 2.0. For WebGL1.0 it's currently not supported
- Removed some unneeded non-null assertion left over from a long time ago
- Extended three.js InstancedMesh in order to add a batch index variable to it. Nothing more
* feat(viewer-lib): Added support for WebGL1.0 for both instanced and non instanced rendering of the color id gradients
- Batcher now takes all the webgl caps instead of just mac vert uniforms and float textures
- The depth-normal-id pass shader now works on both WebGL 1.0 and 2.0.
- When running WebGL 1.0 we dynamically add a per instance attribute buffer with the object id in order to compute hash. If we're running WebGL 2.0 we do not do that and instead rely on the builtin gl_InstanceID so we conserve bandwidth
- Fixed small type issue with the edge generation shader when running WebGL 1.0
* feat(viewer-lib): Updated the edged and shaded view modes to use the depth-normal-id pass
* Restored to main version.
- The orbit controller would not properly report changes in camera movement on a per frame basis becuase of a hardcoded epsilon which was not small enough for very small scenes. Now the epsilon is dynamically computed
- WASD-ing would jitter in very small scenes because of a too large normalization value sent to the position dampers. Now that value is also dynamically computed for small scenes
* fix(viewer-lib): Fixed the issue where v2 lines would not display properly when having both displayStyle and renderMaterial. Now displayStyle takes precedence
* chore(viewer-lib): Fixed typo
- Pressing WASDQE while in orthographic mode will no longer work. WASD-ing is disabled while in ortho
- Fixed an issue with toggling to ortho after dropping out of WASD caused by the origin beingvery close to the camera, making the orthographic size to be huge. Now when this happens, we get the minimum distance from the camera to the geometry and use that distance to compute the orthographic size. If no intersection is found, we just take the halfwy between min and max radius
* feat(viewer-lib): Added property to PointQueryResult which tells if the requested point is in frustum when projecting and unprojecting
* feat(frontend-2): Updated the comment bubbles screen location computation step to account for their anchor's inclusion in the camera's frustum
* fix(viewer-lib): Fixed the issue where billboarded objects from measurements were not getting their position updated properly
* fix(viewer-lib): Disabled orbit sphere frustum culling
* Updated the fly controller to use the z up basis
* Fixed very important compiler error
* Removed the annoying delay when first holding down WASD keys before movement started
* Updated LegacyViewer to use the hybrid camera controls
* Added big baker
* Trying to figure out the essence of this
* Partly works
* Pivotal coordinates now work
* Smoothened out the math abit
* Fixed sandbox error
* Enabled the pivot sphere
* feat(viewer-lib): Fixed some issues with orbiting around cursor
* feat(viewer-lib): Updates to WEB-2313, orbiting around mouse cursor
Orbiting around mouse cursor now works correctly with an orthographic projection as well as when toggling between orthographic and perspective.
Disabled WASD navigation for now.
SmoothOrbitControls now has protected members instead of private allowing extension
Documented the important parts of the pivotal navigation code
* feat(viewer-lib): Mouse orbiting now takes clipping planes into consideration
* chore(viewer-lib): Fixed sandbox build error
* fix(viewer-lib): Handled WEB-2449 and WEB-2450
Additionally fixed an issue where changing the orbit pivot would trigger a hard render, adding the unneeded noise of AO re-convergence
* fix(viewer-lib): Fixed the issue with focusing and other camera animations caused by the introduction on the pivotal CS. Pivot sphere now shows only on orbit
* feat(viewer-lib): Updates on mouse orbiting:
- When clicking outside of the model, oribitig will switch to polar and use the last computed origin (which is still going to be based on the last pivot point)
Made the pivot sphere speckle blue
The pivot sphere now only shows when clicking on objects, when clicking outside of the model it will not show
* feat(viewer-lib): Update for WASD aka fly mode:
- Smoother combined navigation by using the immediate controler position and orientation as opposed the the goal ones
- Pivot sphere properly hides when in fly mode
- The bug where the camera would incorrectly jump when toggling between fly and oribit is now gone (or I cannot reproduce it anymore)
* fix(viewer-lib): Fixed sandbox compile error
* feat(viewer-lib): Added the hybrid fly orbit controller to the legacy viewer
* feat(viewer-lib): Added a slower movement speed to WASD navigation when camera is close to geometry
* fix(viewer-lib): Fixed the issue where opening the context menu while holding down a WASD key would make the camera move indefinetely
* Feat(viewer-lib): Update to WASD controls:
- Disabled cursor orbiting
- Added an option to allow for world space up/down with e/q keys. By default it's enabled
- Fixed the pan speed to work similar to WASD speed in two steps depending how close the camera is to geometry
* chore(viewer-lib): Tidied up a bit
* fix(viewer-lib): Fixed an ugly bug where the camera distance calculataion plane would flip, especially when WASD-ing, and mess up the min distance calculation which led the camera near plane to be way off
* chore(viewer-lib): Swapped E to up and Q to down
* Re-nabled cursor orbiting
- Section outlines are no longer visible behind other geometry. They are depth tested now for all view modes
- Shaded mode aka BastiMode now properly updates the section planes
- FilteringExtension now emits the filtering state changed event when reseting the filtering state
- BasitPass no longer applies the per vertex color indices each frame
- ViewModes extension now listens for filtering state changes and have any active BasitPass reset it's color indices on a filtering reset event. Not great, not terrible but it avoids us having to double cache the per vertex color indices.
* feat(viewer-lib): Updates to the PassReader extension along with underlying viewer library updates
Implemented reading framebuffer contents for framebuffers with multiple attachements. The current version of three.js that we are using does not support this. Because we still need to drag along WebGL 1.0 support, only attachement 0 can be read for now, which does not bother us.
DepthNormalPass now specifies it's MRT output target as the outputTarget
PassReader's read function is now overloaded and it can take a pass name as a string or a GPass | GPass[]
Had to add a small type augmentation since the current version of types-three library does a poor job when it comes to WebGLMultipleRenderTargets
Updated PassReader extension in frontend and updated the call to read in order to make sure depth reading works in other view modes that write depth. The only view mode that does not draw to depth is Shaded mode
* fix(viewer-lib): Fixed the classic sandbox compile error
* fix(frontend-2): Updated depth reading to work with MRT depth from our view mode pipelines
* chore(viewer-lib): Snow mode is no longer default in the sandbox
* fix(viewer-lib): Handles WEB-2417
Shadowcather now properly updates when adding/removing render trees even if the scene bounds does not change
* Handles new measurements reverting to meters even if a different unit was previously set. Handles units not changing properly when changing the unit value
* Remove transition to fix select
* Remove unsused import
* Added back snow
---------
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
* Feat: let it snow
* Feat: Let is snow
* Added santa
* Pipeline pls dont complain
* Dont toggle snow mode
* Add viewer sandbox as dependency
* reinstall
* Copied it manualy
* SnowPipeline now resets the snow batch material after rendering. aka, the snow no longer stays
---------
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>