Changes

Jump to navigation Jump to search
3,033 bytes added ,  20:44, 20 December 2019
Created page with "== Description == Tis wiki includes an extension which allows to add 3D models viewer to site pages. == Supported file extensions == ===THREE.js model format=== * .json * .3dj..."
== Description ==
Tis wiki includes an extension which allows to add 3D models viewer to site pages.
== Supported file extensions ==
===THREE.js model format===
* .json
* .3djson
* .3dj * .three
===THREE.js model buffer geometry format===
* .buff
* .buffjson
===OBJ file format===
* .obj
===STL (binary) file format===
* .stl
* .stlb

== Usage == <!--T:48-->

=== As Image Handler ===

<pre class="wiki">
[[File:Model.json|300x300px|color=,opacity=,...]]
</pre>

=== As Parser function ===
<pre class="wiki">
{{#3d:Model.json}}
{{#3d:Model.json|width}}
{{#3d:Model.json|width|height}}
...
{{#3d:Model.json|width|height|color|opacity|norotate|scale|z|style|class}}
</pre>

Instead of uploaded filename you can use an url for file located in external site.

=== As Parser tag ===
<pre class="html">
&lt;3d file=&quot;Model.json&quot; width=&quot;&quot; height=&quot;&quot; ... &gt;&lt;/3d&gt;
or
&lt;3d width=&quot;&quot; height=&quot;&quot; ... &gt;Model.json&lt;/3d&gt;
</pre>
You also can use url instead of short filename.
== Parameters ==
{|class="wikitable"
! Name
! Description
!align="right"| Default value
|-
| width
| Canvas width in pixels
|align="right"| 300
|-
| height
| Canvas height in pixels
|align="right"| 300
|-
| color
| Model RGB color as hex
|align="right"| 0xff00ff
|-
| opacity
| Model opacity as decimal between 0...1
|align="right"| 0.8
|-
| norotate
| If true or 1, model does not rotate
|align="right"| false
|-
| scale
| Model scale, in percent
|align="right"| 100
|-
| z
| Model z coordinate
|align="right"| 75
|-
| style
| Additional canvas CSS style
|align="right"|
|-
| class
| Additional canvas HTML class
|align="right"|
|}
Width and height can be set to ''0'' value, so size of viewer will be set according to user screen dimensions.

== Controls and hotkeys ==
</translate>
{|class="wikitable"
! <translate><!--T:23--> Action</translate>
! <translate><!--T:24--> Controls</translate>
|-
| <translate><!--T:25--> Camera rotate</translate>
| <translate><!--T:26--> Swipe, left mouse key hold and move</translate>
|-
| <translate><!--T:27--> Camera pan</translate>
| <translate><!--T:28--> Right key hold and move</translate>
|-
| <translate><!--T:29--> Camera zoom</translate>
| <translate><!--T:30--> Mouse wheel, hold wheel and move, pinch</translate>
|-
| <translate><!--T:31--> Model rotate</translate>
| <translate><!--T:32--> ←↑→↓ keys</translate>
|-
| <translate><!--T:33--> Model rotation reset</translate>
| <translate><!--T:35--> Home key</translate>
|-
| <translate><!--T:36--> Model rotation play/pause</translate>
| <translate><!--T:37--> Double click, double tap</translate>
|-
| <translate><!--T:38--> Model rotation play/pause all models at page</translate>
| <translate><!--T:39--> Enter, Space keys</translate>
|-
| <translate><!--T:40--> Model rotation speed</translate>
| <translate><!--T:41--> - and + keys</translate>
|}
<translate>
<!--T:42-->
Hotkeys automatically disables while you edit or submit wiki page.
</translate>
[[Category:3D_extensions{{#translation:}}]]
4,000

edits

Navigation menu