flutter_fbx3d_viewer 0.0.1

  • Readme
  • Changelog
  • Installing
  • new63

Flutter FBX 3D Viewer #

Flutter package for viewing FBX 3D animated files

This library is experimental. Some FBX files, particularly older fbx files, may not load correctly. No guarantee is provided as FBX is a closed proprietary format.

This library is based on the dart_fbx library

alt text alt text alt text

Example #

  size: Size(ScreenUtils.width, ScreenUtils.height),
  zoom: 30,
  path: "assets/knight_2014.fbx",
  fromAsset: true,
  showInfo: true,
  rotateX: false,
  rotateY: false,
  showWireframe: true,
  wireframeColor: Colors.blue,
  initialAngles: Math.Vector3(270, 10, 0),

FBX Viewer

Properties #

path: you can add an asset path (fromAsset=true) or you can add an SD card path (fromAsset=false)

zoom: Initial zoom.

showInfo: Show infos like FPS, and vertices.

rotateX: Animating the object with a rotateX.

rotateY: Animating the object with a rotateY.

showWireframe: Show the wireframe.

wireframeColor: Color of the wireframe.

initialAngles: Initial model angles.

Limits #

FBX is a closed format, so while this library does it's best to interpret the data in an FBX file, I cannot guarantee that it will read all FBX files, or all data within FBX files.

Author #

Kozári László in 2020.01.16

License #

Licensed under the Apache License, Version 2.0 (the "License")

[0.0.1] - Release

  • Flutter package for viewing FBX 3D animated files

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_fbx3d_viewer: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_fbx3d_viewer/flutter_fbx3d_viewer.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Fix lib/flutter_fbx3d_viewer.dart. (-1 points)

Analysis of lib/flutter_fbx3d_viewer.dart reported 2 hints:

line 18 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: Fbx3DViewer.initialAngles, Fbx3DViewer.zoom

line 142 col 3: The declaration '_handlePanX' isn't referenced.

Fix lib/widgets/scaling_gesture_detector.dart. (-0.50 points)

Analysis of lib/widgets/scaling_gesture_detector.dart reported 1 hint:

line 72 col 9: Name non-constant identifiers using lowerCamelCase.

Format lib/fbx3d_model.dart.

Run flutter format to format lib/fbx3d_model.dart.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/utils/logger.dart (Run flutter format to format lib/utils/logger.dart.)
  • lib/utils/math_utils.dart (Run flutter format to format lib/utils/math_utils.dart.)
  • lib/utils/screen_utils.dart (Run flutter format to format lib/utils/screen_utils.dart.)

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-10 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and flutter_fbx3d_viewer.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
fbx ^0.2.0 0.2.0
flutter 0.0.0
vector_math ^2.0.8 2.0.8
Transitive dependencies
archive 2.0.13
args 1.5.2
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.4
meta 1.1.8
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
Dev dependencies