Skip to content

Commit e80c874

Browse files
committed
updating readme
1 parent 887ed0f commit e80c874

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

README.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ A Flutter package for rendering interactive 3D models in different formats(glb,
2626

2727
## Samples
2828

29-
<img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model1.png" alt="Model1" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model2.png" alt="Model2" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model3.png" alt="Model3" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model4.png" alt="Model3" width="24%"/>
30-
<img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model1.gif" alt="Model1" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model2.gif" alt="Model2" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model3.gif" alt="Model3" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/master/example/samples/model4.gif" alt="Model3" width="24%"/>
29+
<img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model1.png" alt="Model1" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model2.png" alt="Model2" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model3.png" alt="Model3" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model4.png" alt="Model3" width="24%"/>
30+
<img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model1.gif" alt="Model1" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model2.gif" alt="Model2" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model3.gif" alt="Model3" width="24%"/> <img src="https://raw.githubusercontent.com/m-r-davari/flutter_3d_controller/dev/example/samples/model4.gif" alt="Model3" width="24%"/>
3131

3232

3333
## Compatibility
@@ -44,16 +44,43 @@ A Flutter package for rendering interactive 3D models in different formats(glb,
4444
## Brief Example
4545

4646
```dart
47-
/// create controller object to control 3D model.
47+
// create controller object to control 3D model.
4848
Flutter3DController controller = Flutter3DController();
4949
50-
/// controller functions,
51-
/// Play method will play 3d model animation, you can use it to play or switch between animations
50+
// It will play 3d model animation, you can use it to play or switch between animations.
5251
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
52+
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.
5555
controller.playAnimation(animationName: chosenAnimation);
5656
57+
// It will pause the animation at current frame.
58+
controller.pauseAnimation();
59+
60+
// It will play animation from first frame (from beginning).
61+
controller.resetAnimation();
62+
63+
// It will return available animation list of 3D model.
64+
await controller.getAvailableAnimations();
65+
66+
// It will load desired texture of 3D model, you need to pass texture name.
67+
controller.setTexture(textureName: chosenTexture);
68+
69+
// It will return available textures list of 3D model.
70+
await controller.getAvailableTextures();
71+
72+
//It will set your desired camera target.
73+
controller.setCameraTarget(0.3, 0.2, 0.4);
74+
75+
// It will reset the camera target to default.
76+
controller.resetCameraTarget();
77+
78+
//It will set your desired camera orbit.
79+
controller.setCameraOrbit(20, 20, 5);
80+
81+
//It will reset the camera orbit to default.
82+
controller.resetCameraOrbit();
83+
5784
```
5885

5986
```dart

0 commit comments

Comments
 (0)