Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added onProgress, onLoad, onError callback in ModelViewer #64

Open
wants to merge 49 commits into
base: master
Choose a base branch
from

Conversation

ahmadhassan-dev
Copy link

I have added the functionality of onProgress, onLoad, onError callbacks in ModelViewer Packages,

  1. It allow us to get the percentage of 3D model loads using onProgress callback
  2. It notify us that your 3D model loads using onLoad callback
  3. It notify us if any error occurs while loading 3D model loads using onError callback

Omer Bayram and others added 30 commits January 21, 2022 13:35
Make the `ModelViewerState` of Web and Mobile share the same  `ModelViewer`.
- Replace the js file
- Update readme
- Add CircularProgressIndicator while mobile platform loading
Added:
- `/lib/src/shim/` with `dart_html_fake.dart` and `dart_ui_fake.dart`. Fixing `ERROR: The name platformViewRegistry' is being referenced through the prefix 'ui', but it isn't defined in any of the libraries imported using that prefix.` and `INFO: Avoid using web-only libraries outside Flutter web plugin` to improve the [score on pub.dev](https://pub.dev/packages/model_viewer_plus/score).

Changed:
- example's `/etc/assets` -> `/assets`
According to omchiii#12 's need,

- ModelViewer's background defaults to Colors.transparent
- Also, set Webview's background to Colors.transparent on Android / iOS

By doing this, users can use Stack to add a image to ModelViewer's lower layer.
_proxy null check and setState() for it
### Changed

- `/lib/src/model_viewer_plus_mobile.dart`, update according to the [newest document](https://developers.google.com/ar/develop/scene-viewer#3d-or-ar). Fix [omchiii#9](omchiii#9).
  - Insted of `com.google.ar.core`, now we use `com.google.android.googlequicksearchbox`. This should support the widest possible range of devices.
  - Mode defaults to `ar_preferred`. Scene Viewer launches in AR native mode as the entry mode. If Google Play Services for AR isn't present, Scene Viewer gracefully falls back to 3D mode as the entry mode.
- Update `example\android\app\build.gradle` `compileSdkVersion` to 31
- Update `android_intent_plus` to `3.1.1`
- Update `android_intent_plus to` `3.0.1`

### Removed

- `/lib/src/http_proxy.dart`: empty file
Foldblade and others added 19 commits March 14, 2022 22:13
…elds

implementation animation-name & animation-crossfade-duration
### Added

- More examples in `example/lib`

### Changed

- `lib\html_builder.dart`, `lib\model_viewer_plus_mobile.dart`, `lib\model_viewer_plus_web.dart`, `lib\model_viewer_plus.dart`: implement all the attributes of `<model-viewer>` v1.11.1.
- ModelViewer.arSacle from `final String? arScale` to `final ArScale? arScale`, which may be a breaking change.
- Update `assets/model-viewer.min.js` to v1.11.1
- Update example dir's gradle version to 7.0.2
Implement all the missing attributes of `<model-viewer>` v1.11.1
### Changed

- `README.md`: `import 'package:model_viewer_plus/model_viewer.dart';` -> `import 'package:model_viewer_plus/model_viewer_plus.dart';`
- `lib\html_builder.dart`: fix typos and uncomment `debugPrint` for more debug info
- `lib\model_viewer_plus_mobile.dart`: uncomment `debugPrint` for more debug info
- `lib\model_viewer_plus_web.dart`: unique viewType to fix [omchiii#29](omchiii#29)
- Update `assets/model-viewer.min.js` to v1.20.0
Upgrade dependencies, maybe related with omchiii#34
Fix omchiii#40

### Changed

- Update `html_builder.dart`:
  - Fix `min-camera-orbit`, `max-field-of-view`, `min-field-of-view`
…ent]`

### Changed

- Fix: `Removing disallowed element <SCRIPT> from [object DocumentFragment]`, in `lib\src\model_viewer_plus_web.dart`
- Update `example\lib\loading\display_poster.dart`
- Update `README.md`, due to `<model-viewer>` upgrades to 2.0.0 and we have not keep up with it's latest version. So, Flutter Web users should replace `src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"` with `src="./assets/packages/model_viewer_plus/assets/model-viewer.min.js"` to use the js file in our package.

### Added

- Add a new example: `example\lib\loading\render_scale.dart`
Fix: `Removing disallowed element <SCRIPT> from [object DocumentFragment]`
[web] Add button with hotspot attributes to allowed elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants