Commit Graph

860 Commits

Author SHA1 Message Date
Alexandru Popovici a43aaedcca On Demand Automatic RTE (#4808)
* chore(viewer-lib): testing numbers

* feat(viewer-lib): Implemented a way to compute the projected pixxel difference between fp32 and fp64 as it would happen on the GPU. With this we can determine which streams need RTE

* feata(viewer-lib): Proper precision loss detection

* feat(viewer-lib): Removed default 'USE_RTE' defines from all non instanced mesh materials. Updated standard shader to compile and work properly in non RTE mode

* fix(viewer-lib): non-RTE vertex transform also takes pivot into account

* feat(viewer-lib): All required vertex programs now have proper non-RT vertex and shadow transformation pipelines

* feat(viewer-lib): Mesh batch determines if it needs RTE on it's own

* feat(viewer-lib): Shadowmap now also renders properly with selective RTE

* feat(viewer-lib): Instanced batches no longer use RTE regardless of the RTE need source

* feat(viewer-lib): Lines now have no RTE by default and it's only enabled on demand by the batch when required

* feat(viewer-lib): Points and point clouds no longer use RTE by default. It's enabled on demand
2025-05-26 15:22:26 +03:00
Alexandru Popovici 0ef0a13979 Pro Measurement Tools (#4452)
* feat(viewer-lib): WIP on area measurement

* feat(viewer-lib): WIP on area measurement. Basics are working. Needs more bling

* feat(viewer-lib): Implemented polygon triangulation for measured area

* chore(shared): Updated MeasurementType

* Add Area control to measure panel

* feat(viewer-lib): Real time updates of the fill polygon and area value

* feat(viewer-lib): Added pole of innacessibility as area label anchor using the polylabel libraryh

* feat(viewer-lib): Fixed fill polygon material

* feat(viewer-lib): Changed the surface normal indicator from the faulty disc to a outlined rectangle. Looks and works much better now

* fix(viewer-lib): Measurements get clipped by sections planes

* faet(viewer-lib): Measurements can now optionally define their own snapping method. Area measurement snaps to first point in screen space. Generic vertex snap still applies if enabled

* fix(viewer-lib): Forgot to project the measured point

* feat(viewer-lib): Double click auto-finishes the area measurmenet by instantly joining with the first point. Right clikc removes current area measurement point so you can 'undo'

* fix(viewer-lib: Fixed a stupid bug relatedto text because somebody thought that making it 'async' would be sooooo cool...

* fix(frontend): Prevent zoom on double click when using area measurement

* chore(viewer-lib): Refined and fomralized a bit now that the general idea of a measurement has got more complex

* chore(viewer-lib): Moved state switching a bit

* chore(viewer-lib): Replaced the old disc normal indicator with the new one and made it standard. Added an option to the gizmo's style that determines the pixels size of the normal indicator

* chore(viewer-lib): Documented the area measurement tool

* chore(viewer-lib): Some updates:
- Implemented proper bounds getter for area measurement
- Got rid of the static vector buffers in Measurement and replaced them with consts where needed
- Reduced the min click timing from 250ms to 150ms
- Other small adjustments

* feat(viewer-lib): Added the option to chain measurements

* chore(frontend-2): Added toggle for measurement chaining

* chore(viewer-lib): Perpendicular measurement chaining now align on the same line as requested

* feat(viewer-lib): Implemented point (coordinate) measurement:
- Added support for billboard offseting in NDC in the shader via vec2 offset uniform. Not a dream come true, but required mostly because of how troika works
- SpeckleText background now follows text anchoring
- Implemented new POINT measurement type

* chore(viewer-lib): Separated label position calculation. We now update only the label transform each frame, instead of updating the entire label redunantly

* chore(viewer-lib): Offsets are now constants. Removed redundant vector and matrix creation

* chore(frontend-2): Placeholder radio button for point measurement type. Fixed compile errors

* fix(viewer-lib): Fixes WEB-3105. Export all measurement types

* updated icons

* Update description

---------

Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2025-05-26 12:10:19 +03:00
Alexandru Popovici b50076ee29 Explode + Outlines (#4792)
* fix(viewer-lib): Implemented event for explode extension that allows section outline to sync up

* chore(sandbox): Fixed compile error
2025-05-22 10:03:31 +03:00
Alexandru Popovici daefbbf2a3 fix(viewer-lib): Added relative epsilon to section outlines. Added constant epsilon to setting orbit controls position and target (#4781) 2025-05-22 09:43:00 +03:00
Alexandru Popovici f8701d8cd3 fix(viewer-lib): Loader disposes of the object loader instance after it's not longer required (#4783) 2025-05-21 14:12:08 +03:00
Alexandru Popovici a385823b2d feat(viewer): objectloader2 integration (#4267)
* feat(viewer-sandbox): Made a sandbox function that will only invoke the object-loader loading objects

* first pass of creating an objectloader2

* updated build + added vitest

* try to get viewer sandbox to use new code

* sandbox type fix

* refactor a bit

* can download root

* intermediate commit for downloader/caching queue

* can download stuff!

* refactor files

* intro isBase and fix isString

* move single download to downloader

* fix download

* PR feedback

* some intermediate commit

* do clean up and download better

* clean up promises and linting

* can generate values while downloading and caching

* add a finish method

* remove unused functions

* remove asBase

* add temporary docs

* add more docs with mermaid

* add more test models

* add response validation

* add tests and redo options

* add test for download batch

* fix downloader tests and change Item to have clearer Base items

* add tests and refactor a little

* use fetch in downloader as an option

* use optional in-memory indexdb instead of monkey patching the global one

* more refactors for options for objectloader2

* add tests for objectloader2

* adjust single download

* benchmark loading and adjust ol2 batches

* download more!

* adjust to use hash privates

* refactored again with renaming

* cleanup

* make setupCacheDb throw instead

* use BatchedPool for downloads!

* fix tests

* adjust timings and add adaptive waiting

* Only wait if queue wasn't empty and queue size was full

* fix tests

* fix file names and some private usage

* fix interval and private usage

* rename vars

* use params for methods

* fix params for constructors and tests

* fix params for constructors and tests again

* using dexie

* faster settings but doesn't end well

* fixed end, optimized and removed logs

* fix tests

* fix types?

* update lock with WSL

* add e2e small model test

* fix/update yarn.lock

* Remove unused eslint ignore to fix pre-commit

* prettier fixes

* fix real DB usage

* rename methods to better match OL1

* rename methods to better match OL1 again

* add extra header collection

* add headers correctly

* test getTotalObjectCount

* feat(viewer-lib): Replaced old object loader with Adam's  objectloder2

* fix(viewer-lib): Removed the old object loader. Removed unneeded pause time in speckle loader

* Testing

* only deferred if not downloaded....don't save everything

* Lockfile

* pool isn't adjustable, adjust download buckets, dexie read is faster

* chore

* fix(viewer-lib): Fixed compiler errors

* fix getObject access with real indexeddb...adjust buffer for deferred access

* Fix disposal and pausing

* don't index item!

* fix dockerfiles to use OL2

* fix Dockerfile

* Fix dockerfile

* defer correctly and use record to add/lookup/remove to

* delete stuff correctly

* chore(sandbox): Enabled viewer loading

* use objects instead of arrays to avoid findIndex

* remove extra count

* add a found cache to avoid some db hits

* order matters for deferment

* move found map to deferment

* change option numbers

* 2 level cache with expiry

* defer everything, use loader to track what is requested....expire only found items

* add deferment disposal

* oops mismerge

* chore(sandbox): Default stream

* Beta version of CachePump and CacheReader

* Clean up initialization

* More clean up

* chore(objectloader2): Fixed CI compiler error

* chore(objectloader2): Fixed prettier

* add cachePump tests

* add cacheReader tests

* fixed more tests

* fixed final tests

* moving stuff around and lock return value

* try to move stuff out of objectloader2

* use a factory

* rename factory

* formatting

* eslist fixes

* try allocating no strings

* add comments

* small refactor and add another test

* fix deferment expiration and have test

* use byte size for max memory cache size

* fix deferment manager tests

* saved comment

* fix(viewer-sandbox): Fixed compiler error

* ignore tshy

* chore(frontend): Attempt to make viewer loading sequential

---------

Co-authored-by: Adam Hathcock <adam@hathcock.uk>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-05-21 10:05:50 +03:00
Alexandru Popovici 854deffdcb fix(viewer-lib): Depth bias for screen space outline is now being computed as a relative value when using viewe modes (#4769) 2025-05-20 11:59:51 +03:00
Alexandru Popovici 0a284dd7ae fix(viewer-lib): Fixes WEB-3432 (#4763) 2025-05-19 14:25:52 +03:00
Alexandru Popovici 12545c6f16 Oriented Section Tool (#4230)
* 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
2025-05-19 11:30:50 +03:00
Alexandru Popovici d90d503495 fix(viewer-lib): Outline opacity is now correctly applied (#4751)
* fix(viewer-lib): Outline opacity is now correctly applied

* fix(viewer-lib): Fixed compile errors
2025-05-15 13:05:57 +03:00
Alexandru Popovici 879c9a4b08 fix(viewer-lib): Edges pipeline now is explicit about which object visibilities to render, avoiding rendering colored masked objects (#4719) 2025-05-13 15:12:34 +03:00
Alexandru Popovici 900c18bbcf View Modes 1.5 (#4625)
* 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>
2025-05-09 15:06:18 +03:00
Alexandru Popovici 6bd69707d9 chore(viewer-lib): Enabled usage of text v3. Temporary passthrough until proper implementation (#4661) 2025-05-05 15:16:04 +03:00
Alexandru Popovici d0d8658ae9 fix(viewer-lib): Possible fix for isolating with non atomic ids provided (#4620) 2025-05-05 12:11:38 +03:00
Alexandru Popovici 1402a16d29 RTE Transform Inconsistencies (#4469)
* 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
2025-04-28 11:22:02 +03:00
Alexandru Popovici b943bed091 fix(viewer-lib): Fixes to how render view bounding boxes are computed: (#4516)
- 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
2025-04-22 12:40:39 +03:00
Iain Sproat 920099c39f chore(readable code): use TIME_MS for readable durations
- we recently added TIME_MS helper; this applies it to existing durations
2025-04-18 17:51:43 +01:00
Alexandru Popovici a42498f357 fix(viewer-lib): Fixed '3d' canonical view (#4480) 2025-04-18 13:02:13 +03:00
Alexandru Popovici 3b2146f0de chore(viewer-lib): URLHelper now fails early if it cannot build the URLs (#4404)
* chore(viewer-lib): URLHelper now fails early if it cannot build the URLs

* chore(viewer-lib): Style change

* fix(viewer-lib): Sandboxerrors
2025-04-14 18:14:42 +03:00
Alexandru Popovici 0195f65067 fix(viewer-lib): Implemented proper interpolation for angles which gets rid of incorrect rotation jumps while animating camera rotation (#4311) 2025-04-07 14:58:08 +03:00
Alexandru Popovici 7296b37fc4 Alex/webxr (#4291)
* feat(viewer-lib): WIP WebXr stuff

* Working WebXR stuff

* Restored some unrequired changes

* feat(viewer-lib): Implemented WebXrViewer which wraps three's xr functionality

* faet(viewer-lib): Implemented basic webxr functionality via WebXrViewer

* Revert "feat(viewer-lib): Implemented WebXrViewer which wraps three's xr functionality"

This reverts commit 8798f265b7c0d0c654e588e16f0aefd4ecd5508c.

* feat(viewer-lib): Some more small changes

* feat(viewer-lib): Added comments, refined a bit the sample xr extension

* Reverted XR stuff

* Restore yarn lock
2025-04-01 11:21:45 +03:00
Alexandru Popovici 1f40f49140 Measurements Update #1 (#4293)
* 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
2025-03-31 21:06:49 +03:00
Alexandru Popovici 2f8d75bc67 fix(viewer-lib): Merging indices has been broken for over two years. Fixed now (#4098) 2025-03-28 11:33:00 +02:00
Alexandru Popovici 3e3de6df5b fix(viewer-lib): When resetting the selection, the shadowmap is re-rendered. This allows correct shadows after de-selecting outline only selections. Also re-enabled stream loading in th sandbox (#4280) 2025-03-27 23:36:48 +02:00
Adam Hathcock 975f0e1a51 feat(objectloader): ObjectLoader2: use indexdb as cache and batch download objects (#4172)
* feat(objectloader2): Made objectloader2 to be faster!

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-03-27 10:47:10 +00:00
Iain Sproat b00e3c1ead Merge pull request #4273 from specklesystems/iain/web-2910-obj-directory-in-packagesviewersrcmodulesloaders-is-required
fix(.gitignore): include OBJ directory in viewer loaders
2025-03-27 06:36:56 +00:00
Iain Sproat 66c9f9ab6c fix(.gitignore): include OBJ directory in viewer loaders 2025-03-26 20:02:46 +00:00
Alexandru Popovici c0178ac70a fix(viewer-lib): Fixed an issue where the shadowcatcher would not seemingly update unless the scene changed it's size (#4268) 2025-03-26 17:35:16 +02:00
Alexandru Popovici 5348c32cca feat(viewer-lib): Hidden objects are now ignored by default when oribiting around cursor (#4265) 2025-03-26 12:07:46 +02:00
Alexandru Popovici 01cbd46939 chore(viewer-lib): Updates to the export list (#4258)
- 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
2025-03-26 10:27:03 +02:00
Alexandru Popovici 4371945b71 DataDog Error Fixes (#4255)
* 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
2025-03-25 09:05:40 +02:00
Alexandru Popovici fe7d435d8c fix(viewer-lib): Fixed an issue which caused incorrect zoom to cursor and rotate around cursor behavior on some relative layout pages (#4233) 2025-03-21 09:06:53 +02:00
Alexandru Popovici c962d2c6fa Screen Space Outlines Update (#4185)
* 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.
2025-03-17 11:07:37 +02:00
Alexandru Popovici f7fd0371b5 feat(viewer-lib): Implemented Region displaying (#4194) 2025-03-14 21:55:09 +02:00
Alexandru Popovici d122873f0e fix(viewer-lib): Fixed the issue where ghosted lines would not appear transparent (#4174) 2025-03-12 17:02:44 +02:00
Kristaps Fabians Geikins b1ed49297b chore: fix objectloader sourcemaps in datadog (#4136) 2025-03-07 14:07:00 +02:00
Kristaps Fabians Geikins f7ac90b520 chore: better viewer sourcemaps in datadog (#4132) 2025-03-07 10:01:59 +02:00
Kristaps Fabians Geikins ec092fb042 chore: move common workspace plan/feature config to @speckle/shared (#4064)
fix: gqlgen regenerated
2025-02-27 11:18:30 +02:00
Kristaps Fabians Geikins 1d2a594f0a chore: upgrade TS 5.2 -> 5.7.3 & ESLint to 9.20.1 (#4032)
* chore: upgrade TS 5.2 -> 5.7.3

* vite dts fix

* lint fix

* resolutions fix

* ui comp build fix

* precommit fix?

* latest eslint version

* autoloader fix

* undo unnecessary viewer change

* eslint fixes fe2 + trying disabled type linting

* lint fixes
2025-02-20 14:18:18 +02:00
Alexandru Popovici cd2fbd657e Fix(viewer-lib): Empty normals array force viewer normal calculation (#4002) 2025-02-18 12:57:40 +02:00
Alexandru Popovici e9997f1c62 feat(viewer-lib): Loader now allows unknown type for resourceData, so each loader can treat it the way it wants (#3981) 2025-02-13 17:32:25 +02:00
Alexandru Popovici 647141cca9 feat(viewer-lib): Added support for custom vertex normals. Moved nnormal computation from batch level to object level, handling WEB-596 in the process (#3944) 2025-02-12 23:25:45 +02:00
Alexandru Popovici 065c242ef5 fix(viewer-lib): Fixes two issues regarding very small scale streams (#3930)
- 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
2025-02-04 17:10:07 +02:00
Alexandru Popovici f367a2ff02 Lines with Both displayStyle and renderMaterial Fix (#3913)
* 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
2025-02-04 13:03:22 +02:00
Alexandru Popovici b50f1fa43d fix(viewer-lib): Updates to WASD and orthographic projection: (#3922)
- 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
2025-02-04 10:21:18 +02:00
Alexandru Popovici cff48b98c9 Comment Bubbles WASD Fix (#3920)
* 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
2025-02-03 17:10:24 +02:00
Alexandru Popovici 118807139b Billboards Position Fix (#3919)
* 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
2025-01-30 19:19:44 +02:00
Alexandru Popovici a3d1e6adec Orbit WASDEQ Controls (#3875)
* 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
2025-01-30 16:05:51 +02:00
Alexandru Popovici 0cd9487040 fix(viewer-lib): Fixed RTE shaders on MacOS and iOS. Hope they don't break it again (#3907) 2025-01-29 11:01:26 +02:00
Alexandru Popovici 2eaaa93adf Intel IrisXe Fix (#3877)
* fix(viewer-lib): Found a working workaround for mangled geometry on intel iris Xe integrated GPUs

* fix(viewer-lib): Added sample stream
2025-01-23 16:08:27 +02:00