flutter_3d_objects 1.0.1+1 copy "flutter_3d_objects: ^1.0.1+1" to clipboard
flutter_3d_objects: ^1.0.1+1 copied to clipboard

A Flutter package project that renders Wavefront's 3D object files.

[Flutter 3D Objects] #

pub package style: effective dart License: MIT

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:
  • Add 3D Models in assets, file type should be .obj
flutter:
assets:
- assets/pallet.obj
- assets/carton.obj

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),
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}
2
likes
140
pub points
69%
popularity

Publisher

unverified uploader

A Flutter package project that renders Wavefront's 3D object files.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, path, vector_math

More

Packages that depend on flutter_3d_objects