vagran / dxf-viewer

DXF 2D viewer written in JavaScript
Mozilla Public License 2.0
290 stars 86 forks source link

Three.js exception, undesired bounding sphere calculation #102

Closed vagran closed 5 months ago

vagran commented 5 months ago

With the most recent three.js version this exception may appear:

THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.

Seems three.js attempts to calculate bounding sphere assuming 3D-vertices geometry buffer layout, which is not true for dxf-viewer. Waiting for three.js issue resolution.

vagran commented 5 months ago

Fixed by disabling objects sorting in the renderer.