Skip to content

Commit 8c95079

Browse files
committed
release/v2.3.0
1 parent 6fa01f9 commit 8c95079

16 files changed

+273
-61
lines changed

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_inappwebview_ios","path":"/Users/faraz/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.1.2/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_inappwebview_android","path":"/Users/faraz/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.1.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"flutter_inappwebview_macos","path":"/Users/faraz/.pub-cache/hosted/pub.dev/flutter_inappwebview_macos-1.1.2/","native_build":true,"dependencies":[]}],"linux":[],"windows":[{"name":"flutter_inappwebview_windows","path":"/Users/faraz/.pub-cache/hosted/pub.dev/flutter_inappwebview_windows-0.6.0/","native_build":true,"dependencies":[]}],"web":[{"name":"flutter_inappwebview_web","path":"/Users/faraz/.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.1.2/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_inappwebview","dependencies":["flutter_inappwebview_android","flutter_inappwebview_ios","flutter_inappwebview_macos","flutter_inappwebview_web","flutter_inappwebview_windows"]},{"name":"flutter_inappwebview_android","dependencies":[]},{"name":"flutter_inappwebview_ios","dependencies":[]},{"name":"flutter_inappwebview_macos","dependencies":[]},{"name":"flutter_inappwebview_web","dependencies":[]},{"name":"flutter_inappwebview_windows","dependencies":[]}],"date_created":"2025-04-07 19:04:54.635528","version":"3.27.1","swift_package_manager_enabled":false}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_inappwebview_ios","path":"/Users/flutter-team/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.1.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_inappwebview_android","path":"/Users/flutter-team/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.1.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_inappwebview_macos","path":"/Users/flutter-team/.pub-cache/hosted/pub.dev/flutter_inappwebview_macos-1.1.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[],"windows":[{"name":"flutter_inappwebview_windows","path":"/Users/flutter-team/.pub-cache/hosted/pub.dev/flutter_inappwebview_windows-0.6.0/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"flutter_inappwebview_web","path":"/Users/flutter-team/.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.1.2/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_inappwebview","dependencies":["flutter_inappwebview_android","flutter_inappwebview_ios","flutter_inappwebview_macos","flutter_inappwebview_web","flutter_inappwebview_windows"]},{"name":"flutter_inappwebview_android","dependencies":[]},{"name":"flutter_inappwebview_ios","dependencies":[]},{"name":"flutter_inappwebview_macos","dependencies":[]},{"name":"flutter_inappwebview_web","dependencies":[]},{"name":"flutter_inappwebview_windows","dependencies":[]}],"date_created":"2025-09-13 15:05:16.032236","version":"3.32.0","swift_package_manager_enabled":{"ios":false,"macos":false}}

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Notably, when testing **other available packages**, users may experience **gestu
1313
## Features
1414

1515
- Mobile and Web **stable** version (fully support **glb**, **gltf** and **obj** format)
16-
- macOS **beta** version 🆕
16+
- macOS **beta** version
1717
- Load 3D model from assets
1818
- Load 3D model from URL
1919
- Change 3D models by setState
@@ -23,12 +23,15 @@ Notably, when testing **other available packages**, users may experience **gestu
2323
- Load **obj** 3D models with textures and **mtl** files
2424
- Scale and camera properties for obj 3D models
2525
- Play animation
26-
- Play animation with loop count 🆕
26+
- Play animation with loop count
2727
- Switch between animations
2828
- Pause animation
2929
- Reset animation
3030
- Stop animation
3131
- Get available animations list
32+
- Start rotation & set speed 🆕
33+
- Pause rotation 🆕
34+
- Stop rotation 🆕
3235
- Switch between textures
3336
- Get available textures list
3437
- Set camera target
@@ -104,6 +107,18 @@ controller.stopAnimation();
104107
//It will return available animation list of 3D model.
105108
await controller.getAvailableAnimations();
106109
110+
//It will Starts the rotation of the 3D model with default speed value (10deg/second).
111+
controller.startRotation();
112+
113+
//It will Starts the rotation of the 3D model with desire speed value deg/s.
114+
controller.startRotation(rotationSpeed: 30);
115+
116+
//It will Pauses the ongoing rotation, keeping the 3D model at its current orientation.
117+
controller.pauseRotation();
118+
119+
//It will Stops the rotation completely and resets the rotation state to the initial position.
120+
controller.stopRotation();
121+
107122
//It will load desired texture of 3D model, you need to pass texture name.
108123
controller.setTexture(textureName: chosenTexture);
109124
@@ -191,7 +206,7 @@ Flutter3DViewer.obj(
191206

192207
```yaml
193208
dependencies:
194-
flutter_3d_controller: ^2.2.0
209+
flutter_3d_controller: ^2.3.0
195210
```
196211
197212
### `AndroidManifest.xml` (Android only)

android/local.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sdk.dir=/Users/faraz/Library/Android/sdk
2-
flutter.sdk=/Users/faraz/flutter_sdk_v3.27.1
1+
sdk.dir=/Users/flutter-team/Library/Android/sdk
2+
flutter.sdk=/Users/flutter-team/flutter_sdk/v3.32.0

example/lib/main.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class _MyHomePageState extends State<MyHomePage> {
7373
onPressed: () {
7474
controller.pauseAnimation();
7575
//controller.stopAnimation();
76+
controller.pauseRotation();
7677
},
7778
icon: const Icon(Icons.pause),
7879
),
@@ -82,6 +83,7 @@ class _MyHomePageState extends State<MyHomePage> {
8283
IconButton(
8384
onPressed: () {
8485
controller.resetAnimation();
86+
controller.stopRotation();
8587
},
8688
icon: const Icon(Icons.replay),
8789
),
@@ -122,6 +124,17 @@ class _MyHomePageState extends State<MyHomePage> {
122124
const SizedBox(
123125
height: 4,
124126
),
127+
IconButton(
128+
onPressed: () async{
129+
controller.startRotation(rotationSpeed: 30);
130+
//controller.pauseRotation();
131+
//controller.stopRotation();
132+
},
133+
icon: const Icon(Icons.threed_rotation),
134+
),
135+
const SizedBox(
136+
height: 4,
137+
),
125138
IconButton(
126139
onPressed: () {
127140
controller.setCameraOrbit(20, 20, 5);

example/pubspec.lock

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,42 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
8+
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.11.0"
11+
version: "2.13.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
1515
name: boolean_selector
16-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
16+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "2.1.1"
19+
version: "2.1.2"
2020
characters:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
24+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.3.0"
27+
version: "1.4.0"
2828
clock:
2929
dependency: transitive
3030
description:
3131
name: clock
32-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
32+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "1.1.1"
35+
version: "1.1.2"
3636
collection:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
40+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.19.0"
43+
version: "1.19.1"
4444
cupertino_icons:
4545
dependency: "direct main"
4646
description:
@@ -53,10 +53,10 @@ packages:
5353
dependency: transitive
5454
description:
5555
name: fake_async
56-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
56+
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "1.3.1"
59+
version: "1.3.3"
6060
flutter:
6161
dependency: "direct main"
6262
description: flutter
@@ -171,18 +171,18 @@ packages:
171171
dependency: transitive
172172
description:
173173
name: leak_tracker
174-
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
174+
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
175175
url: "https://pub.dev"
176176
source: hosted
177-
version: "10.0.7"
177+
version: "10.0.9"
178178
leak_tracker_flutter_testing:
179179
dependency: transitive
180180
description:
181181
name: leak_tracker_flutter_testing
182-
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
182+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
183183
url: "https://pub.dev"
184184
source: hosted
185-
version: "3.0.8"
185+
version: "3.0.9"
186186
leak_tracker_testing:
187187
dependency: transitive
188188
description:
@@ -203,10 +203,10 @@ packages:
203203
dependency: transitive
204204
description:
205205
name: matcher
206-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
206+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
207207
url: "https://pub.dev"
208208
source: hosted
209-
version: "0.12.16+1"
209+
version: "0.12.17"
210210
material_color_utilities:
211211
dependency: transitive
212212
description:
@@ -219,18 +219,18 @@ packages:
219219
dependency: transitive
220220
description:
221221
name: meta
222-
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
222+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
223223
url: "https://pub.dev"
224224
source: hosted
225-
version: "1.15.0"
225+
version: "1.16.0"
226226
path:
227227
dependency: transitive
228228
description:
229229
name: path
230-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
230+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
231231
url: "https://pub.dev"
232232
source: hosted
233-
version: "1.9.0"
233+
version: "1.9.1"
234234
plugin_platform_interface:
235235
dependency: transitive
236236
description:
@@ -248,50 +248,50 @@ packages:
248248
dependency: transitive
249249
description:
250250
name: source_span
251-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
251+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
252252
url: "https://pub.dev"
253253
source: hosted
254-
version: "1.10.0"
254+
version: "1.10.1"
255255
stack_trace:
256256
dependency: transitive
257257
description:
258258
name: stack_trace
259-
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
259+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
260260
url: "https://pub.dev"
261261
source: hosted
262-
version: "1.12.0"
262+
version: "1.12.1"
263263
stream_channel:
264264
dependency: transitive
265265
description:
266266
name: stream_channel
267-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
267+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
268268
url: "https://pub.dev"
269269
source: hosted
270-
version: "2.1.2"
270+
version: "2.1.4"
271271
string_scanner:
272272
dependency: transitive
273273
description:
274274
name: string_scanner
275-
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
275+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
276276
url: "https://pub.dev"
277277
source: hosted
278-
version: "1.3.0"
278+
version: "1.4.1"
279279
term_glyph:
280280
dependency: transitive
281281
description:
282282
name: term_glyph
283-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
283+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
284284
url: "https://pub.dev"
285285
source: hosted
286-
version: "1.2.1"
286+
version: "1.2.2"
287287
test_api:
288288
dependency: transitive
289289
description:
290290
name: test_api
291-
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
291+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
292292
url: "https://pub.dev"
293293
source: hosted
294-
version: "0.7.3"
294+
version: "0.7.4"
295295
typed_data:
296296
dependency: transitive
297297
description:
@@ -312,10 +312,10 @@ packages:
312312
dependency: transitive
313313
description:
314314
name: vm_service
315-
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
315+
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
316316
url: "https://pub.dev"
317317
source: hosted
318-
version: "14.3.0"
318+
version: "15.0.0"
319319
web:
320320
dependency: transitive
321321
description:
@@ -325,5 +325,5 @@ packages:
325325
source: hosted
326326
version: "1.1.0"
327327
sdks:
328-
dart: ">=3.6.0 <4.0.0"
328+
dart: ">=3.7.0-0 <4.0.0"
329329
flutter: ">=3.27.0"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
import lldb
6+
7+
def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
8+
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
9+
base = frame.register["x0"].GetValueAsAddress()
10+
page_len = frame.register["x1"].GetValueAsUnsigned()
11+
12+
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
13+
# first page to see if handled it correctly. This makes diagnosing
14+
# misconfiguration (e.g. missing breakpoint) easier.
15+
data = bytearray(page_len)
16+
data[0:8] = b'IHELPED!'
17+
18+
error = lldb.SBError()
19+
frame.GetThread().GetProcess().WriteMemory(base, data, error)
20+
if not error.Success():
21+
print(f'Failed to write into {base}[+{page_len}]', error)
22+
return
23+
24+
def __lldb_init_module(debugger: lldb.SBDebugger, _):
25+
target = debugger.GetDummyTarget()
26+
# Caveat: must use BreakpointCreateByRegEx here and not
27+
# BreakpointCreateByName. For some reasons callback function does not
28+
# get carried over from dummy target for the later.
29+
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
30+
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
31+
bp.SetAutoContinue(True)
32+
print("-- LLDB integration loaded --")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
command script import --relative-to-command-file flutter_lldb_helper.py

lib/src/controllers/flutter_3d_controller.dart

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class Flutter3DController extends IFlutter3DController {
99
Flutter3DController();
1010

1111
ValueNotifier<bool> onModelLoaded = ValueNotifier<bool>(false);
12+
ValueNotifier<Map<String, dynamic>> onModelRotation =
13+
ValueNotifier<Map<String, dynamic>>({});
1214

1315
void init(IFlutter3DRepository repository) {
1416
_repository = repository;
@@ -115,4 +117,31 @@ class Flutter3DController extends IFlutter3DController {
115117
throw Flutter3dControllerLoadingException();
116118
}
117119
}
120+
121+
@override
122+
void startRotation({int rotationSpeed = 10}) {
123+
if (onModelLoaded.value) {
124+
_repository?.startRotation(rotationSpeed: rotationSpeed);
125+
} else {
126+
throw Flutter3dControllerLoadingException();
127+
}
128+
}
129+
130+
@override
131+
void pauseRotation() {
132+
if (onModelLoaded.value) {
133+
_repository?.pauseRotation();
134+
} else {
135+
throw Flutter3dControllerLoadingException();
136+
}
137+
}
138+
139+
@override
140+
void stopRotation() {
141+
if (onModelLoaded.value) {
142+
_repository?.stopRotation();
143+
} else {
144+
throw Flutter3dControllerLoadingException();
145+
}
146+
}
118147
}

0 commit comments

Comments
 (0)