Skip to content

Commit 887ed0f

Browse files
committed
updating readme
1 parent 3450b22 commit 887ed0f

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,30 @@ A Flutter package for rendering interactive 3D models in different formats(glb,
3838

3939
## Notes
4040

41-
- For now this package only support GLB format, other 3d formats coming soon.
42-
- Visit the example to see how to use this package
41+
- For now this package only support GLB & glTF format, other 3d formats coming soon.
42+
- Visit the full example to see how to use this package
43+
44+
## Brief Example
45+
46+
```dart
47+
/// create controller object to control 3D model.
48+
Flutter3DController controller = Flutter3DController();
49+
50+
/// controller functions,
51+
/// Play method will play 3d model animation, you can use it to play or switch between animations
52+
controller.playAnimation();
53+
/// If you pass specific animation name it will play that specific animation
54+
/// If you pass null and your model has at least 1 animation it will play first animation
55+
controller.playAnimation(animationName: chosenAnimation);
56+
57+
```
58+
59+
```dart
60+
Flutter3DViewer(
61+
controller: controller,
62+
src: 'assets/business_man.glb',
63+
)
64+
```
4365

4466
## Installation
4567

example/samples/model1.png

1 Byte
Loading

example/samples/model2.png

0 Bytes
Loading

example/samples/model3.png

0 Bytes
Loading

example/samples/model4.gif

1.17 MB
Loading

example/samples/model4.png

72.9 KB
Loading

0 commit comments

Comments
 (0)