Commit Graph

780 Commits

Author SHA1 Message Date
Benjamin Ottensten 17c8bda080 Update examples link (#3344) 2024-10-19 08:31:50 +02:00
Alexandru Popovici 4bce48a6d8 Handled WEB-2025 (#3329) 2024-10-17 17:02:08 +03:00
Alexandru Popovici 4b82fb24a4 Viewer now exposes the converter and the render tree. Some members of classes from the loader system are now protected instead of private in order to properly extend them (#3302) 2024-10-16 14:25:40 +03:00
Dimitrie Stefanescu e70f2a21ee Merge branch 'main' into dimitrie/cnx-636-fe-handle-properties-correctly 2024-10-15 11:48:29 +01:00
Dimitrie Stefanescu 3ce8dff6da feat(fe2): re-adds syntatic sugar for new properties coming out of revit & sorts selection props alphabetically 2024-10-15 10:36:04 +01:00
Iain Sproat 8860f76a6f chore(deprecate FE1): update urls to point to *.speckle.systems (#2515)
* chore(deprecate FE1): update urls to point to *.speckle.systems

* Revert change to urlhelper.ts

* Update the logo in the helm chart
2024-10-14 19:30:00 +01:00
Kristaps Fabians Geikins adc7abe63d chore(server): core IoC #40 - favoriteStreamFactory (#3252) 2024-10-14 10:44:45 +02:00
Alexandru Popovici 1a2a3d27df Box Rotation (#3205)
* Added rotation to speckle box type objects

* Addded orthogonal check
2024-10-09 12:05:28 +03:00
Alexandru Popovici 4bcf3cc1d9 Highlight no longer breaks existing filtering operations (#3187)
Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
2024-10-07 16:16:30 +01:00
Alexandru Popovici 5cd9dbd0f0 Fixed le bug (#3127) 2024-09-26 10:58:30 +03:00
Alexandru Popovici 8352aaea15 Fixed an issue where the converter would fail if display valyues were not directly displayable objects (#3075) 2024-09-24 13:56:19 +03:00
Alexandru Popovici e430e55214 Viewer Exports Update (#2903)
* Updated viewer type exports. Added missing types and removed tVector3 and Box3 from three

* Updated import source for Vector3

* Updated viewer-sandbox imports
2024-09-23 15:03:30 +03:00
Alexandru Popovici 2f8efeabc5 WEB-1799: Camera Staying in the same location across models (#2862)
* Fixed the issue with camera controller incorrect zoomToBox when switching between loaded objects. If zoomToBox is requested as non animated, now it actually is non animated. Added a default function to the camera controller extensions which moves the camera to the predefined location/orientation

* No radius is specified as default
2024-09-23 15:03:00 +03:00
Alexandru Popovici f8878b4459 Fixes diffing errors with DUI3 instances (#2869) 2024-09-04 12:00:43 +03:00
Alexandru Popovici 3d96b77340 Fixed WEB-1793 (#2854) 2024-09-03 12:01:14 +03:00
Alexandru Popovici 46bc09eac9 Color Proxy source (#2799)
* Color source implementation for a single level of instancing. I don't like it. I don't believe it's the right way to go

* Forgot this

* Rewritten the way prxy color sources are handled. Nesting instances now works for the most part

* Handled block-block situation from instance nesting

* Added sum comments for color proxy source implementation

* Disabled tonemaping for line materials
2024-08-29 14:42:27 +03:00
Alexandru Popovici 419dbab36d Fixed conflicts (#2764) 2024-08-29 12:34:49 +03:00
Alexandru Popovici 997e80168c Was checking only for undefined, but color materials can also be null (#2718) 2024-08-20 22:32:27 +03:00
Alexandru Popovici ba5e7cb790 Fixed an issue with coloring and filtering with instances which caused improper gradient index buffer accesses (#2681) 2024-08-19 21:21:45 +03:00
Alexandru Popovici cd727e1582 Viewer Color Proxies (#2672)
* Color proxies are now parsed and colors are being assigned. Added the TechnicalMaterial to node render view, which will wrap the colors

* Dropped TechnicalMaterial in favor of MinimalMaterial which is also the superclass(interface) for RenderMaterial and DisplayStyle and only stores a color.

* Fixed a few issues with hashing color materials that made lines and points not get properly colored

* Fixed sandbox error
2024-08-19 21:21:29 +03:00
Alexandru Popovici 76b5964d9d Implemented a separate for object-loader which can be used autonomously (#2647) 2024-08-14 14:01:04 +03:00
Dimitrie Stefanescu 79fc523d9c chore(viewer): adds logger for the case, as per king alex's request 2024-08-06 10:26:53 +01:00
Dimitrie Stefanescu ded5e12279 feat(viewer): handles missing instance components gracefully 2024-08-05 13:48:13 +01:00
AlexandruPopovici 6f0313649f Fixed linting 2024-07-26 15:02:36 +03:00
AlexandruPopovici f1f62ebc09 Addd early return if no material proxies exist 2024-07-26 13:14:53 +03:00
AlexandruPopovici 71746747fc DUI3 render materials implementation 2024-07-26 13:07:26 +03:00
AlexandruPopovici 3e93b1ddc0 Merged 2024-07-22 10:38:02 +03:00
AlexandruPopovici b89ad00a5f URLHelper now uses the auth token for old URLs, if present 2024-07-18 11:42:57 +03:00
AlexandruPopovici c2e8fb2082 Merged 2024-07-18 11:14:31 +03:00
Alexandru Popovici 7c5130d617 Dynamic AO Disabled (#2482)
* Quick hack to disable the visibility of dynamic AO

* Dynamic AO can now be gracefully turned off via options, and any other passes that it required are also turned off so we don't waste GPU time

* ApplySAOPass now has a PASSTHROUGH render mode, where it just outputs the static ao texture sample.

* Added a debug mode to the pipeline when toggling debug passes
2024-07-18 11:02:42 +03:00
AlexandruPopovici 17795259ef Support for lower case 'objects' 2024-07-18 10:39:44 +03:00
AlexandruPopovici 393d08d7af FIxed linting error 2024-07-17 19:31:13 +03:00
AlexandruPopovici 2bd3d5843e More efficient and straightforward DUI3 instancing 2024-07-17 19:19:18 +03:00
AlexandruPopovici 3ccd49aa99 Merge branch 'main' into alex/DUI3 2024-07-17 17:17:05 +03:00
AlexandruPopovici 18ab05b140 First draft of DUI3 instancing 2024-07-17 17:13:55 +03:00
Kristaps Fabians Geikins 9e318a58cb fix(viewer): dev command not working (#2511) 2024-07-17 13:28:43 +03:00
AlexandruPopovici 6d4f5abc57 Merge branch 'main' into alex/sRGB-vertex-colors 2024-07-16 16:47:01 +03:00
Kristaps Fabians Geikins 3313787f16 fix(viewer): viewer node16 support + fixing up package.jsons (#2442)
* fix: viewer node16 support + fixing up package.jsons

* lockfile fix

* Removed unnecessary type augmentations. Deleted unused SpeckleCameraControls

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
2024-07-15 15:16:13 +03:00
AlexandruPopovici e23d8cdfa0 Fixed the underlying issue. When the camera moves inside the bounds of a TAS batch object and we can no longer get a min dist from that batch object, we just use the fallback emipiric value. Also added an option to display TAS BVH for debuging purposes 2024-07-08 13:44:59 +03:00
AlexandruPopovici f37dce3539 Trying to debug the TAS bvh 2024-07-05 23:09:45 +03:00
AlexandruPopovici a5e77d8d36 Added sRGB->linear vertex color conversion in the geometry converter. Not all connectors may send their vertex colors in sRGB but this is what we agreed we're going to treat vertex color space for now 2024-07-05 13:18:25 +03:00
Alexandru Popovici ccd1c14e09 Threads Undead Patch (#2475)
* Fixed sandbox lint error

* Gave up with trying to enforce a standard basis across camera controller and applications. Now getPosition and getTarget will always be in whatever basis the camera controller is set to be

* No more pre-transformation to (0, 1, 0) for canonical and speckle views and when computin nearest point on geometry

* Reverted transformations from onboarding

* Updated comments

* Fixed the issue where if thread was active at stream load time, the camera position and orientation would be off. This specific issue occured only at startup and it was because the min.max radius for the orbit controls were not yet computed, the frontend calling setView before the orbit controls had a chance to update and compute it's min/max. Also fixed an issue where min distance computation was not using the correct camera positon, but rather the goal position
2024-07-05 10:28:56 +03:00
Alexandru Popovici 36f8e3b651 Increased the scale of the expanded bounds when testing for intersection to better account for BVH intersection point fp precision errors on very small numbers (#2448) 2024-07-02 16:14:26 +03:00
Alexandru Popovici 3c2b0165e5 Soft Pipeline Reset (#2452)
* Simplified a lot from the Pipeline's render loop. UpdateFlags.Render now does not reset the pipeline. Added UpdateFlags.RESET_RENDER which resets the pipeline. Measurements now do not reset the pipeline needlessly

* Fixed sandbox lint error

* Accumulation now starts automatically based on the current accumulation frames count. SectionTool no longer resets the pipeline without a reason. Changing light paramters no longer reset s the pipeline without a reason. Clipping plane updating no longer resets the pipeline, except when the planes are actually set. Highlight and selection now no longer reset the pipeline. Explosion does reset the pipeline

* Fixed sandbox linting error
2024-07-02 16:12:49 +03:00
Alexandru Popovici 15e9ad9462 Oboarding undead-patch (#2456)
* Fixed sandbox lint error

* Added back the polar view and setting it. Changed the onboarding hardoced vectors from Z up to Y up, since that's what the camera controller now requires when setting inline views
2024-06-28 21:05:08 +02:00
Alexandru Popovici 254867e038 Dynamic Near Camera Plane (#2434)
* Added model-viewer's orbit camera control implementation. All the features from the old orbit controls are now functional with the new one

* Figured out the relation between radius and fov. Added zoom decelariting when getting closer to origin. This feature was present in the old controller but lacking in this one

* WIP

* Added infinite zooming

* First version of infinite zoom and zoom to cursor

* A few improvements on zoom to cursor. Inifite zoom and zoom to cursor now work together. Simplified the implementation

* Added orthographic camera functionality in the controller without hte special features

* Zoom to cursor now works with orthographic projections. Switching between perspective and orthographic while keeping all functionality correct now works

* Minor cleanup a ton more to come

* Added controls dampening in the sandbox

* Adapted frontend to the new controller plus some additional changes to the controller options in general

* Implemented setting inline and polar viewers. However mosts of the time spent was dedicated into understanding why the frontend checks for changes in the camera each frame, and if it finds one forces the camera viewer to the inline one. I haven't figured out why it's doing this and it seems very wasteful. There probably is a better way of achieving the same thing

* Orbit Controller now computes it;s cartesian value based on spherical in a function so it can be used in multiple places. Replaced getting the current camera position with the target camera position in frontend frame update callback as the old camera controller did

* Follow mode now works properly

* Sandbox fix

* Disabled debug spheres

* WIP on fly controls

* Correct basis transformations for fly controls

* Added QE up/down movement to fly controls

* Minimum radius is now dynamic and accounts for scene size

* Fixed an issue with zooming to cursor when infinetely zooming

* Fixed inconsistencies between zooming normally and infinetely for both zooming to cursors and otherwise

* Further fixing zooming to cursor when infinetely zooming

* Zoom radius modulation

* Fine tuning zooming radius and wheel modulation. I think I got to some defaults that seem good enough for all scene scales.

* Defaulted to 30ms decau time for dampers

* Added a 'tasOnly' argument in all 'intersect' variants. This will only intersect the TAS(es) and provide an intersection result. When requesting an intersection with 'firstOnly' set, onyl the first intersected TAS will be queried further and it's first intersected BAS will provide the intersection result. Conditioned zooming to cursors by needing to have any geometry under the cursor; Fixed some small issues with  functions in the acceleration structures.

* Restricted intersecting onyl when zooming

* Geometry intersection when zooming does not affect infinetely zoom anymore, only zoom to cursor

* Temporary disabled firstHitOnly

* raycastFirst now works correctly in the context of tasOnly param true or false

* Added dampers to the fly controls so we have consistency across various camera controller types.

* Added statinary function

* WIP on controls

* Debuging orbit controller issues on ipad

* More consolidation work on the interface for SpeckleControl and our current implementations for it

* Added controller toggle-ing

* Making the controllers work from immediate data

* There are no more spaces left I can transform from/to. Done them all. Works fine now essentially. Just need to clean stuff up

* SpeckleControls now provide an 'up' vector, and basis transformation is computed that way rather than requirig a mat4 directly. Fixed two issues with event locking on orbit and fly

* More cleanup, more fixes, more grind

* Controllers now have consistency in the basis they provide the position and target into. As well as the fromPositionAndTarget function. It will always be in a basis where (0,1,0) is up. This is required because certain parts of three.js assume that basis

* FlyController is now properly relative-itiez

* Sorted out options for both controls. Dampening is now done via options

* Small fixes for frontend integration

* Fixed the issue with quaternions misaligning around PI

* Added consistent orthographic resizing

* Fixed camera focusing when in orthographic mode

* Implemented disabling/enabling rotations with the new controls. Removed PolarView since it was never used. Canonical views WIP

* Made the HybridCameraController with the simplest implementation possible that seamslessly combines both camera controls. This is for testing to get an idea about how it feels. Removed zoomToCursors when not on geometry. Increased regular zoom speed

* Using constants since move speed is a modifier

* lock fix

* Removed HybridCameraController. Increased maximum zoom. Removed toggling camera controls with Space. New way to apply canonic views, this time a correct one

* Handled WEB-1102. Kept the old empiric near plane calculation. Still usable through the camera controller's options. Moved far plane calculation from SpeckleRenderer to CameraController.

* Implemented a closestPointToPoint on a halfplane. This is so that the BVH gives us the closest point on the positive halfplane of the camera and the resulting minimal distance to the 0 camera plane is correct. Added fallback to empiric near plane calculation when the scene does not contain a built BVH, aka it's only points and/or lines
2024-06-28 12:23:11 +03:00
Alexandru Popovici 07dff717cf Colored Points by Properties Fix (#2436)
* Fix for points not getting the gradient texture with the colors when filtering by properties

* Allowed Points to use displayStyle
2024-06-26 13:27:31 +03:00
Alexandru Popovici f844b6d22e Viewer Navigation (#2416)
* Added model-viewer's orbit camera control implementation. All the features from the old orbit controls are now functional with the new one

* Figured out the relation between radius and fov. Added zoom decelariting when getting closer to origin. This feature was present in the old controller but lacking in this one

* WIP

* Added infinite zooming

* First version of infinite zoom and zoom to cursor

* A few improvements on zoom to cursor. Inifite zoom and zoom to cursor now work together. Simplified the implementation

* Added orthographic camera functionality in the controller without hte special features

* Zoom to cursor now works with orthographic projections. Switching between perspective and orthographic while keeping all functionality correct now works

* Minor cleanup a ton more to come

* Added controls dampening in the sandbox

* Adapted frontend to the new controller plus some additional changes to the controller options in general

* Implemented setting inline and polar viewers. However mosts of the time spent was dedicated into understanding why the frontend checks for changes in the camera each frame, and if it finds one forces the camera viewer to the inline one. I haven't figured out why it's doing this and it seems very wasteful. There probably is a better way of achieving the same thing

* Orbit Controller now computes it;s cartesian value based on spherical in a function so it can be used in multiple places. Replaced getting the current camera position with the target camera position in frontend frame update callback as the old camera controller did

* Follow mode now works properly

* Sandbox fix

* Disabled debug spheres

* WIP on fly controls

* Correct basis transformations for fly controls

* Added QE up/down movement to fly controls

* Minimum radius is now dynamic and accounts for scene size

* Fixed an issue with zooming to cursor when infinetely zooming

* Fixed inconsistencies between zooming normally and infinetely for both zooming to cursors and otherwise

* Further fixing zooming to cursor when infinetely zooming

* Zoom radius modulation

* Fine tuning zooming radius and wheel modulation. I think I got to some defaults that seem good enough for all scene scales.

* Defaulted to 30ms decau time for dampers

* Added a 'tasOnly' argument in all 'intersect' variants. This will only intersect the TAS(es) and provide an intersection result. When requesting an intersection with 'firstOnly' set, onyl the first intersected TAS will be queried further and it's first intersected BAS will provide the intersection result. Conditioned zooming to cursors by needing to have any geometry under the cursor; Fixed some small issues with  functions in the acceleration structures.

* Restricted intersecting onyl when zooming

* Geometry intersection when zooming does not affect infinetely zoom anymore, only zoom to cursor

* Temporary disabled firstHitOnly

* raycastFirst now works correctly in the context of tasOnly param true or false

* Added dampers to the fly controls so we have consistency across various camera controller types.

* Added statinary function

* WIP on controls

* Debuging orbit controller issues on ipad

* More consolidation work on the interface for SpeckleControl and our current implementations for it

* Added controller toggle-ing

* Making the controllers work from immediate data

* There are no more spaces left I can transform from/to. Done them all. Works fine now essentially. Just need to clean stuff up

* SpeckleControls now provide an 'up' vector, and basis transformation is computed that way rather than requirig a mat4 directly. Fixed two issues with event locking on orbit and fly

* More cleanup, more fixes, more grind

* Controllers now have consistency in the basis they provide the position and target into. As well as the fromPositionAndTarget function. It will always be in a basis where (0,1,0) is up. This is required because certain parts of three.js assume that basis

* FlyController is now properly relative-itiez

* Sorted out options for both controls. Dampening is now done via options

* Small fixes for frontend integration

* Fixed the issue with quaternions misaligning around PI

* Added consistent orthographic resizing

* Fixed camera focusing when in orthographic mode

* Implemented disabling/enabling rotations with the new controls. Removed PolarView since it was never used. Canonical views WIP

* Made the HybridCameraController with the simplest implementation possible that seamslessly combines both camera controls. This is for testing to get an idea about how it feels. Removed zoomToCursors when not on geometry. Increased regular zoom speed

* Using constants since move speed is a modifier

* lock fix

* Removed HybridCameraController. Increased maximum zoom. Removed toggling camera controls with Space. New way to apply canonic views, this time a correct one
2024-06-25 15:21:47 +03:00
Alexandru Popovici 829a1965b3 WEB-1096: DataDog Errors (#2409)
* We're now catching possibe QuateExceeded errors from IDB in the local storage

* findId with undefined or null id now returns null

* cacheStoreObjects now returns a promise regardless
2024-06-20 12:38:33 +03:00
Alexandru Popovici 5472896fce Fixed WEB-1104 (#2370) 2024-06-14 00:26:40 +03:00