Difference between revisions of "3D Objects Help"

From RobotX
Jump to navigation Jump to search
(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...")
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
Tis wiki includes an extension which allows to add 3D models viewer to site pages.
+
This wiki includes an extension which allows to add 3D models viewer to site pages.
 +
 
 
== Supported file extensions ==
 
== Supported file extensions ==
 
===THREE.js model format===
 
===THREE.js model format===
Line 15: Line 16:
 
* .stlb
 
* .stlb
  
== Usage == <!--T:48-->
+
== Usage ==  
  
 
=== As Image Handler ===  
 
=== As Image Handler ===  
Line 40: Line 41:
 
&lt;3d width=&quot;&quot; height=&quot;&quot; ... &gt;Model.json&lt;/3d&gt;
 
&lt;3d width=&quot;&quot; height=&quot;&quot; ... &gt;Model.json&lt;/3d&gt;
 
</pre>
 
</pre>
You also can use url instead of short filename.
+
You also can use url instead of short filename.<br>
 +
<3d width="100" height="100" norotate="true" color="aabbff">Star.stl</3d>
 +
 
 
== Parameters ==
 
== Parameters ==
 
{|class="wikitable"
 
{|class="wikitable"
Line 86: Line 89:
  
 
== Controls and hotkeys ==
 
== Controls and hotkeys ==
</translate>
 
 
{|class="wikitable"
 
{|class="wikitable"
! <translate><!--T:23--> Action</translate>
+
!Action
! <translate><!--T:24--> Controls</translate>
+
! Controls
 
|-
 
|-
| <translate><!--T:25--> Camera rotate</translate>
+
|Camera rotate
| <translate><!--T:26--> Swipe, left mouse key hold and move</translate>
+
|wipe, left mouse key hold and move
 
|-
 
|-
| <translate><!--T:27--> Camera pan</translate>
+
|Camera pan
| <translate><!--T:28--> Right key hold and move</translate>
+
|Right key hold and move
 
|-
 
|-
| <translate><!--T:29--> Camera zoom</translate>
+
|Camera zoom
| <translate><!--T:30--> Mouse wheel, hold wheel and move, pinch</translate>
+
| Mouse wheel, hold wheel and move, pinch
 
|-
 
|-
| <translate><!--T:31--> Model rotate</translate>
+
| Model rotate
| <translate><!--T:32--> ←↑→↓ keys</translate>
+
| ←↑→↓ keys
 
|-
 
|-
| <translate><!--T:33--> Model rotation reset</translate>
+
| Model rotation reset
| <translate><!--T:35--> Home key</translate>
+
| Home key
 
|-
 
|-
| <translate><!--T:36--> Model rotation play/pause</translate>
+
| Model rotation play/pause
| <translate><!--T:37--> Double click, double tap</translate>
+
| <Double click, double tap
 
|-
 
|-
| <translate><!--T:38--> Model rotation play/pause all models at page</translate>
+
| Model rotation play/pause all models at page
| <translate><!--T:39--> Enter, Space keys</translate>
+
| Enter, Space keys
 
|-
 
|-
| <translate><!--T:40--> Model rotation speed</translate>
+
| Model rotation speed
| <translate><!--T:41--> - and + keys</translate>
+
| - and + keys
 
|}
 
|}
<translate>
 
<!--T:42-->
 
 
Hotkeys automatically disables while you edit or submit wiki page.
 
Hotkeys automatically disables while you edit or submit wiki page.
</translate>
+
[[Category:3D_extensions]]
[[Category:3D_extensions{{#translation:}}]]
 

Latest revision as of 19:56, 3 October 2020

Description

This 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

As Image Handler

[[File:Model.json|300x300px|color=,opacity=,...]]

As Parser function

{{#3d:Model.json}}
{{#3d:Model.json|width}}
{{#3d:Model.json|width|height}}
...
{{#3d:Model.json|width|height|color|opacity|norotate|scale|z|style|class}}

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

As Parser tag

<3d file="Model.json" width="" height="" ... ></3d>
or
<3d width="" height="" ... >Model.json</3d>

You also can use url instead of short filename.
Star.stl

Parameters

Name Description Default value
width Canvas width in pixels 300
height Canvas height in pixels 300
color Model RGB color as hex 0xff00ff
opacity Model opacity as decimal between 0...1 0.8
norotate If true or 1, model does not rotate false
scale Model scale, in percent 100
z Model z coordinate 75
style Additional canvas CSS style
class Additional canvas HTML class

Width and height can be set to 0 value, so size of viewer will be set according to user screen dimensions.

Controls and hotkeys

Action Controls
Camera rotate wipe, left mouse key hold and move
Camera pan Right key hold and move
Camera zoom Mouse wheel, hold wheel and move, pinch
Model rotate ←↑→↓ keys
Model rotation reset Home key
Model rotation play/pause <Double click, double tap
Model rotation play/pause all models at page Enter, Space keys
Model rotation speed - and + keys

Hotkeys automatically disables while you edit or submit wiki page.