Last updated:
0 purchases
flutter 3d objects
[Flutter 3D Objects] #
This package allows Flutter developers to easily display 3D models in their applications. It supports the .obj file format and provides functionalities to manipulate the scene, including setting camera positions and adding objects with child objects.
Features:
Display 3D models from .obj files
Add and manipulate objects within the scene
Set camera positions to adjust the view
Support for hierarchical object structures
Setup #
How to use this
Add dependency in pubspec.yaml
dependencies:
flutter:
sdk: flutter
flutter_3d_objects:
copied to clipboard
Add 3D Models in assets, file type should be .obj
flutter:
assets:
- assets/pallet.obj
- assets/carton.obj
copied to clipboard
Usage #
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Cube(
onSceneCreated: (Scene scene) {
scene.world.add(
Object(
fileName: 'assets/carton.obj',
position: Vector3(1, 1, 1),
scale: Vector3(1, 1, 1),
),
);
},
),
),
),
);
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.