Commit Graph

3350 Commits

Author SHA1 Message Date
Dimitrie Stefanescu c452458812 experiments(dui3): extra cleanup and comments around 2023-07-10 20:12:35 +01:00
Alexandru Popovici cc055fbc7a Alex/#1670 undead patch (#1680)
* After removing inserted draw ranges, materials associated with it are removed as well from the material array

* Solid color diff materials are transparent only when their opacity is lower than 1. This fixes the issue of not seeing the selected material on filly opaque diffed materials. However, for dif times <1 and > 0 the selected material will blend with the diff material. If this proves to be an issue we can look further into it

* Update clipping planes after selection
2023-07-10 21:52:09 +03:00
Dimitrie Stefanescu 5f3b7a16f2 experiments(dui3): super wip work 2023-07-10 17:01:49 +01:00
Alexandru Popovici dba377aaec Alex/#1658 Frontend Integration Performance Increase (#1670)
* 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.

* Replaced the full blown copy method from SpeckleMesh's cached material with a faster version which *should* work just the sam

* Added optional copying of cached materials defaulting to false

* Implemented the option to insert draw ranges in batches. This is how selecting objects now works in order to avoid re-applying existing filters pointlessly. The onyl downside is that this introduces extra draw calls and overdraw, but it does not interfere with the existing draw range setting systems. We do make an attempy to minimize extra draw call count which works for most scenarios. With this change, we've removed selecting/unselecting objects from the generic setFilters approach in FilteringManager

* Apply any pre-existing selection filter after applying the rest of the filters

* Improved 'setNumericColorFilter' and 'setStringColorFilter' function performance by 10x. The culprit was calling 'indexOf' in the tree walk callback which apparently is very slow even for arrays with only a few thousand elements. By using direct indexing we eliminated the ridiculous overhead

* Performance increase of about 20x to isolating, hiding, unisolating and unhiding. Still WIP, the UI got messed up a bit

* Correct length of visibility ids

* Fixed an issue with un-isolating and un-hiding

* Did the same thing for highlight as I did for selection, where we take it out of the setFilters flow and apply direct filters on the rvs

* Removed timings

* Small fix for color filters

* Implemented inserting and removing draw ranges from the line batch

* Implemented draw range insertion and removel for the point batch

* Implemented draw range insertion and removel for TextBatch. Fixed an issue with inserting draw ranges in the batcher

* Fixed diffing colours which got screwed during this PR. Additionally made an even faster version for copying materials which has virtually no overhead
2023-07-10 12:55:38 +03:00
Dimitrie Stefanescu ca63e2936a experiments(dui3): super wip work 2023-07-09 22:19:55 +01:00
Dimitrie Stefanescu 0923c3f1d2 experiments(dui3): super wip work 2023-07-09 19:00:20 +01:00
Iain Sproat ffc3c5186f chore(node): bump to 18.16.1 (#1675) 2023-07-07 16:54:18 +01:00
Alexandru Popovici f775c66ff4 BlockInstances now support hosted elements and work the same as RevitInstances (#1671) 2023-07-07 11:55:19 +03:00
Kristaps Fabians Geikins eec29d44e2 fix(fe2): spotlight & zoom extents fixes (#1672) 2023-07-07 11:07:26 +03:00
Dimitrie Stefanescu 97add85d2e experiments(dui3): super wip work 2023-07-06 18:02:34 +01:00
Kristaps Fabians Geikins 9e25843db4 feat(fe2): fe2 signifying header 2023-07-03 17:49:52 +03:00
Kristaps Fabians Geikins a50f8dca3a fix(fe1): post-auth redirect broken after access_code querystring removal 2023-07-03 17:08:41 +03:00
Kristaps Fabians Geikins 30fdc71fcd fix(fe2 & fe1): log out on invalid auth token on any GQL call (#1666)
* fix(fe2): log out on invalid auth token on any GQL call

* fix(fe1): redirecting to login page on any 403 GQL req

* WIP invalid token

* stricter toker invalidation checks in FE1

* stricter token check in FE2 as well
2023-07-03 15:04:57 +03:00
Dimitrie Stefanescu 76d2f475f5 experiments(dui3): coupled with some other rhino experiments that i need to push still, investigating some patterns re composables & co. in nuxt and possibly having a strategy around multiple host app bindings 2023-07-01 20:41:57 +01:00
Kristaps Fabians Geikins 1c1a5eaf36 fix(fe1): log out on invalid auth token 2023-06-30 11:23:23 +03:00
Kristaps Fabians Geikins 40fec1efde fix(fe2): various diff mode fixes (#1663)
* fix(fe2): diff not loading if referenced version is an old one

* fix(fe2): diff closing when thread open
2023-06-29 16:55:29 +03:00
Dimitrie Stefanescu e62c0aa38d Merge pull request #1652 from specklesystems/dim/fe2/edits
FE2 Polish
2023-06-29 12:22:09 +01:00
Kristaps Fabians Geikins fdd9bd3899 feat(fe2): New discussion button in viewer (#1661)
* feat(fe-2): new discussion button in viewer

* invoking selection as well

* more adjustments
2023-06-29 14:14:52 +03:00
Dimitrie Stefanescu 033516e669 fix(fe2): last tweaks and comments 2023-06-29 10:25:49 +01:00
Dimitrie Stefanescu 8739e176fc revert(fe2): reverts debounce wait, hopefully making eslint happy 2023-06-28 18:06:40 +01:00
Dimitrie Stefanescu 5f1d9deb86 feat(fe2): disabling tour controls 2023-06-28 18:01:36 +01:00
Kristaps Fabians Geikins 8f0af9efbd fix(viewer): fixed three.js imports to hopefully fix fe2 (#1660)
* fix(viewer): fixed three.js imports to hopefully fix fe2

* undoing viewer changes that break preview service
2023-06-28 16:04:29 +03:00
AlexandruPopovici 4bea65909d Removed sandbox warnings 2023-06-28 11:37:20 +03:00
Gergő Jedlicska 075fb82907 add FE2 terminology to commit create webhook (#1657) 2023-06-28 09:17:55 +02:00
Dimitrie Stefanescu 852ee6af1f fix(fe2): onboarindg project cleanup 2023-06-27 18:14:31 +01:00
Dimitrie Stefanescu b37eccc8a1 feat(fe2): sign up notification for non-logged in users 2023-06-27 16:55:02 +01:00
Dimitrie Stefanescu cf8647e89d fix(fe2): removes uneeded console logs 2023-06-27 16:30:45 +01:00
Alexandru Popovici 5844280e35 Alex/measurements (#1639)
* 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.
2023-06-27 15:13:39 +03:00
Alexandru Popovici cc9f70a723 Fixed the issue. The problem was that three.js would force deep clones of our custom uniforms stored in userData when copying. We also have textures in the there, so deep cloning the texture data was slowing everything down quite a lot. (#1654) 2023-06-27 15:12:29 +03:00
Dimitrie Stefanescu 6e7763d470 fix(fe2): double click zoom was broken, now it's fixed 2023-06-23 17:58:53 +01:00
Dimitrie Stefanescu 9805896c62 feat(fe2): getFirstVisHit caching - speedup for selection/zoom events in large models with isolated or hidden elements 2023-06-23 17:58:15 +01:00
Dimitrie Stefanescu 3b23fe524a feat(fe2): segmentation last tweak post mkting feedback 2023-06-23 16:50:35 +01:00
Dimitrie Stefanescu 82382a5e1a feat(fe2): swapped checkbox for FromCheckbox 2023-06-23 13:14:18 +01:00
Dimitrie Stefanescu 802f3c9924 fix(fe2): newsletter changes 2023-06-22 16:35:49 +01:00
Dimitrie Stefanescu 7962d56530 Merge branch 'main' into dim/fe2/newsletter-registration 2023-06-22 15:42:21 +01:00
Dimitrie Stefanescu d8afd14b71 Merge pull request #1641 from specklesystems/alex/fe2-isolation-issue
Alex/fe2 isolation issue
2023-06-22 12:43:05 +01:00
Kristaps Fabians Geikins 8d85829dad feat(ui-components): FormSelectBase exposed triggerSearch 2023-06-21 19:03:39 +03:00
AlexandruPopovici 7ce82d2caa Removed cache invalidation 2023-06-20 12:31:10 +03:00
AlexandruPopovici 0b29aa1c13 Fixed startup isolation issue 2023-06-20 12:25:13 +03:00
Kristaps Fabians Geikins 2df84c243e fix(fe-2): invalid comment placement when placed inside isolated obj (#1640)
* fix(fe-2): weird comment positioning

* feat: viewer dev helpers
2023-06-20 09:17:49 +03:00
Dimitrie Stefanescu 56ea1bc843 feat(server): cleaned up boilerplate & using injected ref for consent tracking in fe register panel. 2023-06-16 15:57:33 +01:00
Alexandru Popovici a52bb75414 Fixed the issues in #1611. There is still an issue left, where zooming in in orthographic mode, then switching to perspective does not yield the correct camera distance, especially when the controls target is off model (#1616) 2023-06-16 15:55:27 +03:00
Dimitrie Stefanescu d5bb3b9923 feat(server): mailchimp plumbing 2023-06-16 13:34:04 +01:00
Dimitrie Stefanescu e72ed56eee feat(fe2): wip newsletter registration consent box 2023-06-15 17:52:25 +01:00
Dimitrie Stefanescu 7310056305 Merge pull request #1632 from specklesystems/dim/stream-wrapper-forward-compatibility
feat(server): allows getting branches by name or id from the same api endpoint
2023-06-15 15:54:28 +01:00
Dimitrie Stefanescu a6921705c6 feat(server): allows getting branches by name or id from the same api endpoint 2023-06-15 12:50:01 +01:00
Kristaps Fabians Geikins f6e0662547 fix(fe2): comment viewerState not loading correctly (#1630) 2023-06-15 12:26:41 +03:00
Kristaps Fabians Geikins fb7b51c7aa unblocking CI 2023-06-14 17:52:47 +03:00
Dimitrie Stefanescu 97ace08a7b fix(fe2): props fix for onboarding dialogs 2023-06-14 13:18:10 +01:00
Dimitrie Stefanescu 0c7b0edc97 Merge pull request #1620 from specklesystems/dim/fe2/mp
feat(fe2): onboarding checklist, segmentation checkup & intro videos
2023-06-13 16:17:23 +01:00