* 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>
* Quick hack to demo how an offline loader would work with as little complication as possible
* Further simplified yielding objects in offline mode
* Commented out the URL thing
* Implemented SpeckleOfflineLoader. JSON parsing is implemented at object-loader level, completely isolated from the rest of the implementation in order to avoid regression
* Isolated ObjectLoader creation in base SpeckleLoader class so any extended classes can overwrite the way the object loader is created and used
* Removed the big json sample file
* Updated version
* Removed unused functions from objectloader
* Restored viewer package version
* Fixed typo
* Renamed and moved the sample offline Speckle JSON
* Replaced the default JSON object sample with a much smaller one since we don't want to increase the sandbox's build size by 10 megs
* Fixed a linting error
* Improve shortcuts
* WIP
* View Mode menu
* Styling updates
* split activeControls
* Reusable Menu component
* Menu updates
* Sun menu updates
* Tidyups
* CommonAlert
* Updates
* WIP change to currentViewMode
* Serialization
* defineModel
* Tidy up emits
* Remove v-model
* Force close other panels
* Remove transition
* More robust isTypingComment
* activeControl > activePanel
* View menu shortcuts
* Explode menu definemodel
* Small changes from Benjamin
* Add colors view mode
* Fix server problem in data.ts
* Fix build
* Fixed the issue where TAS only shapecasts were not running properly on all batch objects, missing some of them. Some small updates to BoxSelection
* Improved shapecast travesal time 4X. Only passing batch objects only once to intersectTASRange and also added the builtin CONTAINED acceleration to bounds testing.
* Some critical typescript errors
* Added missing types from export
* Added FilterMaterial and related types to export list
* Handled WEB-1389
* Camera orbit controls now takes the offset position and size when computing zoom to cursor coordinates. Fixes WEB-1611