three_dart icon indicating copy to clipboard operation
three_dart copied to clipboard

support stl file?

Open Lanlanxiao opened this issue 2 years ago • 3 comments

support stl file?

Lanlanxiao avatar Dec 27 '23 03:12 Lanlanxiao

目前支持 stl 格式吗? 我看js 是支持的,flutter 版本 目前没有看到

Lanlanxiao avatar Dec 27 '23 03:12 Lanlanxiao

Hi @Lanlanxiao,

I have added stl loader, but I am still working on other updates before I make the pull request.

Please go to https://github.com/Knightro63/three_dart_jsm/blob/main/lib/three_dart_jsm/loaders/stl_loader.dart to see the conversion.

Hope this helps.

Knightro63 avatar Dec 30 '23 23:12 Knightro63

You could also use my package from pub.dev https://pub.dev/packages/urdf_parser. It contains a STL + DAE loader and URDF parser.

Just add the package to your project and do:

three.Object3D stlObject = await STLLoader(null).loadAsync("path to stl file");
scene.add(stlObject);

JayKay135 avatar Jan 01 '24 21:01 JayKay135