Skip to content

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

License

Notifications You must be signed in to change notification settings

fluttercuba/flutter_cube

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Cube

pub package

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

Getting Started

Add flutter_cube as a dependency in your pubspec.yaml file.

dependencies:
  flutter_cube: ^0.0.6

Add Wavefront's object files to assets.

flutter:
  assets:
    - assets/cube/cube.obj
    - assets/cube/cube.mtl
    - assets/cube/flutter.png

Import and add the Cube widget to your project.

import 'package:flutter_cube/flutter_cube.dart';
... ...
  
@override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Cube(
          onSceneCreated: (Scene scene) {
            scene.world.add(Object(fileName: 'assets/cube/cube.obj'));
          },
        ),
      ),
    );
  }

Screenshot

screenshot screenshot screenshot

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 93.9%
  • Swift 2.6%
  • Kotlin 2.1%
  • Ruby 1.2%
  • Objective-C 0.2%