Search packages, repositories and app categories

GitHub repositoryzesage/flutter_cube

flutter_cube

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

flutter_cube project cover
Stars
281
Forks
92
Last push (UTC)
Jul 9, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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.1.0

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

Zebiao Hu GitHub avatar
GitHub author

Zebiao Hu ↗

Just a coder! Languages: Flutter, Dart, Go, Delphi.

Shenzhen
LanguagesDartSwiftKotlinRubyObjective-C

Packages published by this repository

Dependencies used

Dependency list 4 items

  • flutter{"sdk":"flutter"}
  • vector_mathany
  • path—
  • flutter_testDevelopment{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗