<object data="http://<some.server>/Mesh2Flash.swf?file=myMesh.obj" type="application/x-shockwave-flash" width="800" height="600">
<param name="movie" value="http://<some.server>/Mesh2Flash.swf?file=myMesh.obj">
</object>
''myMesh.obj'' is the absolute or relative path to your mesh file (obj or dae). Adjust the ''width'' and ''height'' values if you wish.
===== Wiki Syntax (Dokuwiki) =====
=== For a Wiki on your own server ===
<html>
<object data="http://<some.server>/Mesh2Flash.swf?file=myMesh.obj" type="application/x-shockwave-flash" width="800" height="600">
<param name="movie" value="http://<some.server>/Mesh2Flash.swf?file=myMesh.obj">
</object>
</html>
=== For the DAVID Wiki ===
If you want to show a mesh file which you have uploaded in the Wiki's Media Files (e.g. in the folder ''your_name'' under ''user_page''), use a Wiki code similiar to this:
<html>
<object data="http://www.david-laserscanner.com/freeware/Mesh2Flash/Mesh2Flash.swf?file=/wiki/_media/user_page/your_name/your_mesh_file.obj" type="application/x-shockwave-flash" width="800" height="600">
<param name="movie" value="http://www.david-laserscanner.com/freeware/Mesh2Flash/Mesh2Flash.swf?file=/wiki/_media/user_page/your_name/your_mesh_file.obj">
</object>
</html>
===== Forum Syntax (phpBB 3) =====
=== For a Forum on your own server ===
Use the following code in your forum post:
[flash=800,600]http://<some.server>/Mesh2Flash.swf?file=myMesh.obj[/flash]
=== For the DAVID Forum ===
Use the following code in your forum post:
[flash=800,600]http://www.david-laserscanner.com/freeware/Mesh2Flash/Mesh2Flash.swf?file=myMesh.obj[/flash]
=== Attaching an OBJ file to a post and showing it in Mesh2Flash ===
If you want to attach a mesh file to your post and show it inline, the question will be: What is the URL of my attachment? Use the following way to find it (OBJ only!):
- Write your post and attach the OBJ file (this extension must be permitted by forum admin)
- //optional: attach the texture image file//
- Click "Preview"
- Look at the preview, the attached OBJ file is visible as a link. You can see the exact link by holding your mouse pointer over it or right-clicking it - this depends on the browser you are using. The link will be similar to this: http://www.theserver.com/forum/download/file.php?id=2136 This id number is what were are interested in. It is different each time.
- Place the code above somewhere in your post, using that link as the ''file'' parameter for Mesh2Flash, but **replace the question mark ''?'' in the link by the number sign ''#''** (the ''?'' directly behind ''Mesh2Flash.swf'' is not to be replaced!)
- //optional: use the link to the texture image attachment as the ''texFile'' parameter. Again, replace the question mark ''?'' in the link by the number sign ''#''.//
\\
**Example without texture:** (Note where the ? has been replaced by a #)
[flash=800,600]http://www.david-laserscanner.com/freeware/Mesh2Flash/Mesh2Flash.swf?file=http://www.david-laserscanner.com/forum/download/file.php#id=2136[/flash]
\\
**Example with texture:** (Note that two ? have been replaced by #)
[flash=800,600]http://www.david-laserscanner.com/freeware/Mesh2Flash/Mesh2Flash.swf?file=http://www.david-laserscanner.com/forum/download/file.php#id=2136&texFile=http://www.david-laserscanner.com/forum/download/file.php#id=4242[/flash]
\\
Of course it is possible to link between Forum and Wiki as long as they are located one the same domain.
===== Parameters =====
Beside the parameter "file", there are some **optional** parameters you can define. They have to be separated by ''&''. Their order is arbitrary, but upper/lower case is relevant!
* **pitch**: Initial pitch of the view in degree (default: 0). Use e.g. 30 to view the object slightly from above.
* **yaw**: Initial yaw of the view in degree (default: -45). Yawing is rotating the object around the vertical axis.
* **rotate**: Continuous rotation (yawing) of the object around the up axis in degree per (1/30) second (default: 0=off).
* **mouseWheelFactor**: How fast the mouse wheel zooms in and out. Negative values invert the direction. 0 mean no zooming. (default: 5).
* **focalLength** Initial focal length of the camera (default: 500).
* **backgroundColor** Background color of the Flash viewport hexadecimal between 0x000000 and 0xFFFFFF as 0xRRGGBB (Red, Green, Blue). Default: 0xFFFFFF = white.
* **lightColor** (only for untextured OBJ meshes) Color of the light source (default: 0xFFFFFF).
* **ambientColor** (only for untextured OBJ meshes) Color of the ambient light (default: 0x403830).
* **specular** (only for untextured OBJ meshes) Surface specularity (default: 30).
* **shaderMode** (only for untextured OBJ meshes) 0=Phong Shader, 1=Flat Shader (default: 0).
* **texFile** (only for OBJ files) URL of the texture image to be used if there is no mtl file
Example:
...Mesh2Flash.swf?file=http://www.david-laserscanner.com/freeware/Mesh2Flash/cow.dae&pitch=30&yaw=90&rotate=2
===== Texture =====
==== Texture in OBJ ====
=== With MTL File ===
Usually, beside the .obj file, there is a material file (.mtl) in the same folder with the same name. For example, greatMesh.obj and greatMesh.mtl.
In that mtl file, the texture filename must be given. E.g.
map_Kd myMesh.png
Of course, when you save a textured scan with DAVID, these files will be create accordingly.
=== Without MTL File ===
If there is no such mtl file, or if you are using an OBJ posted as a Forum attachment, you can define the location of the texture file separately by the **texFile** parameter (see above).