gdsestimating / three-dxf

A dxf viewer for the browser using three.js
MIT License
538 stars 171 forks source link

THREE.TextGeometry does not exist #90

Open gilligas opened 1 year ago

gilligas commented 1 year ago

an error occurs when three-dxf is imported: 'TextGeometry' (imported as 'THREE') was not found in 'three'

this is because indeed THREE does not contain TextGeometry. I believe changing this in index.js resolves the issue:

on the imports: +import { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry';

On the body of the code: -geometry = new THREE.TextGeometry(entity.text, { font: font, height: 0, size: entity.textHeight || 12 }); +geometry = new TextGeometry(entity.text, { font: font, height: 0, size: entity.textHeight || 12 });