GaussianSplats3D icon indicating copy to clipboard operation
GaussianSplats3D copied to clipboard

Typescript support

Open MarcusAndreasSvensson opened this issue 2 years ago • 2 comments
trafficstars

Hey,

I'd like to hear your stance on this topic.

Personally I think it's a great developer tool and a great aid when exposing the API to the end user.

I'd happily convert the existing code if you'd like me to.

MarcusAndreasSvensson avatar Nov 15 '23 10:11 MarcusAndreasSvensson

I've definitely thought about using it for this project, but I'm still not quite sure. Typescript makes more sense to me for larger projects and projects that have a lot of contributors so it seems a little overkill for something like this. Let me stew on this for a while longer :)

mkkellogg avatar Nov 16 '23 04:11 mkkellogg

I did a proof-of-concept port to typescript a while back (not as clean as it could be). You can see it at here: gle-gs3d.

It's definitely difficult to maintain a port while the library is still under heavy development.

If you just want to provide support for typescript consumers, you can generate typescript declarations during the build process. I ended up using a fork to do just that, which you can see here: gle-gaussian-splat-3d

The pertinent bits are in the rollup.config.js where you can use rollup-plugin-dts to generate the declarations.

Wonderful library by the way, I've been using it in my React Three Fiber / Cesium gle-scene-components project and it works exceptionally well!

Here's an example.

2023-11-22_20-03-25

guyettinger avatar Nov 23 '23 01:11 guyettinger