model_viewer_pro 1.0.2 copy "model_viewer_pro: ^1.0.2" to clipboard
model_viewer_pro: ^1.0.2 copied to clipboard

Display and control interactive 3D models (GLB/GLTF) in Flutter — mesh manipulation, camera control, animations, grounded environments, and custom lighting. Built on model_viewer_plus.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


1.0.2 — 2026-06-01 #

🚀 Breaking Changes #

  • Package renamed from model_viewer_pro_controller to model_viewer_pro. Update your import to package:model_viewer_pro/model_viewer_pro.dart. All class and method names are unchanged.

✨ New Features #

  • Grounded mode (ModelViewerProViewer.grounded) — projects the skybox onto a virtual ground plane for a realistic floor reflection, with smart automatic defaults for shadow intensity, camera orbit limits, and panning.
  • Local asset skybox (skyboxImagePath) — load equirectangular images directly from the Flutter asset bundle (auto-encoded to base64 for WebView compatibility).
  • Lighting controlsshadowIntensity, shadowSoftness, and exposure are now first-class constructor parameters on ModelViewerProViewer, watching for changes via didUpdateWidget.
  • Interaction togglesdisablePan, disableZoom, disableTap, touchAction, maxCameraOrbit, and minCameraOrbit are all widget parameters with live didUpdateWidget support.
  • AssetLoaderOperations mixin — loadSkyboxFromAsset() and loadEnvironmentFromAsset() encode any Flutter asset as a base64 data URI and inject it into the WebView for reliable cross-platform asset loading.
  • setDisablePan / setDisableZoom / setDisableTap methods on ModelViewerProController.
  • setSkyboxHeight / removeSkyboxHeight methods on ModelViewerProController.
  • setTouchAction method on ModelViewerProController.
  • executeCustomJS — run arbitrary JavaScript for one-off scene tweaks.
  • takeScreenshot — capture the current frame as a PNG data URL.
  • Shared _modelViewerProForceRender JS helper — all scene mutations now use a single, centralised render-trigger function (camera micro-move + autoRotate toggle + material needsUpdate flag) instead of duplicated inline code.

🛠 Improvements #

  • All Dart source files re-formatted to pass dart format with zero issues.
  • Removed leftover console.log debug statements from injected JavaScript.
  • Fixed if-without-braces lint warnings throughout viewer.dart.
  • _encodeBase64 in AssetLoaderOperations replaced with dart:convert's base64Encode for correctness and performance.
  • debugPrint prefix updated from model_viewer_pro_controller: to model_viewer_pro:.
  • controller.dart internal helpers (_setAttribute / _removeAttribute) now return Future<bool> directly without unnecessary async wrapping.

⚠️ Deprecations #

  • environmentImageAsset widget param → use controller.loadEnvironmentFromAsset() inside onLoad.
  • skyboxImageAsset widget param → use controller.loadSkyboxFromAsset() inside onLoad.
  • environmentImage widget param → use environmentImageUrl.
  • skyboxImage widget param → use skyboxImagePath.
  • setEnvironmentImage() on controller → use setEnvironmentImageFromUrl().
  • setSkyboxImage() on controller → use setSkyboxImageFromUrl().

📦 Dependencies #

  • model_viewer_plus: ^1.10.0
  • webview_flutter: ^4.13.1

0.0.1 — 2026-02-21 #

Initial Release #

🎭 Mesh Operations

  • getAvailableMeshes() — query all named meshes from loaded models.
  • setVisibility() — show/hide individual meshes and their children.
  • setTextureColor() — change mesh material colours dynamically.

📸 Camera Operations

  • Camera orbit, target, FOV, min/max orbit constraints, disable-pan.

🎬 Animation Operations

  • Play, pause, seek, and query animation duration.

💡 Lighting Operations

  • Background colour, ground visibility, shadow intensity/softness, exposure.

🌅 Environment Operations

  • Environment images and skybox images from URL or Flutter assets.

🎮 Viewer Widget

  • ModelViewerProViewer with controller, onLoad, and model-viewer passthrough props.

📦 Platform Support

  • Android 6.0+, iOS 11.0+, Web (all modern browsers).

[Unreleased] #

Planned #

  • Morph target / blend-shape control
  • Named animation clip selection
  • Material property editor (metalness, roughness, emissive)
  • VR / immersive mode support
4
likes
0
points
178
downloads

Publisher

unverified uploader

Weekly Downloads

Display and control interactive 3D models (GLB/GLTF) in Flutter — mesh manipulation, camera control, animations, grounded environments, and custom lighting. Built on model_viewer_plus.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, model_viewer_plus, webview_flutter

More

Packages that depend on model_viewer_pro