c962d2c6fa
* 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 Speckle Viewer
Documentation
Complete documentation here Migration guide here
Examples
You can find readily available examples in the documentation here
Development
- run
yarnin the repo root to install and link all required dependencies. - run
yarn devin the viewer package (here) to start a dev build with automatic code refresing of the viewer code. - run
yarn devin the viewer-sandbox package to start the viewer sandbox.
Feedback
We would love to hear your feedback in this forum thread.
Community
If in trouble, the Speckle Community hangs out on the forum. Do join and introduce yourself! We're happy to help.
License
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. If you have any questions, don't hesitate to get in touch with us via email.