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

Scenes may get stuck when scrolling #17

Closed Peque closed 3 years ago

Peque commented 3 years ago

Removing this code seems to fix it, but it is probably a hard performance hit when scrolling pages with many 3D objects (i.e.: CadQuery's documentation):

        // check if it's offscreen. If so skip it                                                                     
        if ( rect.bottom < 0 || rect.top > renderer.domElement.clientHeight ||
             rect.right < 0 || rect.left > renderer.domElement.clientWidth ) {

            return; // it's off screen

Maybe we can do something else to fix it without sacrificing performance.

Peque commented 3 years ago

Fixed with 544d46de049c7cd5cb70450d2a32db538a23f70c.

The performance hit does not seem to be catastrofic...

Opened https://github.com/Peque/sphinxcadquery/issues/18