CadQuery / sphinxcadquery

An extension to visualize CadQuery 3D files in your Sphinx documentation
BSD 3-Clause "New" or "Revised" License
13 stars 4 forks source link

Change canvas position from absolute to fixed #13

Closed Peque closed 4 years ago

Peque commented 4 years ago

https://threejsfundamentals.org/threejs/lessons/threejs-multiple-scenes.html

Currently, when scrolling, the position of the scenes drawn into the canvas will lag behind the rest of the page.

Applying this change will let the canvas scroll with the rest of the page which means whatever we draw will stick with the page as it scrolls even if we're too slow to render. When we finally get a chance to render then we move the canvas so it matches where the page has been scrolled and then we re-render. This means only the edges of the window will show some un-rendered bits for a moment but the stuff in the middle of the page should match up and not slide.

Peque commented 4 years ago

Implemented in v1.2.1.