Template:ModelViewer: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This template displays | This template displays an interactive 3D model using <code><model-viewer></code>. | ||
Works in VisualEditor. Be sure the site globally loads the model-viewer script (e.g. in `MediaWiki:Common.js`). | |||
=== Usage === | === Usage === | ||
Line 22: | Line 23: | ||
}} | }} | ||
</pre> | </pre> | ||
<model-viewer | </noinclude> | ||
{{#tag:model-viewer | |||
| id=modelViewer-{{PAGENAME}} | |||
| src={{{src}}} | |||
| alt={{{alt|3D model}}} | |||
| camera-orbit={{{cameraOrbit|165deg 75deg 4m}}} | |||
| style=display: block; width: {{{width|300px}}}; height: {{{height|300px}}}; margin-left: auto; margin-right: auto; | |||
| background-color={{{backgroundColor|transparent}}} | |||
| shadow-intensity={{{shadowIntensity|1}}} | |||
| environment-image={{{environmentImage|neutral}}} | |||
{{#if:{{{poster|}}}| poster= | | exposure={{{exposure|1}}} | ||
{{#if:{{{autoRotate|}}}| auto-rotate}} | | loading={{{loading|eager}}} | ||
{{#if:{{{cameraControls|}}}| camera-controls}} | {{#if:{{{poster|}}}|{{!}} poster={{{poster}}}}} | ||
{{#if:{{{ar|}}}| ar}} | {{#if:{{{autoRotate|}}}|{{!}} auto-rotate}} | ||
{{#if:{{{autoplay|}}}| autoplay}} | {{#if:{{{cameraControls|}}}|{{!}} camera-controls}} | ||
{{#if:{{{ar|}}}|{{!}} ar}} | |||
{{#if:{{{autoplay|}}}|{{!}} autoplay}} | |||
}} | |||
<noinclude> | |||
<templatedata> | <templatedata> | ||
{ | { |