spline_view 0.0.1
spline_view: ^0.0.1 copied to clipboard
Embed Spline 3D scenes with native platform views.
spline_view #
A Flutter plugin for displaying Spline 3D designs in your Flutter application. This package relies on Platform views to host Spline's native renderers.
Features #
- Load Spline scenes from local assets (.splinecontent) and remote scenes.
- Use SplineViewController to set variables in the scene.
Usage #
Display a Spline design from assets: #
import 'package:spline_view/spline_view.dart';
SplinePlatformViewLocal(
assetPath: 'assets/my_spline.splinecontent',
onViewCreated: (controller) {
_controller = controller;
_controller.setBooleanVariable('someVariable', true);
},
)
Display a Spline design from a network URL: #
import 'package:spline_view/spline_view.dart';
SplinePlatformViewNetwork(
url: 'https://example.com/spline-design.splinecontent',
onViewCreated: (controller) {
_controller = controller;
_controller.setNumberVariable('someVariable', 123);
},
)
Platform-Specific Setup #
iOS #
Swift Package Manager must be enabled for iOS builds. Ensure your iOS project is configured to use Swift Package Manager dependencies.
API Documentation #
For detailed API documentation and advanced usage, see the API reference.
Example #
See the example directory for a complete example application.
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing #
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.