wasabia / three_dart

three.js rewrite by Dart, Dart 3D library. an easy to use, lightweight, cross-platform, general purpose 3D library.
MIT License
450 stars 80 forks source link

support stl file? #151

Open Lanlanxiao opened 9 months ago

Lanlanxiao commented 9 months ago

support stl file?

Lanlanxiao commented 9 months ago

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

Knightro63 commented 9 months ago

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.

JayKay135 commented 9 months ago

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);