darinlarimore / statamic-3d-field
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Vue
Requires
- php: ^8.2
- statamic/cms: ^5.0
README
Statamic 3D Field is a Statamic addon that allows uploading a 3d model and configuration options along with a tag for frontend usage. Uses google/model-viewer to display the 3d model.
Features
This addon does:
- Upload a .glb 3d model
- Configure settings for the 3d model
- Tag for frontend usage
How to Install
You can search for this addon in the Tools > Addons
section of the Statamic control panel and click install, or run the following command from your project root:
composer require darinlarimore/statamic-3d-field
How to Use
Allow glb and usdz file types in config/statamic/assets.php
'additional_uploadable_extensions' => [ 'usdz', 'glb', ],
Add the field to a blueprint
Name the field handle three_d_model
or whatever you like.
Configure the field settings
Use the tag in your template
Use the 3d_model
tag in your template to display the 3d model. The field
parameter is required and should be the field handle you used in the blueprint.
{{ 3d_model field="three_d_model" class="w-full h-96" }}