error message:
Viewer.js?185e:135 Uncaught TypeError: Cannot set property 'renderer' of undefined
at Viewer (Viewer.js?185e:135)
at eval (CadTest.vue?49ba:27)
at Object.eval [as onLoad] (three.module.js?5a89:41120)
at MockXMLHttpRequest.eval (three.module.js?5a89:35704)
at MockXMLHttpRequest.dispatchEvent (mock.js?411c:8513)
at XMLHttpRequest.handle (mock.js?411c:8335)
error code path:
var renderer = this.renderer = new THREE.WebGLRenderer({antialias: true, alpha: true});
package version:
"view-dxf": "^1.5.1"
demo code:
`
var dxf = new DxfParser().parseSync(bt)
new THREE.FontLoader().load('/fonts/helvetiker_regular.typeface.json', res => {
Viewer(dxf, document.getElementById('cad-view'), 500, 500, () => {
console.log('用户操作之后的回调函数')
})
})
error message: Viewer.js?185e:135 Uncaught TypeError: Cannot set property 'renderer' of undefined at Viewer (Viewer.js?185e:135) at eval (CadTest.vue?49ba:27) at Object.eval [as onLoad] (three.module.js?5a89:41120) at MockXMLHttpRequest.eval (three.module.js?5a89:35704) at MockXMLHttpRequest.dispatchEvent (mock.js?411c:8513) at XMLHttpRequest.handle (mock.js?411c:8335)
error code path: var renderer = this.renderer = new THREE.WebGLRenderer({antialias: true, alpha: true});
package version: "view-dxf": "^1.5.1"
demo code: `
` bt and json loaded success.