Code Monkey home page Code Monkey logo

flutter-obj-3d-viewer's Introduction

Flutter OBJ 3D Viewer

An OBJ 3D Viewer and Parser for flutter/dart. Also a simple Rasterizer. TEXTURED! LIGHTS!

NO GPU, NO OPENGL-ES, only CPU side rendering via CustomPainter widget and canvas.

Support me: https://www.paypal.me/LaszloKozari

Pictures

alt text alt text alt text alt text alt text alt text

Video

Video

Example

https://github.com/klaszlo8207/Flutter-OBJ-3D-Viewer/blob/master/lib/main.dart

Properties

Object3DViewer({
  @required this.size,
  @required this.objPath,
  @required this.initialZoom,
  @required this.object3DViewerController,
  @required this.lightPosition,
  this.backgroundColor = const Color(0xff353535),
  this.texturePath,
  this.showInfo,
  this.showWireframe,
  this.wireframeColor = Colors.black,
  this.initialAngles,
  this.drawMode = DrawMode.SHADED,
  this.onHorizontalDragUpdate,
  this.onVerticalDragUpdate,
  this.panDistanceToActivate,
  this.onZoomChangeListener,
  this.onRotationChangeListener,
  this.color = Colors.black,
  this.centerPivot = false,
  this.showGrids = true,
  this.gridsColor = const Color(0xff4b4b4b),
  this.gridsMaxTile = 10,
  this.gridsTileSize = 1.0,
  this.rasterizerMethod = RasterizerMethod.NewMethod,
  this.lightColor = Colors.white,
});

Limits

Please use this library with TRIANGLES in the obj file itself.

This library can handle some type in the obj file like: vertices, texture coordinates, normals, faces. Lights, colors, textures.

It can handle negative face indices. If your model not in triangles, then you can convert that via Autodesk 3ds Max or other softwares.

Also this library can handle only a few vertices in wireframe/shaded mode (Max vertices in these modes are about 5000 vertices to get a good fps)

Author

Kozári László in 2020.01.06

License

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

flutter-obj-3d-viewer's People

Contributors

klaszlo8207 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.