Open tiye opened 3 years ago
Hello! Thank you very much for this amazing library @spite. I made a new version of a library using vite and typescript. I would be happy to PR it on your repo but I went a bit yolo and had to use --allow-unrelated-histories. https://github.com/utsuboco/THREE.MeshLine
Temporary I published it on npm under the name meshline. It should work the same way, and it now exports es(2.89kb brotli) and umd(3.13kb).
If anyone could take over in cleaning the code that would be amazing.
Here a working example with react-three/fiber: https://codesandbox.io/s/confetti-typescript-meshline-0f4mi?file=/src/index.tsx
EDIT: Added typescript definitions in 2.0.3
Hello! Thank you very much for this amazing library @spite. I made a new version of a library using vite and typescript. I would be happy to PR it on your repo but I went a bit yolo and had to use --allow-unrelated-histories. https://github.com/RenaudRohlinger/THREE.MeshLine
Temporary I published it on npm under the name meshline. It should work the same way, and it now exports es(2.89kb brotli) and umd(3.13kb).
If anyone could take over in cleaning the code that would be amazing. I am not very strong with typescript maybe @xia-st you could be interested in helping on this part I saw your PR.
Here a working example with react-three/fiber: https://codesandbox.io/s/confetti-forked-0f4mi?file=/src/index.js
Hi @RenaudRohlinger, if you build it using typescript, it's better to also generate the d.ts file and include them in the package so other typescript users can use it too.
Class constructor BufferGeometry cannot be invoked without 'new'
Error continues, anyone has solved this?
Well, already an PR https://github.com/spite/THREE.MeshLine/pull/143 but....
interested in this fix
The code uses https://github.com/spite/THREE.MeshLine/blob/master/src/THREE.MeshLine.js#L12
however recently threejs has some changes to make use of ES6 classes
https://github.com/mrdoob/three.js/wiki/Migration-Guide#127--128
need an update now.