importWebGL Namespace Reference
WebGL file format exporter. More...
Functions | |
| def | export (exportList, filename, colors=None, camera=None) |
| def | getCameraData (camera=None) |
| def | getHTML (objectsList, colors=None, camera=None) |
| def | getObjectData (obj, wireframeMode=wireframeStyle, color=None) |
Variables | |
| cameraPosition = None | |
| FreeCADGui = None | |
| int | linewidth = 1 |
| pythonopen = open | |
| string | tab = " " |
| string | template |
| string | wireframeStyle = "faceloop" |
Detailed Description
WebGL file format exporter.
This module provides tools to export HTML files containing the exported objects in WebGL format and a simple three.js-based viewer.
Function Documentation
◆ export()
| def importWebGL.export | ( | exportList, | |
| filename, | |||
colors = None, |
|||
camera = None |
|||
| ) |
References getHTML(), and pythonopen.
◆ getCameraData()
| def importWebGL.getCameraData | ( | camera = None | ) |
References OfflineRenderingUtils.getCoinCamera().
Referenced by getHTML().
◆ getHTML()
| def importWebGL.getHTML | ( | objectsList, | |
colors = None, |
|||
camera = None |
|||
| ) |
References getCameraData(), and getObjectData().
Referenced by export().
◆ getObjectData()
| def importWebGL.getObjectData | ( | obj, | |
wireframeMode = wireframeStyle, |
|||
color = None |
|||
| ) |
returns the geometry data of an object as three.js snippet. wireframeMode can be multimaterial, faceloop, or None
Referenced by getHTML().
Variable Documentation
◆ cameraPosition
| importWebGL.cameraPosition = None |
◆ FreeCADGui
| importWebGL.FreeCADGui = None |
◆ linewidth
| int importWebGL.linewidth = 1 |
◆ pythonopen
| importWebGL.pythonopen = open |
Referenced by export().
◆ tab
| string importWebGL.tab = " " |
◆ template
| string importWebGL.template |
◆ wireframeStyle
| string importWebGL.wireframeStyle = "faceloop" |
1.8.17