Create documentation for the engine #328
This commit is contained in:
parent
05fe9dc64e
commit
bd10b196d9
100
docs/Camera.html
Normal file
100
docs/Camera.html
Normal file
@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - Camera</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>Camera</h1>
|
||||
<div class="description">Camera object.</div>
|
||||
<h2>Constructor</h2>
|
||||
<div class="method_container">
|
||||
<div id="Camera" class="method_signature">new Camera (eye, center, up, fov)</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">eye</span>
|
||||
<span class="type parameter_type">Coord3D</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Eye position.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">center</span>
|
||||
<span class="type parameter_type">Coord3D</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Center position. Sometimes it's called target or look at position.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">up</span>
|
||||
<span class="type parameter_type">Coord3D</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Up vector.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">fov</span>
|
||||
<span class="type parameter_type">number</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Field of view in degrees.</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Methods</h2>
|
||||
<div class="method_container">
|
||||
<div id="Clone" class="method_signature">Clone ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Creates a clone of the object.</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type"><a href="Camera.html" target="_self">Camera</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('Camera')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
70
docs/CameraMode.html
Normal file
70
docs/CameraMode.html
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - CameraMode</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>CameraMode</h1>
|
||||
<div class="description">Camera projection mode.</div>
|
||||
<h2>Values</h2>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">Perspective</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Perspective projection.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">Orthographic</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Orthographic projection.</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('CameraMode')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
93
docs/EdgeSettings.html
Normal file
93
docs/EdgeSettings.html
Normal file
@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - EdgeSettings</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>EdgeSettings</h1>
|
||||
<div class="description">Edge settings object.</div>
|
||||
<h2>Constructor</h2>
|
||||
<div class="method_container">
|
||||
<div id="EdgeSettings" class="method_signature">new EdgeSettings (showEdges, edgeColor, edgeThreshold)</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">showEdges</span>
|
||||
<span class="type parameter_type">boolean</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Show edges.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">edgeColor</span>
|
||||
<span class="type parameter_type"><a href="RGBColor.html" target="_self">RGBColor</a></span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Color of the edges.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">edgeThreshold</span>
|
||||
<span class="type parameter_type">number</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Minimum angle between faces to show edges between them in. The value must be in degrees.</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Methods</h2>
|
||||
<div class="method_container">
|
||||
<div id="Clone" class="method_signature">Clone ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Creates a clone of the object.</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('EdgeSettings')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
200
docs/EmbeddedViewer.html
Normal file
200
docs/EmbeddedViewer.html
Normal file
@ -0,0 +1,200 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - EmbeddedViewer</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>EmbeddedViewer</h1>
|
||||
<div class="description">This is the main object for embedding the viewer on a website.</div>
|
||||
<h2>Constructor</h2>
|
||||
<div class="method_container">
|
||||
<div id="EmbeddedViewer" class="method_signature">new EmbeddedViewer (parentElement, parameters)</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">parentElement</span>
|
||||
<span class="type parameter_type">Element</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">The parent element for the viewer canvas. It must be an existing DOM element and it will be the container for the canvas. The size of the viewer will be automatically adjusted to the size of the parent element.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">parameters</span>
|
||||
<span class="type parameter_type">object</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Parameters for embedding.</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">camera</span>
|
||||
<span class="type parameter_type"><a href="Camera.html" target="_self">Camera</a></span>
|
||||
<span class="parameter_attributes">(optional)</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Camera to use. If not specified, the default camera will be used and the model will be fitted to the window.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">cameraMode</span>
|
||||
<span class="type parameter_type"><a href="CameraMode.html" target="_self">CameraMode</a></span>
|
||||
<span class="parameter_attributes">(optional)</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Camera projection mode.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">backgroundColor</span>
|
||||
<span class="type parameter_type"><a href="RGBAColor.html" target="_self">RGBAColor</a></span>
|
||||
<span class="parameter_attributes">(optional)</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Background color of the canvas.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">defaultColor</span>
|
||||
<span class="type parameter_type"><a href="RGBColor.html" target="_self">RGBColor</a></span>
|
||||
<span class="parameter_attributes">(optional)</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Default color of the model. It has effect only if the imported model doesn't specify any color.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">edgeSettings</span>
|
||||
<span class="type parameter_type"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></span>
|
||||
<span class="parameter_attributes">(optional)</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Edge settings.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">environmentSettings</span>
|
||||
<span class="type parameter_type"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></span>
|
||||
<span class="parameter_attributes">(optional)</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Environment settings.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">onModelLoaded</span>
|
||||
<span class="type parameter_type">function</span>
|
||||
<span class="parameter_attributes">(optional)</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Callback that is called when the model with all of the textures is fully loaded.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Methods</h2>
|
||||
<div class="method_container">
|
||||
<div id="LoadModelFromUrlList" class="method_signature">LoadModelFromUrlList (modelUrls)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Loads the model based on a list of urls. The list must contain the main model file and all of the referenced files. For example in case of an obj file the list must contain the corresponding mtl and texture files, too.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">modelUrls</span>
|
||||
<span class="type parameter_type">string[]</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Url list of model files.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="LoadModelFromFileList" class="method_signature">LoadModelFromFileList (fileList)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Loads the model based on a list of <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects. The list must contain the main model file and all of the referenced files. You must use this method when you are using a file picker or drag and drop to select files from a computer.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">fileList</span>
|
||||
<span class="type parameter_type"><a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a>[]</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">File object list of model files.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="LoadModelFromInputFiles" class="method_signature">LoadModelFromInputFiles (inputFiles)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Loads the model based on a list of <a href="InputFile.html" target="_self">InputFile</a> objects. This method is used internally, you should use LoadModelFromUrlList or LoadModelFromFileList instead.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">inputFiles</span>
|
||||
<span class="type parameter_type"><a href="InputFile.html" target="_self">InputFile</a>[]</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">List of model files.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="GetViewer" class="method_signature">GetViewer ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Returns the underlying Viewer object.</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type">Viewer</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="GetModel" class="method_signature">GetModel ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Returns the underlying Model object.</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type">Model</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="Resize" class="method_signature">Resize ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">This method must be called when the size of the parent element changes to make sure that the context has the same dimensions as the parent element.</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="Destroy" class="method_signature">Destroy ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Frees up all the memory that is allocated by the viewer. You should call this function if yo don't need the viewer anymore.</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('EmbeddedViewer')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
86
docs/EnvironmentSettings.html
Normal file
86
docs/EnvironmentSettings.html
Normal file
@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - EnvironmentSettings</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>EnvironmentSettings</h1>
|
||||
<div class="description">Environment settings object.</div>
|
||||
<h2>Constructor</h2>
|
||||
<div class="method_container">
|
||||
<div id="EnvironmentSettings" class="method_signature">new EnvironmentSettings (textureNames, backgroundIsEnvMap)</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">textureNames</span>
|
||||
<span class="type parameter_type">string[]</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Urls of the environment map images in this order: posx, negx, posy, negy, posz, negz.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">backgroundIsEnvMap</span>
|
||||
<span class="type parameter_type">boolean</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Use the environment map as background.</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Methods</h2>
|
||||
<div class="method_container">
|
||||
<div id="Clone" class="method_signature">Clone ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Creates a clone of the object.</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('EnvironmentSettings')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
76
docs/FileSource.html
Normal file
76
docs/FileSource.html
Normal file
@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - FileSource</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>FileSource</h1>
|
||||
<div class="description">File source identifier for import.</div>
|
||||
<h2>Values</h2>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">Url</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">The file is provided by a URL.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">File</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">The file is provided by a <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> object.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">Decompressed</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Used internally if a file is originated by a compressed archive.</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('FileSource')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
87
docs/Init3DViewerElement.html
Normal file
87
docs/Init3DViewerElement.html
Normal file
@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - Init3DViewerElement</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>Init3DViewerElement</h1>
|
||||
<div class="method_container">
|
||||
<div id="Init3DViewerElement" class="method_signature">Init3DViewerElement (parentElement, modelUrls, parameters)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Loads the model specified by urls.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">parentElement</span>
|
||||
<span class="type parameter_type">Element</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">The parent element for the viewer canvas.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">modelUrls</span>
|
||||
<span class="type parameter_type">string[]</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Url list of model files.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">parameters</span>
|
||||
<span class="type parameter_type">object</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">See <a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a> constructor for details.</div>
|
||||
</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('Init3DViewerElement')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
69
docs/Init3DViewerElements.html
Normal file
69
docs/Init3DViewerElements.html
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - Init3DViewerElements</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>Init3DViewerElements</h1>
|
||||
<div class="method_container">
|
||||
<div id="Init3DViewerElements" class="method_signature">Init3DViewerElements (onReady)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Loads all the models on the page. This function looks for all the elements with online_3d_viewer class name, and loads the model according to the tag's parameters.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">onReady</span>
|
||||
<span class="type parameter_type">function</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Callback that called when all models are loaded. It has one parameter that is an array of the created <a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a> objects.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('Init3DViewerElements')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
83
docs/InputFile.html
Normal file
83
docs/InputFile.html
Normal file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - InputFile</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>InputFile</h1>
|
||||
<div class="description">File representation class for importers.</div>
|
||||
<h2>Constructor</h2>
|
||||
<div class="method_container">
|
||||
<div id="InputFile" class="method_signature">new InputFile (name, source, data)</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">name</span>
|
||||
<span class="type parameter_type">string</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Name of the file.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">source</span>
|
||||
<span class="type parameter_type"><a href="FileSource.html" target="_self">FileSource</a></span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Source of the file.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">data</span>
|
||||
<span class="type parameter_type">*</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">If the file source is url, this must be the url string. If the file source is file, this must be a File object.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('InputFile')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
134
docs/RGBAColor.html
Normal file
134
docs/RGBAColor.html
Normal file
@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - RGBAColor</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>RGBAColor</h1>
|
||||
<div class="description">Class to store an RGBA color. Components are integers in the range of 0..255.</div>
|
||||
<h2>Constructor</h2>
|
||||
<div class="method_container">
|
||||
<div id="RGBAColor" class="method_signature">new RGBAColor (r, g, b, a)</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">r</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Red component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">g</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Green component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">b</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Blue component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">a</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Alpha component.</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Methods</h2>
|
||||
<div class="method_container">
|
||||
<div id="Set" class="method_signature">Set (r, g, b, a)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Sets the value of all components.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">r</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Red component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">g</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Green component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">b</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Blue component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">a</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Alpha component.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="Clone" class="method_signature">Clone ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Creates a clone of the object.</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type"><a href="RGBAColor.html" target="_self">RGBAColor</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('RGBAColor')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
120
docs/RGBColor.html
Normal file
120
docs/RGBColor.html
Normal file
@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - RGBColor</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>RGBColor</h1>
|
||||
<div class="description">Class to store an RGB color. Components are integers in the range of 0..255.</div>
|
||||
<h2>Constructor</h2>
|
||||
<div class="method_container">
|
||||
<div id="RGBColor" class="method_signature">new RGBColor (r, g, b)</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">r</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Red component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">g</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Green component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">b</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Blue component.</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Methods</h2>
|
||||
<div class="method_container">
|
||||
<div id="Set" class="method_signature">Set (r, g, b)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Sets the value of all components.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">r</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Red component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">g</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Green component.</div>
|
||||
</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">b</span>
|
||||
<span class="type parameter_type">integer</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Blue component.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="method_container">
|
||||
<div id="Clone" class="method_signature">Clone ()</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Creates a clone of the object.</div>
|
||||
<div class="method_title">Returns</div>
|
||||
<div class="method_returns">
|
||||
<span class="type return_type"><a href="RGBColor.html" target="_self">RGBColor</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('RGBColor')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
69
docs/SetExternalLibLocation.html
Normal file
69
docs/SetExternalLibLocation.html
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - SetExternalLibLocation</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<h1>SetExternalLibLocation</h1>
|
||||
<div class="method_container">
|
||||
<div id="SetExternalLibLocation" class="method_signature">SetExternalLibLocation (newExternalLibLocation)</div>
|
||||
<div class="method_title">Description</div>
|
||||
<div class="method_description">Sets the location of the external libraries used by the engine. This is the content of the libs folder in the package. The location must be relative to the main file.</div>
|
||||
<div class="method_title">Parameters</div>
|
||||
<div class="parameter_header">
|
||||
<span class="parameter_name">newExternalLibLocation</span>
|
||||
<span class="type parameter_type">string</span>
|
||||
</div>
|
||||
<div class="parameter_main">
|
||||
<div class="parameter_description">Relative path to the libs folder.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">Init ('SetExternalLibLocation')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
163
docs/index.html
Normal file
163
docs/index.html
Normal file
@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - Home</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Pages</div>
|
||||
<div id="nav-Home" class="navigation_item"><a href="index.html" target="_self">Home</a></div>
|
||||
<div id="nav-GitHub" class="navigation_item"><a href="https://github.com/kovacsv/Online3DViewer" target="_blank">GitHub</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Classes</div>
|
||||
<div id="nav-Camera" class="navigation_item"><a href="Camera.html" target="_self">Camera</a></div>
|
||||
<div id="nav-EdgeSettings" class="navigation_item"><a href="EdgeSettings.html" target="_self">EdgeSettings</a></div>
|
||||
<div id="nav-EmbeddedViewer" class="navigation_item"><a href="EmbeddedViewer.html" target="_self">EmbeddedViewer</a></div>
|
||||
<div id="nav-EnvironmentSettings" class="navigation_item"><a href="EnvironmentSettings.html" target="_self">EnvironmentSettings</a></div>
|
||||
<div id="nav-InputFile" class="navigation_item"><a href="InputFile.html" target="_self">InputFile</a></div>
|
||||
<div id="nav-RGBAColor" class="navigation_item"><a href="RGBAColor.html" target="_self">RGBAColor</a></div>
|
||||
<div id="nav-RGBColor" class="navigation_item"><a href="RGBColor.html" target="_self">RGBColor</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Functions</div>
|
||||
<div id="nav-Init3DViewerElement" class="navigation_item"><a href="Init3DViewerElement.html" target="_self">Init3DViewerElement</a></div>
|
||||
<div id="nav-Init3DViewerElements" class="navigation_item"><a href="Init3DViewerElements.html" target="_self">Init3DViewerElements</a></div>
|
||||
<div id="nav-SetExternalLibLocation" class="navigation_item"><a href="SetExternalLibLocation.html" target="_self">SetExternalLibLocation</a></div>
|
||||
</div>
|
||||
<div class="navigation_section">
|
||||
<div class="navigation_title">Enums</div>
|
||||
<div id="nav-CameraMode" class="navigation_item"><a href="CameraMode.html" target="_self">CameraMode</a></div>
|
||||
<div id="nav-FileSource" class="navigation_item"><a href="FileSource.html" target="_self">FileSource</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
<div class="page">
|
||||
<h1>Online 3D Viewer Engine</h1>
|
||||
|
||||
<p>The Online 3D Viewer Engine allows you to easily embed 3D models on your website. Although the engine is primarily designed to serve the <a href="https://3dviewer.net" target="_blank">https://3dviewer.net</a> website, it's possible to use it on any page to visualize 3D models.</p>
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p>The preferred way to install the engine is to get it as an NPM package. In some cases it's not possible, so a browser-ready bundle is available for download and add directly to a html file.</p>
|
||||
|
||||
<h3>Install from NPM (preferred)</h3>
|
||||
|
||||
<p>The engine is available as an NPM package called <a href="https://www.npmjs.com/package/online-3d-viewer" target="_blank">online-3d-viewer</a>. The package itself is an ES6 module, so it can be used with several different bundlers.</p>
|
||||
|
||||
<p>You can install it by running the following command.</p>
|
||||
|
||||
<pre><code>npm install online-3d-viewer</code></pre>
|
||||
|
||||
<p>After installation you can import it like any other packages.</p>
|
||||
|
||||
<pre><code class="language-js">import * as OV from 'online-3d-viewer';</code></pre>
|
||||
|
||||
<h3>Download as browser-ready bundle</h3>
|
||||
|
||||
<p>A bundle is available for every release. You need to download the zip file attached to the <a href="https://github.com/kovacsv/Online3DViewer/releases">latest release</a>. After that, copy the content of the zip file on your server, and include the main file on your site.</p>
|
||||
|
||||
<pre><code class="language-html"><script type="text/javascript" src="o3dv.min.js"></script></code></pre>
|
||||
|
||||
<h2>Usage</h2>
|
||||
|
||||
There are two ways to use the library:
|
||||
<ul>
|
||||
<li>Automatic initialization: Create some div elements on your site, and call a function that automatically initalizes all the viewers. This is the easiest way to use the library, but provides less flexibility.</li>
|
||||
<li>Initialization from code: Needs a bit more typing, but it's more flexible than the previous one.</li>
|
||||
</ul>
|
||||
|
||||
<h3>External library handling</h3>
|
||||
|
||||
<p>Some of the importers are implemented using external libraries. These are found in the libs folder of the package. To make these libraries available, you have to tell the engine where to find them. The location of the external libraries can be set with the <a href="SetExternalLibLocation.html">SetExternalLibLocation</a> function. Make sure to call it before any other engine calls.</p>
|
||||
|
||||
<h3>Automatic initialization</h3>
|
||||
|
||||
<p>Create some elements anywhere on your page with the class name <code class="inline">online-3d-viewer</code>. You can create multiple elements with different parameters.</p>
|
||||
|
||||
<pre><code class="language-html"><div class="online_3d_viewer"
|
||||
style="width: 800px; height: 600px;"
|
||||
model="model.obj, model.mtl">
|
||||
</div></code></pre>
|
||||
|
||||
<p>You can specify several attributes:</p>
|
||||
<ul>
|
||||
<li><b>model:</b> Relative path to model files separated by comma.</li>
|
||||
<li><b>camera:</b> Camera parameters (eye, center, up). 9 comma separated number values.</li>
|
||||
<li><b>defaultcolor:</b> Default color for surfaces with no material. 3 comma separated number values for r, g, b.</li>
|
||||
<li><b>backgroundcolor:</b> Canvas background color. 3 comma separated number values for r, g, b or four comma separated number values for r, g, b, a.</li>
|
||||
<li><b>edgesettings:</b> Edge display settings. 5 comma separated values for 'on'/'off', r, g, b, threshold angle.</li>
|
||||
<li><b>environmentmap:</b> Comma separated list of six images forming a texture box.</li>
|
||||
<li><b>environmentmapbg:</b> Boolean ("true" or "false") to set the environment map as background.</li>
|
||||
</ul>
|
||||
|
||||
<p>After placing the elements, call the <a href="Init3DViewerElements.html">Init3DViewerElements</a> function to initalize all the viewers. It must be called from the main JavaScript file outside of the onload event.</p>
|
||||
|
||||
<pre><code class="language-js">// tell the engine where to find the libs folder
|
||||
OV.SetExternalLibLocation ('libs');
|
||||
// init all viewers on the page
|
||||
OV.Init3DViewerElements ();</code></pre>
|
||||
|
||||
<h3>Initialization from code</h3>
|
||||
|
||||
<p>You can also initalize the engine from code. In this case you can provide all the parameters as a JavaScript object. See the <a href="EmbeddedViewer.html">EmbeddedViewer</a> documentation for more details.</p>
|
||||
|
||||
<pre><code class="language-js">window.addEventListener ('load', () => {
|
||||
// set the location of the external libraries
|
||||
OV.SetExternalLibLocation ('../libs');
|
||||
|
||||
// get the parent element of the viewer
|
||||
let parentDiv = document.getElementById ('viewer');
|
||||
|
||||
// initialize the viewer with the parent element and some parameters
|
||||
let viewer = new OV.EmbeddedViewer (parentDiv, {
|
||||
camera : new OV.Camera (
|
||||
new OV.Coord3D (-1.5, 2.0, 3.0),
|
||||
new OV.Coord3D (0.0, 0.0, 0.0),
|
||||
new OV.Coord3D (0.0, 1.0, 0.0),
|
||||
45.0
|
||||
),
|
||||
backgroundColor : new OV.RGBAColor (255, 255, 255, 255),
|
||||
defaultColor : new OV.RGBColor (200, 200, 200),
|
||||
edgeSettings : new OV.EdgeSettings (false, new OV.RGBColor (0, 0, 0), 1),
|
||||
environmentSettings : new OV.EnvironmentSettings (
|
||||
[
|
||||
'assets/envmaps/fishermans_bastion/posx.jpg',
|
||||
'assets/envmaps/fishermans_bastion/negx.jpg',
|
||||
'assets/envmaps/fishermans_bastion/posy.jpg',
|
||||
'assets/envmaps/fishermans_bastion/negy.jpg',
|
||||
'assets/envmaps/fishermans_bastion/posz.jpg',
|
||||
'assets/envmaps/fishermans_bastion/negz.jpg'
|
||||
],
|
||||
false
|
||||
)
|
||||
});
|
||||
|
||||
// load a model providing model urls
|
||||
viewer.LoadModelFromUrlList ([
|
||||
'model.obj',
|
||||
'model.mtl'
|
||||
]);
|
||||
});</code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">Init ('Home')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
29
docs/source/Template.html
Normal file
29
docs/source/Template.html
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="static/3dviewer_net_favicon.ico">
|
||||
|
||||
<title>Online 3D Viewer - $$$TITLE$$$</title>
|
||||
|
||||
<link rel="stylesheet" href="static/highlightjs/styles/github-dark-dimmed.min.css"/>
|
||||
<script src="static/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="static/style.css"/>
|
||||
<script type="text/javascript" src="static/script.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navigation_toggle" id="navigation_toggle">☰</div>
|
||||
<div class="navigation thin_scrollbar" id="navigation">
|
||||
$$$NAVIGATION$$$
|
||||
</div>
|
||||
<div class="main thin_scrollbar" id="main">
|
||||
$$$MAIN$$$
|
||||
</div>
|
||||
<script type="text/javascript">Init ('$$$TITLE$$$')</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
15
docs/source/config.json
Normal file
15
docs/source/config.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"pages" : [
|
||||
{
|
||||
"name" : "Home",
|
||||
"url" : "index.html"
|
||||
},
|
||||
{
|
||||
"name" : "GitHub",
|
||||
"url" : "https://github.com/kovacsv/Online3DViewer"
|
||||
}
|
||||
],
|
||||
"external_refs" : {
|
||||
"File" : "https://developer.mozilla.org/en-US/docs/Web/API/File"
|
||||
}
|
||||
}
|
||||
106
docs/source/index.html
Normal file
106
docs/source/index.html
Normal file
@ -0,0 +1,106 @@
|
||||
<h1>Online 3D Viewer Engine</h1>
|
||||
|
||||
<p>The Online 3D Viewer Engine allows you to easily embed 3D models on your website. Although the engine is primarily designed to serve the <a href="https://3dviewer.net" target="_blank">https://3dviewer.net</a> website, it's possible to use it on any page to visualize 3D models.</p>
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p>The preferred way to install the engine is to get it as an NPM package. In some cases it's not possible, so a browser-ready bundle is available for download and add directly to a html file.</p>
|
||||
|
||||
<h3>Install from NPM (preferred)</h3>
|
||||
|
||||
<p>The engine is available as an NPM package called <a href="https://www.npmjs.com/package/online-3d-viewer" target="_blank">online-3d-viewer</a>. The package itself is an ES6 module, so it can be used with several different bundlers.</p>
|
||||
|
||||
<p>You can install it by running the following command.</p>
|
||||
|
||||
<pre><code>npm install online-3d-viewer</code></pre>
|
||||
|
||||
<p>After installation you can import it like any other packages.</p>
|
||||
|
||||
<pre><code class="language-js">import * as OV from 'online-3d-viewer';</code></pre>
|
||||
|
||||
<h3>Download as browser-ready bundle</h3>
|
||||
|
||||
<p>A bundle is available for every release. You need to download the zip file attached to the <a href="https://github.com/kovacsv/Online3DViewer/releases">latest release</a>. After that, copy the content of the zip file on your server, and include the main file on your site.</p>
|
||||
|
||||
<pre><code class="language-html"><script type="text/javascript" src="o3dv.min.js"></script></code></pre>
|
||||
|
||||
<h2>Usage</h2>
|
||||
|
||||
There are two ways to use the library:
|
||||
<ul>
|
||||
<li>Automatic initialization: Create some div elements on your site, and call a function that automatically initalizes all the viewers. This is the easiest way to use the library, but provides less flexibility.</li>
|
||||
<li>Initialization from code: Needs a bit more typing, but it's more flexible than the previous one.</li>
|
||||
</ul>
|
||||
|
||||
<h3>External library handling</h3>
|
||||
|
||||
<p>Some of the importers are implemented using external libraries. These are found in the libs folder of the package. To make these libraries available, you have to tell the engine where to find them. The location of the external libraries can be set with the <a href="SetExternalLibLocation.html">SetExternalLibLocation</a> function. Make sure to call it before any other engine calls.</p>
|
||||
|
||||
<h3>Automatic initialization</h3>
|
||||
|
||||
<p>Create some elements anywhere on your page with the class name <code class="inline">online-3d-viewer</code>. You can create multiple elements with different parameters.</p>
|
||||
|
||||
<pre><code class="language-html"><div class="online_3d_viewer"
|
||||
style="width: 800px; height: 600px;"
|
||||
model="model.obj, model.mtl">
|
||||
</div></code></pre>
|
||||
|
||||
<p>You can specify several attributes:</p>
|
||||
<ul>
|
||||
<li><b>model:</b> Relative path to model files separated by comma.</li>
|
||||
<li><b>camera:</b> Camera parameters (eye, center, up). 9 comma separated number values.</li>
|
||||
<li><b>defaultcolor:</b> Default color for surfaces with no material. 3 comma separated number values for r, g, b.</li>
|
||||
<li><b>backgroundcolor:</b> Canvas background color. 3 comma separated number values for r, g, b or four comma separated number values for r, g, b, a.</li>
|
||||
<li><b>edgesettings:</b> Edge display settings. 5 comma separated values for 'on'/'off', r, g, b, threshold angle.</li>
|
||||
<li><b>environmentmap:</b> Comma separated list of six images forming a texture box.</li>
|
||||
<li><b>environmentmapbg:</b> Boolean ("true" or "false") to set the environment map as background.</li>
|
||||
</ul>
|
||||
|
||||
<p>After placing the elements, call the <a href="Init3DViewerElements.html">Init3DViewerElements</a> function to initalize all the viewers. It must be called from the main JavaScript file outside of the onload event.</p>
|
||||
|
||||
<pre><code class="language-js">// tell the engine where to find the libs folder
|
||||
OV.SetExternalLibLocation ('libs');
|
||||
// init all viewers on the page
|
||||
OV.Init3DViewerElements ();</code></pre>
|
||||
|
||||
<h3>Initialization from code</h3>
|
||||
|
||||
<p>You can also initalize the engine from code. In this case you can provide all the parameters as a JavaScript object. See the <a href="EmbeddedViewer.html">EmbeddedViewer</a> documentation for more details.</p>
|
||||
|
||||
<pre><code class="language-js">window.addEventListener ('load', () => {
|
||||
// set the location of the external libraries
|
||||
OV.SetExternalLibLocation ('../libs');
|
||||
|
||||
// get the parent element of the viewer
|
||||
let parentDiv = document.getElementById ('viewer');
|
||||
|
||||
// initialize the viewer with the parent element and some parameters
|
||||
let viewer = new OV.EmbeddedViewer (parentDiv, {
|
||||
camera : new OV.Camera (
|
||||
new OV.Coord3D (-1.5, 2.0, 3.0),
|
||||
new OV.Coord3D (0.0, 0.0, 0.0),
|
||||
new OV.Coord3D (0.0, 1.0, 0.0),
|
||||
45.0
|
||||
),
|
||||
backgroundColor : new OV.RGBAColor (255, 255, 255, 255),
|
||||
defaultColor : new OV.RGBColor (200, 200, 200),
|
||||
edgeSettings : new OV.EdgeSettings (false, new OV.RGBColor (0, 0, 0), 1),
|
||||
environmentSettings : new OV.EnvironmentSettings (
|
||||
[
|
||||
'assets/envmaps/fishermans_bastion/posx.jpg',
|
||||
'assets/envmaps/fishermans_bastion/negx.jpg',
|
||||
'assets/envmaps/fishermans_bastion/posy.jpg',
|
||||
'assets/envmaps/fishermans_bastion/negy.jpg',
|
||||
'assets/envmaps/fishermans_bastion/posz.jpg',
|
||||
'assets/envmaps/fishermans_bastion/negz.jpg'
|
||||
],
|
||||
false
|
||||
)
|
||||
});
|
||||
|
||||
// load a model providing model urls
|
||||
viewer.LoadModelFromUrlList ([
|
||||
'model.obj',
|
||||
'model.mtl'
|
||||
]);
|
||||
});</code></pre>
|
||||
BIN
docs/static/3dviewer_net_favicon.ico
vendored
Normal file
BIN
docs/static/3dviewer_net_favicon.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
93
docs/static/Quicksand/OFL.txt
vendored
Normal file
93
docs/static/Quicksand/OFL.txt
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
Copyright 2011 The Quicksand Project Authors (https://github.com/andrew-paglinawan/QuicksandFamily), with Reserved Font Name “Quicksand”.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
docs/static/Quicksand/Quicksand-Bold.ttf
vendored
Normal file
BIN
docs/static/Quicksand/Quicksand-Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/static/Quicksand/Quicksand-Light.ttf
vendored
Normal file
BIN
docs/static/Quicksand/Quicksand-Light.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/static/Quicksand/Quicksand-Medium.ttf
vendored
Normal file
BIN
docs/static/Quicksand/Quicksand-Medium.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/static/Quicksand/Quicksand-Regular.ttf
vendored
Normal file
BIN
docs/static/Quicksand/Quicksand-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
docs/static/Quicksand/Quicksand-SemiBold.ttf
vendored
Normal file
BIN
docs/static/Quicksand/Quicksand-SemiBold.ttf
vendored
Normal file
Binary file not shown.
29
docs/static/highlightjs/LICENSE
vendored
Normal file
29
docs/static/highlightjs/LICENSE
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2006, Ivan Sagalaev.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
1361
docs/static/highlightjs/highlight.min.js
vendored
Normal file
1361
docs/static/highlightjs/highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9
docs/static/highlightjs/styles/github-dark-dimmed.min.css
vendored
Normal file
9
docs/static/highlightjs/styles/github-dark-dimmed.min.css
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
||||
Theme: GitHub Dark Dimmed
|
||||
Description: Dark dimmed theme as seen on github.com
|
||||
Author: github.com
|
||||
Maintainer: @Hirse
|
||||
Updated: 2021-05-15
|
||||
|
||||
Colors taken from GitHub's CSS
|
||||
*/.hljs{color:#adbac7;background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b}
|
||||
10
docs/static/highlightjs/styles/github-dark.min.css
vendored
Normal file
10
docs/static/highlightjs/styles/github-dark.min.css
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
||||
Theme: GitHub Dark
|
||||
Description: Dark theme as seen on github.com
|
||||
Author: github.com
|
||||
Maintainer: @Hirse
|
||||
Updated: 2021-05-15
|
||||
|
||||
Outdated base version: https://github.com/primer/github-syntax-dark
|
||||
Current colors taken from GitHub's CSS
|
||||
*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}
|
||||
10
docs/static/highlightjs/styles/github.min.css
vendored
Normal file
10
docs/static/highlightjs/styles/github.min.css
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
||||
Theme: GitHub
|
||||
Description: Light theme as seen on github.com
|
||||
Author: github.com
|
||||
Maintainer: @Hirse
|
||||
Updated: 2021-05-15
|
||||
|
||||
Outdated base version: https://github.com/primer/github-syntax-light
|
||||
Current colors taken from GitHub's CSS
|
||||
*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
|
||||
49
docs/static/script.js
vendored
Normal file
49
docs/static/script.js
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
function Resize ()
|
||||
{
|
||||
let isMobile = window.matchMedia ('(max-width: 600px)').matches;
|
||||
let navToggleDiv = document.getElementById ('navigation_toggle');
|
||||
let navDiv = document.getElementById ('navigation');
|
||||
let mainDiv = document.getElementById ('main');
|
||||
|
||||
if (isMobile) {
|
||||
navDiv.style.width = '100%';
|
||||
mainDiv.style.marginLeft = '0px';
|
||||
|
||||
navToggleDiv.style.display = 'block';
|
||||
navDiv.style.display = 'none';
|
||||
} else {
|
||||
navDiv.style.width = '300px';
|
||||
mainDiv.style.marginLeft = '300px';
|
||||
|
||||
navToggleDiv.style.display = 'none';
|
||||
navDiv.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
function Init (menuName)
|
||||
{
|
||||
Resize ();
|
||||
let menuItem = document.getElementById ('nav-' + menuName);
|
||||
if (menuItem === null) {
|
||||
return;
|
||||
}
|
||||
menuItem.scrollIntoView ({ block : 'center' });
|
||||
hljs.highlightAll ();
|
||||
}
|
||||
|
||||
window.addEventListener ('load', () => {
|
||||
Resize ();
|
||||
window.addEventListener ('resize', () => {
|
||||
Resize ();
|
||||
})
|
||||
|
||||
let navToggleDiv = document.getElementById ('navigation_toggle');
|
||||
let navDiv = document.getElementById ('navigation');
|
||||
navToggleDiv.addEventListener ('click', () => {
|
||||
if (navDiv.style.display === 'none') {
|
||||
navDiv.style.display = 'block';
|
||||
} else {
|
||||
navDiv.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
230
docs/static/style.css
vendored
Normal file
230
docs/static/style.css
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
@font-face
|
||||
{
|
||||
font-family: Quicksand;
|
||||
src: url('Quicksand/Quicksand-Regular.ttf');
|
||||
}
|
||||
|
||||
html, body
|
||||
{
|
||||
font-size: 16px;
|
||||
line-height: 23px;
|
||||
font-family: Quicksand, Helvetica, sans-serif;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #3393bd;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 28px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
h2
|
||||
{
|
||||
font-size: 24px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 20px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
ul
|
||||
{
|
||||
padding-left: 20px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
li
|
||||
{
|
||||
padding-left: 0px;
|
||||
margin-left: 0px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.page h1, .page h2
|
||||
{
|
||||
border-bottom: 1px solid #dddddd;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.page h2, .page h3
|
||||
{
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.thin_scrollbar
|
||||
{
|
||||
scrollbar-color: #cccccc transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.thin_scrollbar::-webkit-scrollbar
|
||||
{
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.thin_scrollbar::-webkit-scrollbar-thumb
|
||||
{
|
||||
background: #cccccc;
|
||||
}
|
||||
|
||||
.navigation
|
||||
{
|
||||
background: #ffffff;
|
||||
width: 300px;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
z-index: 900;
|
||||
}
|
||||
|
||||
.navigation_toggle
|
||||
{
|
||||
font-size: 40px;
|
||||
text-align: center;
|
||||
margin: 12px;
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
display: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.navigation_section
|
||||
{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.navigation_title
|
||||
{
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.navigation_item
|
||||
{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.main
|
||||
{
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
margin-left: 300px;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.method_container
|
||||
{
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.method_signature
|
||||
{
|
||||
background: #c9e5f8;
|
||||
font-size: 18px;
|
||||
margin: 10px 0px;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.method_description
|
||||
{
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.method_title
|
||||
{
|
||||
font-weight: bold;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.parameter_header
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.parameter_main
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.parameter_name
|
||||
{
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.type
|
||||
{
|
||||
background: #f0f0f0;
|
||||
font-family: monospace;
|
||||
padding: 2px 8px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.parameter_type
|
||||
{
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.parameter_attributes
|
||||
{
|
||||
color: #888888;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.return_type
|
||||
{
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.parameter_description
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
code.inline
|
||||
{
|
||||
background: #fafafa;
|
||||
font-family: monospace;
|
||||
padding: 2px 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.hljs
|
||||
{
|
||||
border-radius: 5px;
|
||||
}
|
||||
70
package-lock.json
generated
70
package-lock.json
generated
@ -19,13 +19,12 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"clean-css-cli": "^5.6.1",
|
||||
"docdash": "^2.0.0",
|
||||
"esbuild": "^0.16.7",
|
||||
"eslint": "^8.29.0",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"fantasticon": "^1.2.2",
|
||||
"http-server": "^14.0.0",
|
||||
"jsdoc": "^4.0.0",
|
||||
"jsdoc": "^3.6.11",
|
||||
"mocha": "^10.2.0",
|
||||
"oslllo-svg-fixer": "^2.2.0",
|
||||
"run-python3": "^0.0.4",
|
||||
@ -934,18 +933,6 @@
|
||||
"regenerator-runtime": "^0.13.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@jsdoc/salty": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.1.tgz",
|
||||
"integrity": "sha512-JXwylDNSHa549N9uceDYu8D4GMXwSo3H8CCPYEQqxhhHpxD28+lRl2b3bS/caaPj5w1YD3SWtrficJNTnUjGpg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=v12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@ -2122,15 +2109,6 @@
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/docdash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/docdash/-/docdash-2.0.0.tgz",
|
||||
"integrity": "sha512-AxxZwrMLmiArEHJirdyZmW6YTBKxkd/Z5V9U2EU1crIMtpgoU/cH7Hnc9n1E0lzB1ZSam+VVMSnvlc+9+GUGVg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jsdoc/salty": "^0.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/doctrine": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
|
||||
@ -3411,13 +3389,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/jsdoc": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.0.tgz",
|
||||
"integrity": "sha512-tzTgkklbWKrlaQL2+e3NNgLcZu3NaK2vsHRx7tyHQ+H5jcB9Gx0txSd2eJWlMC/xU1+7LQu4s58Ry0RkuaEQVg==",
|
||||
"version": "3.6.11",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.11.tgz",
|
||||
"integrity": "sha512-8UCU0TYeIYD9KeLzEcAu2q8N/mx9O3phAGl32nmHlE0LpaJL71mMkP4d+QE5zWfNt50qheHtOZ0qoxVrsX5TUg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.9.4",
|
||||
"@jsdoc/salty": "^0.2.1",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"bluebird": "^3.7.2",
|
||||
"catharsis": "^0.9.0",
|
||||
@ -3430,6 +3407,7 @@
|
||||
"mkdirp": "^1.0.4",
|
||||
"requizzle": "^0.2.3",
|
||||
"strip-json-comments": "^3.1.0",
|
||||
"taffydb": "2.6.2",
|
||||
"underscore": "~1.13.2"
|
||||
},
|
||||
"bin": {
|
||||
@ -5061,6 +5039,12 @@
|
||||
"url": "https://github.com/fontello/svg2ttf?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/taffydb": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
|
||||
"integrity": "sha512-y3JaeRSplks6NYQuCOj3ZFMO3j60rTwbuKCvZxsAraGYH2epusatvZ0baZYA01WsGqJBq/Dl6vOrMUJqyMj8kA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tar": {
|
||||
"version": "6.1.12",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.12.tgz",
|
||||
@ -6157,15 +6141,6 @@
|
||||
"regenerator-runtime": "^0.13.3"
|
||||
}
|
||||
},
|
||||
"@jsdoc/salty": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.1.tgz",
|
||||
"integrity": "sha512-JXwylDNSHa549N9uceDYu8D4GMXwSo3H8CCPYEQqxhhHpxD28+lRl2b3bS/caaPj5w1YD3SWtrficJNTnUjGpg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.17.21"
|
||||
}
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@ -7004,15 +6979,6 @@
|
||||
"integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
|
||||
"dev": true
|
||||
},
|
||||
"docdash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/docdash/-/docdash-2.0.0.tgz",
|
||||
"integrity": "sha512-AxxZwrMLmiArEHJirdyZmW6YTBKxkd/Z5V9U2EU1crIMtpgoU/cH7Hnc9n1E0lzB1ZSam+VVMSnvlc+9+GUGVg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@jsdoc/salty": "^0.2.1"
|
||||
}
|
||||
},
|
||||
"doctrine": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
|
||||
@ -8004,13 +7970,12 @@
|
||||
}
|
||||
},
|
||||
"jsdoc": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.0.tgz",
|
||||
"integrity": "sha512-tzTgkklbWKrlaQL2+e3NNgLcZu3NaK2vsHRx7tyHQ+H5jcB9Gx0txSd2eJWlMC/xU1+7LQu4s58Ry0RkuaEQVg==",
|
||||
"version": "3.6.11",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.11.tgz",
|
||||
"integrity": "sha512-8UCU0TYeIYD9KeLzEcAu2q8N/mx9O3phAGl32nmHlE0LpaJL71mMkP4d+QE5zWfNt50qheHtOZ0qoxVrsX5TUg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/parser": "^7.9.4",
|
||||
"@jsdoc/salty": "^0.2.1",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"bluebird": "^3.7.2",
|
||||
"catharsis": "^0.9.0",
|
||||
@ -8023,6 +7988,7 @@
|
||||
"mkdirp": "^1.0.4",
|
||||
"requizzle": "^0.2.3",
|
||||
"strip-json-comments": "^3.1.0",
|
||||
"taffydb": "2.6.2",
|
||||
"underscore": "~1.13.2"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -9281,6 +9247,12 @@
|
||||
"integrity": "sha512-OIWR6bKzXvdXYyO4DK/UWa1VA1JeKq8E+0ug2DG98Y/vOmMpfZNj+TIG988HjfYSqtcy/hFOtZq/n/j5GSESNg==",
|
||||
"dev": true
|
||||
},
|
||||
"taffydb": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
|
||||
"integrity": "sha512-y3JaeRSplks6NYQuCOj3ZFMO3j60rTwbuKCvZxsAraGYH2epusatvZ0baZYA01WsGqJBq/Dl6vOrMUJqyMj8kA==",
|
||||
"dev": true
|
||||
},
|
||||
"tar": {
|
||||
"version": "6.1.12",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.12.tgz",
|
||||
|
||||
@ -41,14 +41,14 @@
|
||||
"test": "mocha test",
|
||||
"lint": "eslint source",
|
||||
"lint_fix": "eslint source --fix",
|
||||
"docs": "jsdoc -c tools/jsdoc.json",
|
||||
"docs": "run-python3 tools/generate_docs.py",
|
||||
"update_libs": "npm install && run-python3 tools/update_libs.py",
|
||||
"generate_icon_font": "run-python3 tools/generate_icon_font.py",
|
||||
"update_engine_exports": "run-python3 tools/update_engine_exports.py",
|
||||
"create_dist": "npm run create_package && npm run lint && npm run test",
|
||||
"create_dist_test": "npm run create_package_test && npm run lint && npm run test",
|
||||
"create_package": "npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py",
|
||||
"create_package_test": "npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py test",
|
||||
"create_package": "npm run docs && npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py",
|
||||
"create_package_test": "npm run docs && npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py test",
|
||||
"build_css_prod": "cleancss -o build/o3dv.website.min.css website/css/*",
|
||||
"build_dev": "npm run build_engine_dev && npm run build_website_dev",
|
||||
"build_engine_dev": "npm run update_engine_exports && esbuild source/engine/main.js --bundle --minify --global-name=OV --sourcemap --outfile=build/o3dv.min-dev.js",
|
||||
@ -58,13 +58,12 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"clean-css-cli": "^5.6.1",
|
||||
"docdash": "^2.0.0",
|
||||
"esbuild": "^0.16.7",
|
||||
"eslint": "^8.29.0",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"fantasticon": "^1.2.2",
|
||||
"http-server": "^14.0.0",
|
||||
"jsdoc": "^4.0.0",
|
||||
"jsdoc": "^3.6.11",
|
||||
"mocha": "^10.2.0",
|
||||
"oslllo-svg-fixer": "^2.2.0",
|
||||
"run-python3": "^0.0.4",
|
||||
|
||||
@ -21,6 +21,9 @@
|
||||
|
||||
<script type='text/javascript'>
|
||||
window.addEventListener ('load', () => {
|
||||
// set the location of the external libraries
|
||||
OV.SetExternalLibLocation ('../libs');
|
||||
|
||||
// get the parent element of the viewer
|
||||
let parentDiv = document.getElementById ('viewer');
|
||||
|
||||
|
||||
@ -1,8 +1,17 @@
|
||||
import { RunTasks } from '../core/taskrunner.js';
|
||||
import { FileSource, GetFileExtension, GetFileName, ReadFile, RequestUrl } from '../io/fileutils.js';
|
||||
|
||||
/**
|
||||
* File representation class for importers.
|
||||
*/
|
||||
export class InputFile
|
||||
{
|
||||
/**
|
||||
* @param {string} name Name of the file.
|
||||
* @param {FileSource} source Source of the file.
|
||||
* @param {*} data If the file source is url, this must be the url string. If the file source
|
||||
* is file, this must be a {@link File} object.
|
||||
*/
|
||||
constructor (name, source, data)
|
||||
{
|
||||
this.name = name;
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
let externalLibLocation = null;
|
||||
let loadedExternalLibs = new Set ();
|
||||
|
||||
/**
|
||||
* Sets the location of the external libraries used by the engine. This is the content of the libs
|
||||
* folder in the package. The location must be relative to the main file.
|
||||
* @param {string} newExternalLibLocation Relative path to the libs folder.
|
||||
*/
|
||||
export function SetExternalLibLocation (newExternalLibLocation)
|
||||
{
|
||||
externalLibLocation = newExternalLibLocation;
|
||||
|
||||
@ -1,7 +1,14 @@
|
||||
/**
|
||||
* File source identifier for import.
|
||||
* @enum
|
||||
*/
|
||||
export const FileSource =
|
||||
{
|
||||
/** The file is provided by a URL. */
|
||||
Url : 1,
|
||||
/** The file is provided by a {@link File} object. */
|
||||
File : 2,
|
||||
/** Used internally if a file is originated by a compressed archive. */
|
||||
Decompressed : 3
|
||||
};
|
||||
|
||||
|
||||
@ -1,12 +1,26 @@
|
||||
/**
|
||||
* RGB color object. Components are integers in the range of 0..255.
|
||||
*/
|
||||
export class RGBColor
|
||||
{
|
||||
/**
|
||||
* @param {integer} r Red component.
|
||||
* @param {integer} g Green component.
|
||||
* @param {integer} b Blue component.
|
||||
*/
|
||||
constructor (r, g, b)
|
||||
{
|
||||
this.r = r; // 0 .. 255
|
||||
this.g = g; // 0 .. 255
|
||||
this.b = b; // 0 .. 255
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of all components.
|
||||
* @param {integer} r Red component.
|
||||
* @param {integer} g Green component.
|
||||
* @param {integer} b Blue component.
|
||||
*/
|
||||
Set (r, g, b)
|
||||
{
|
||||
this.r = r;
|
||||
@ -14,22 +28,42 @@ export class RGBColor
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the object.
|
||||
* @returns {RGBColor}
|
||||
*/
|
||||
Clone ()
|
||||
{
|
||||
return new RGBColor (this.r, this.g, this.b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* RGBA color object. Components are integers in the range of 0..255.
|
||||
*/
|
||||
export class RGBAColor
|
||||
{
|
||||
/**
|
||||
* @param {integer} r Red component.
|
||||
* @param {integer} g Green component.
|
||||
* @param {integer} b Blue component.
|
||||
* @param {integer} a Alpha component.
|
||||
*/
|
||||
constructor (r, g, b, a)
|
||||
{
|
||||
this.r = r; // 0 .. 255
|
||||
this.g = g; // 0 .. 255
|
||||
this.b = b; // 0 .. 255
|
||||
this.a = a; // 0 .. 255
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of all components.
|
||||
* @param {integer} r Red component.
|
||||
* @param {integer} g Green component.
|
||||
* @param {integer} b Blue component.
|
||||
* @param {integer} a Alpha component.
|
||||
*/
|
||||
Set (r, g, b, a)
|
||||
{
|
||||
this.r = r;
|
||||
@ -38,6 +72,10 @@ export class RGBAColor
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the object.
|
||||
* @returns {RGBAColor}
|
||||
*/
|
||||
Clone ()
|
||||
{
|
||||
return new RGBAColor (this.r, this.g, this.b, this.a);
|
||||
|
||||
@ -1,14 +1,29 @@
|
||||
import { CoordIsEqual3D } from '../geometry/coord3d.js';
|
||||
import { IsEqual } from '../geometry/geometry.js';
|
||||
|
||||
/**
|
||||
* Camera projection mode.
|
||||
* @enum
|
||||
*/
|
||||
export const CameraMode =
|
||||
{
|
||||
/** Perspective projection. */
|
||||
Perspective : 1,
|
||||
/** Orthographic projection. */
|
||||
Orthographic : 2
|
||||
};
|
||||
|
||||
/**
|
||||
* Camera object.
|
||||
*/
|
||||
export class Camera
|
||||
{
|
||||
/**
|
||||
* @param {Coord3D} eye Eye position.
|
||||
* @param {Coord3D} center Center position. Sometimes it's called target or look at position.
|
||||
* @param {Coord3D} up Up vector.
|
||||
* @param {number} fov Field of view in degrees.
|
||||
*/
|
||||
constructor (eye, center, up, fov)
|
||||
{
|
||||
this.eye = eye;
|
||||
@ -17,6 +32,10 @@ export class Camera
|
||||
this.fov = fov;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the object.
|
||||
* @returns {Camera}
|
||||
*/
|
||||
Clone ()
|
||||
{
|
||||
return new Camera (
|
||||
|
||||
@ -8,8 +8,27 @@ import { ThreeModelLoader } from '../threejs/threemodelloader.js';
|
||||
import { Viewer } from './viewer.js';
|
||||
import { EnvironmentSettings } from './shadingmodel.js';
|
||||
|
||||
/**
|
||||
* This is the main object for embedding the viewer on a website.
|
||||
*/
|
||||
export class EmbeddedViewer
|
||||
{
|
||||
/**
|
||||
* @param {Element} parentElement The parent element for the viewer canvas. It must be an
|
||||
* existing DOM element and it will be the container for the canvas. The size of the viewer will
|
||||
* be automatically adjusted to the size of the parent element.
|
||||
* @param {object} parameters Parameters for embedding.
|
||||
* @param {Camera} [parameters.camera] Camera to use. If not specified, the default camera will
|
||||
* be used and the model will be fitted to the window.
|
||||
* @param {CameraMode} [parameters.cameraMode] Camera projection mode.
|
||||
* @param {RGBAColor} [parameters.backgroundColor] Background color of the canvas.
|
||||
* @param {RGBColor} [parameters.defaultColor] Default color of the model. It has effect only
|
||||
* if the imported model doesn't specify any color.
|
||||
* @param {EdgeSettings} [parameters.edgeSettings] Edge settings.
|
||||
* @param {EnvironmentSettings} [parameters.environmentSettings] Environment settings.
|
||||
* @param {function} [parameters.onModelLoaded] Callback that is called when the model with all
|
||||
* of the textures is fully loaded.
|
||||
*/
|
||||
constructor (parentElement, parameters)
|
||||
{
|
||||
this.parentElement = parentElement;
|
||||
@ -52,6 +71,12 @@ export class EmbeddedViewer
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the model based on a list of urls. The list must contain the main model file and all
|
||||
* of the referenced files. For example in case of an obj file the list must contain the
|
||||
* corresponding mtl and texture files, too.
|
||||
* @param {string[]} modelUrls Url list of model files.
|
||||
*/
|
||||
LoadModelFromUrlList (modelUrls)
|
||||
{
|
||||
TransformFileHostUrls (modelUrls);
|
||||
@ -59,16 +84,27 @@ export class EmbeddedViewer
|
||||
this.LoadModelFromInputFiles (inputFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the model based on a list of {@link File} objects. The list must contain the main model
|
||||
* file and all of the referenced files. You must use this method when you are using a file picker
|
||||
* or drag and drop to select files from a computer.
|
||||
* @param {File[]} fileList File object list of model files.
|
||||
*/
|
||||
LoadModelFromFileList (fileList)
|
||||
{
|
||||
let inputFiles = InputFilesFromFileObjects (fileList);
|
||||
this.LoadModelFromInputFiles (inputFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the model based on a list of {@link InputFile} objects. This method is used
|
||||
* internally, you should use LoadModelFromUrlList or LoadModelFromFileList instead.
|
||||
* @param {InputFile[]} inputFiles List of model files.
|
||||
*/
|
||||
LoadModelFromInputFiles (inputFiles)
|
||||
{
|
||||
if (inputFiles === null || inputFiles.length === 0) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
|
||||
this.viewer.Clear ();
|
||||
@ -136,16 +172,28 @@ export class EmbeddedViewer
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the underlying Viewer object.
|
||||
* @returns {Viewer}
|
||||
*/
|
||||
GetViewer ()
|
||||
{
|
||||
return this.viewer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the underlying Model object.
|
||||
* @returns {Model}
|
||||
*/
|
||||
GetModel ()
|
||||
{
|
||||
return this.model;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method must be called when the size of the parent element changes to make sure that the
|
||||
* context has the same dimensions as the parent element.
|
||||
*/
|
||||
Resize ()
|
||||
{
|
||||
let width = this.parentElement.clientWidth;
|
||||
@ -153,6 +201,10 @@ export class EmbeddedViewer
|
||||
this.viewer.Resize (width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Frees up all the memory that is allocated by the viewer. You should call this function if
|
||||
* yo don't need the viewer anymore.
|
||||
*/
|
||||
Destroy ()
|
||||
{
|
||||
this.modelLoader.Destroy ();
|
||||
@ -161,6 +213,13 @@ export class EmbeddedViewer
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the model specified by urls.
|
||||
* @param {Element} parentElement The parent element for the viewer canvas.
|
||||
* @param {string[]} modelUrls Url list of model files.
|
||||
* @param {object} parameters See {@link EmbeddedViewer} constructor for details.
|
||||
* @returns {EmbeddedViewer}
|
||||
*/
|
||||
export function Init3DViewerElement (parentElement, modelUrls, parameters)
|
||||
{
|
||||
let viewer = new EmbeddedViewer (parentElement, parameters);
|
||||
@ -168,6 +227,12 @@ export function Init3DViewerElement (parentElement, modelUrls, parameters)
|
||||
return viewer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads all the models on the page. This function looks for all the elements with online_3d_viewer
|
||||
* class name, and loads the model according to the tag's parameters.
|
||||
* @param {function} onReady Callback that called when all models are loaded. It has one parameter
|
||||
* that is an array of the created {@link EmbeddedViewer} objects.
|
||||
*/
|
||||
export function Init3DViewerElements (onReady)
|
||||
{
|
||||
function LoadElement (element)
|
||||
|
||||
@ -4,14 +4,26 @@ import { ShadingType } from '../threejs/threeutils.js';
|
||||
|
||||
import * as THREE from 'three';
|
||||
|
||||
/**
|
||||
* Environment settings object.
|
||||
*/
|
||||
export class EnvironmentSettings
|
||||
{
|
||||
/**
|
||||
* @param {string[]} textureNames Urls of the environment map images in this order:
|
||||
* posx, negx, posy, negy, posz, negz.
|
||||
* @param {boolean} backgroundIsEnvMap Use the environment map as background.
|
||||
*/
|
||||
constructor (textureNames, backgroundIsEnvMap)
|
||||
{
|
||||
this.textureNames = textureNames;
|
||||
this.backgroundIsEnvMap = backgroundIsEnvMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the object.
|
||||
* @returns {EnvironmentSettings}
|
||||
*/
|
||||
Clone ()
|
||||
{
|
||||
let textureNames = null;
|
||||
|
||||
@ -81,8 +81,17 @@ export class ViewerModel
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Edge settings object.
|
||||
*/
|
||||
export class EdgeSettings
|
||||
{
|
||||
/**
|
||||
* @param {boolean} showEdges Show edges.
|
||||
* @param {RGBColor} edgeColor Color of the edges.
|
||||
* @param {number} edgeThreshold Minimum angle between faces to show edges between them in.
|
||||
* The value must be in degrees.
|
||||
*/
|
||||
constructor (showEdges, edgeColor, edgeThreshold)
|
||||
{
|
||||
this.showEdges = showEdges;
|
||||
@ -90,6 +99,10 @@ export class EdgeSettings
|
||||
this.edgeThreshold = edgeThreshold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of the object.
|
||||
* @returns {EdgeSettings}
|
||||
*/
|
||||
Clone ()
|
||||
{
|
||||
return new EdgeSettings (this.showEdges, this.edgeColor.Clone (), this.edgeThreshold);
|
||||
|
||||
@ -6,12 +6,6 @@ import json
|
||||
|
||||
from lib import tools_lib as Tools
|
||||
|
||||
def PrintInfo (message):
|
||||
print ('INFO: ' + message)
|
||||
|
||||
def PrintError (message):
|
||||
print ('ERROR: ' + message)
|
||||
|
||||
def GetVersion (rootDir):
|
||||
packageJson = None
|
||||
with open (os.path.join (rootDir, 'package.json')) as packageJsonFile:
|
||||
@ -122,7 +116,7 @@ def Main (argv):
|
||||
if len (argv) >= 2 and argv[1] == 'test':
|
||||
testBuild = True
|
||||
buildDir = os.path.join (rootDir, 'build', 'test')
|
||||
PrintInfo ('Creating test build.')
|
||||
Tools.PrintInfo ('Creating test build.')
|
||||
|
||||
websiteDir = os.path.join (buildDir, 'website')
|
||||
packageDir = os.path.join (buildDir, 'package')
|
||||
@ -134,13 +128,13 @@ def Main (argv):
|
||||
config = json.load (configJson)
|
||||
|
||||
version = GetVersion (rootDir)
|
||||
PrintInfo ('Create build directory')
|
||||
Tools.PrintInfo ('Create build directory')
|
||||
CreateWebsite (config, rootDir, websiteDir, version, testBuild)
|
||||
|
||||
PrintInfo ('Create package.')
|
||||
Tools.PrintInfo ('Create package.')
|
||||
packageResult = CreatePackage (rootDir, websiteDir, packageDir)
|
||||
if not packageResult:
|
||||
PrintError ('Create package failed.')
|
||||
Tools.PrintError ('Create package failed.')
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
440
tools/generate_docs.py
Normal file
440
tools/generate_docs.py
Normal file
@ -0,0 +1,440 @@
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import zipfile
|
||||
import json
|
||||
import subprocess
|
||||
import platform
|
||||
import html
|
||||
import re
|
||||
|
||||
from lib import tools_lib as Tools
|
||||
|
||||
class HtmlGenerator:
|
||||
def __init__ (self):
|
||||
self.html = ''
|
||||
|
||||
def AddText (self, content):
|
||||
self.html += content
|
||||
|
||||
def AddLine (self, content):
|
||||
self.AddText (content + '\n')
|
||||
|
||||
def AddTag (self, tagName, content):
|
||||
self.AddLine ('<{0}>{1}</{0}>'.format (tagName, content))
|
||||
|
||||
def AddTagWithClass (self, tagName, className, content):
|
||||
self.AddLine ('<{0} class="{1}">{2}</{0}>'.format (tagName, className, content))
|
||||
|
||||
def AddTagWithAttributes (self, tagName, attributes, content):
|
||||
line = '<{0}'.format (tagName);
|
||||
if len (attributes) > 0:
|
||||
attributeStrings = map (lambda x : '{0}="{1}"'.format (x[0], x[1]), attributes)
|
||||
line += ' ' + ' '.join (attributeStrings)
|
||||
line += '>{1}</{0}>'.format (tagName, content)
|
||||
self.AddLine (line)
|
||||
|
||||
def BeginTag (self, tagName):
|
||||
self.AddLine ('<{0}>'.format (tagName))
|
||||
|
||||
def BeginTagWithClass (self, tagName, className):
|
||||
self.AddLine ('<{0} class="{1}">'.format (tagName, className))
|
||||
|
||||
def EndTag (self, tagName):
|
||||
self.AddLine ('</{0}>'.format (tagName))
|
||||
|
||||
def GetHtml (self):
|
||||
return self.html
|
||||
|
||||
def CleanUpText (text):
|
||||
if text == None:
|
||||
return ''
|
||||
invalidChars = ['\r', '\n', '\t']
|
||||
for invalidChar in invalidChars:
|
||||
text = text.replace (invalidChar, ' ')
|
||||
text = html.escape (text)
|
||||
return text
|
||||
|
||||
def GenerateLink (entityName, entityLink):
|
||||
target = '_blank' if entityLink.startswith ('http') else '_self'
|
||||
return '<a href="{1}" target="{2}">{0}</a>'.format (entityName, entityLink, target)
|
||||
|
||||
def FinalizeType (text, entityLinks):
|
||||
text = CleanUpText (text)
|
||||
arrayMatch = re.match ('Array\.<(.+)>', text)
|
||||
if arrayMatch != None:
|
||||
matchedName = arrayMatch.group (1)
|
||||
if matchedName in entityLinks:
|
||||
return GenerateLink (matchedName, entityLinks[matchedName]) + '[]'
|
||||
else:
|
||||
return arrayMatch.group (1) + '[]'
|
||||
if text in entityLinks:
|
||||
return GenerateLink (text, entityLinks[text])
|
||||
return text
|
||||
|
||||
def FinalizeDescription (text, entityLinks):
|
||||
text = CleanUpText (text)
|
||||
links = re.findall ('{@link (.+)}', text)
|
||||
for link in links:
|
||||
if link in entityLinks:
|
||||
text = text.replace ('{@link ' + link + '}', GenerateLink (link, entityLinks[link]))
|
||||
else:
|
||||
text = text.replace ('{@link ' + link + '}', link)
|
||||
return text
|
||||
|
||||
class NavigationGroup:
|
||||
def __init__ (self, name, sort):
|
||||
self.name = name
|
||||
self.sort = sort
|
||||
self.links = []
|
||||
|
||||
def AddLink (self, name, url):
|
||||
self.links.append ({
|
||||
'name' : name,
|
||||
'url' : url
|
||||
})
|
||||
|
||||
class Navigation:
|
||||
def __init__ (self):
|
||||
self.groups = []
|
||||
self.entityLinks = {}
|
||||
|
||||
def AddGroup (self, group):
|
||||
self.groups.append (group)
|
||||
|
||||
def AddEntityLink (self, name, url):
|
||||
self.entityLinks[name] = url
|
||||
|
||||
def GenerateHtml (self):
|
||||
generator = HtmlGenerator ()
|
||||
for group in self.groups:
|
||||
if len (group.links) == 0:
|
||||
continue
|
||||
generator.BeginTagWithClass ('div', 'navigation_section')
|
||||
generator.AddTagWithClass ('div', 'navigation_title', group.name)
|
||||
finalLinks = group.links
|
||||
if group.sort:
|
||||
finalLinks = sorted (group.links, key = lambda x : x['name'])
|
||||
for link in finalLinks:
|
||||
linkHtml = GenerateLink (link['name'], link['url'])
|
||||
generator.AddTagWithAttributes ('div', [('id', 'nav-' + link['name']), ('class', 'navigation_item')], linkHtml)
|
||||
generator.EndTag ('div')
|
||||
return generator.GetHtml ()
|
||||
|
||||
class EnumMemberDoc:
|
||||
def __init__ (self, name, description):
|
||||
self.name = name
|
||||
self.description = description
|
||||
|
||||
class EnumDoc:
|
||||
def __init__ (self, name, description):
|
||||
self.name = name
|
||||
self.description = description
|
||||
self.members = []
|
||||
|
||||
def AddMember (self, member):
|
||||
self.members.append (member)
|
||||
|
||||
def GenerateHtml (self, navigation):
|
||||
generator = HtmlGenerator ()
|
||||
generator.AddTag ('h1', self.name)
|
||||
generator.AddTagWithClass ('div', 'description', FinalizeDescription (self.description, navigation.entityLinks))
|
||||
if len (self.members) > 0:
|
||||
generator.AddTag ('h2', 'Values')
|
||||
for member in self.members:
|
||||
generator.BeginTagWithClass ('div', 'parameter_header')
|
||||
generator.AddTagWithClass ('span', 'parameter_name', member.name)
|
||||
generator.EndTag ('div')
|
||||
generator.BeginTagWithClass ('div', 'parameter_main')
|
||||
generator.AddTagWithClass ('div', 'parameter_description', FinalizeDescription (member.description, navigation.entityLinks))
|
||||
generator.EndTag ('div')
|
||||
|
||||
return generator.GetHtml ()
|
||||
|
||||
class ParameterDoc:
|
||||
def __init__ (self, name, types, isOptional, description):
|
||||
self.name = name
|
||||
self.types = types
|
||||
self.isOptional = isOptional
|
||||
self.description = description
|
||||
self.subParameters = []
|
||||
|
||||
def AddSubParameter (self, parameter):
|
||||
self.subParameters.append (parameter)
|
||||
|
||||
class ReturnsDoc:
|
||||
def __init__ (self, types, description):
|
||||
self.types = types
|
||||
self.description = description
|
||||
|
||||
class MethodDoc:
|
||||
def __init__ (self, name, description, parameters, returns):
|
||||
self.name = name
|
||||
self.description = description
|
||||
self.parameters = parameters
|
||||
self.returns = returns
|
||||
|
||||
def AddParameter (self, parameter):
|
||||
self.parameters.append (parameter)
|
||||
|
||||
def GenerateHtml (self, navigation):
|
||||
generator = HtmlGenerator ()
|
||||
generator.AddTag ('h1', self.name)
|
||||
GenerateMethodHtml (self, generator, navigation, False)
|
||||
return generator.GetHtml ()
|
||||
|
||||
class ClassDoc:
|
||||
def __init__ (self, name, description):
|
||||
self.name = name
|
||||
self.description = description
|
||||
self.constructor = None
|
||||
self.methods = []
|
||||
|
||||
def SetConstructor (self, constructor):
|
||||
self.constructor = constructor
|
||||
|
||||
def AddMethod (self, method):
|
||||
self.methods.append (method)
|
||||
|
||||
def GenerateHtml (self, navigation):
|
||||
generator = HtmlGenerator ()
|
||||
generator.AddTag ('h1', self.name)
|
||||
generator.AddTagWithClass ('div', 'description', FinalizeDescription (self.description, navigation.entityLinks))
|
||||
if self.constructor != None:
|
||||
generator.AddTag ('h2', 'Constructor')
|
||||
GenerateMethodHtml (self.constructor, generator, navigation, True)
|
||||
if len (self.methods) > 0:
|
||||
generator.AddTag ('h2', 'Methods')
|
||||
for method in self.methods:
|
||||
GenerateMethodHtml (method, generator, navigation, False)
|
||||
return generator.GetHtml ()
|
||||
|
||||
def GenerateParameterListHtml (parameters, generator, navigation):
|
||||
for param in parameters:
|
||||
generator.BeginTagWithClass ('div', 'parameter_header')
|
||||
generator.AddTagWithClass ('span', 'parameter_name', param.name)
|
||||
typeNames = map (lambda x : FinalizeType (x, navigation.entityLinks), param.types)
|
||||
generator.AddTagWithClass ('span', 'type parameter_type', ', '.join (typeNames))
|
||||
if param.isOptional:
|
||||
generator.AddTagWithClass ('span', 'parameter_attributes', '(optional)')
|
||||
generator.EndTag ('div')
|
||||
generator.BeginTagWithClass ('div', 'parameter_main')
|
||||
generator.AddTagWithClass ('div', 'parameter_description', FinalizeDescription (param.description, navigation.entityLinks))
|
||||
if len (param.subParameters) > 0:
|
||||
GenerateParameterListHtml (param.subParameters, generator, navigation)
|
||||
generator.EndTag ('div')
|
||||
|
||||
def GenerateMethodHtml (method, generator, navigation, isConstructor):
|
||||
paramNames = map (lambda x : x.name, method.parameters)
|
||||
methodSignature = method.name + ' (' + ', '.join (paramNames) + ')'
|
||||
if isConstructor:
|
||||
methodSignature = 'new ' + methodSignature
|
||||
generator.BeginTagWithClass ('div', 'method_container')
|
||||
generator.AddTagWithAttributes ('div', [('id', method.name), ('class', 'method_signature')], methodSignature)
|
||||
if method.description != None:
|
||||
generator.AddTagWithClass ('div', 'method_title', 'Description')
|
||||
generator.AddTagWithClass ('div', 'method_description', FinalizeDescription (method.description, navigation.entityLinks))
|
||||
if method.parameters != None and len (method.parameters) > 0:
|
||||
generator.AddTagWithClass ('div', 'method_title', 'Parameters')
|
||||
GenerateParameterListHtml (method.parameters, generator, navigation)
|
||||
if method.returns != None:
|
||||
generator.AddTagWithClass ('div', 'method_title', 'Returns')
|
||||
generator.BeginTagWithClass ('div', 'method_returns')
|
||||
if method.returns.types != None:
|
||||
typeNames = map (lambda x : FinalizeType (x, navigation.entityLinks), method.returns.types)
|
||||
generator.AddTagWithClass ('span', 'type return_type', ', '.join (typeNames))
|
||||
if method.returns.description != None:
|
||||
generator.AddTagWithClass ('span', 'return_description', FinalizeDescription (method.returns.description, navigation.entityLinks))
|
||||
generator.EndTag ('div')
|
||||
generator.EndTag ('div')
|
||||
|
||||
def GetDictValue (dict, key):
|
||||
if not key in dict:
|
||||
return None
|
||||
return dict[key]
|
||||
|
||||
def GetDocumentedDoclets (doclets):
|
||||
documented = []
|
||||
for doclet in doclets:
|
||||
kind = doclet['kind']
|
||||
if kind not in ['class', 'function', 'constant', 'member']:
|
||||
continue
|
||||
if 'undocumented' in doclet and doclet['undocumented'] == True:
|
||||
continue
|
||||
documented.append (doclet)
|
||||
return documented
|
||||
|
||||
def GetParametersFromDoclet (doclet):
|
||||
parameters = []
|
||||
paramNamespaceToDoc = {}
|
||||
if not 'params' in doclet:
|
||||
return None
|
||||
for param in doclet['params']:
|
||||
paramName = GetDictValue (param, 'name')
|
||||
paramIsOptional = 'optional' in param and param['optional'] == True
|
||||
paramNameParts = paramName.split ('.')
|
||||
paramTypes = None
|
||||
if 'type' in param:
|
||||
paramTypes = param['type']['names']
|
||||
if len (paramNameParts) == 1:
|
||||
paramDoc = ParameterDoc (
|
||||
paramName,
|
||||
paramTypes,
|
||||
paramIsOptional,
|
||||
GetDictValue (param, 'description')
|
||||
)
|
||||
parameters.append (paramDoc)
|
||||
paramNamespaceToDoc[paramName] = paramDoc
|
||||
else:
|
||||
paramDoc = ParameterDoc (
|
||||
paramNameParts[len (paramNameParts) - 1],
|
||||
paramTypes,
|
||||
paramIsOptional,
|
||||
GetDictValue (param, 'description')
|
||||
)
|
||||
paramNamespace = '.'.join (paramNameParts[0:-1])
|
||||
paramNamespaceToDoc[paramNamespace].AddSubParameter (paramDoc)
|
||||
paramNamespaceToDoc[paramName] = paramDoc
|
||||
return parameters
|
||||
|
||||
def GetReturnsFromDoclet (doclet):
|
||||
if not 'returns' in doclet:
|
||||
return None
|
||||
assert (len (doclet['returns']) == 1)
|
||||
returns = doclet['returns'][0]
|
||||
returnType = None
|
||||
if 'type' in returns:
|
||||
returnType = returns['type']['names']
|
||||
return ReturnsDoc (
|
||||
returnType,
|
||||
GetDictValue (returns, 'description')
|
||||
)
|
||||
|
||||
def BuildHierarchy (doclets):
|
||||
hierarchy = {
|
||||
'classes' : [],
|
||||
'functions' : [],
|
||||
'enums' : []
|
||||
}
|
||||
classNameToDoc = {}
|
||||
enumNameToDoc = {}
|
||||
for doclet in doclets:
|
||||
kind = doclet['kind']
|
||||
name = doclet['name']
|
||||
parameters = GetParametersFromDoclet (doclet)
|
||||
returns = GetReturnsFromDoclet (doclet)
|
||||
description = GetDictValue (doclet, 'description')
|
||||
if kind == 'class':
|
||||
classDoc = ClassDoc (name, doclet['classdesc'])
|
||||
constructorDoc = MethodDoc (name, description, parameters, returns)
|
||||
classDoc.SetConstructor (constructorDoc)
|
||||
hierarchy['classes'].append (classDoc)
|
||||
classNameToDoc[name] = classDoc
|
||||
elif kind == 'function':
|
||||
if 'memberof' in doclet:
|
||||
parentName = doclet['memberof']
|
||||
if parentName in classNameToDoc:
|
||||
classDoc = classNameToDoc[parentName]
|
||||
methodDoc = MethodDoc (name, description, parameters, returns)
|
||||
classDoc.AddMethod (methodDoc)
|
||||
else:
|
||||
methodDoc = MethodDoc (name, description, parameters, returns)
|
||||
hierarchy['functions'].append (methodDoc)
|
||||
elif kind == 'constant':
|
||||
if 'isEnum' in doclet and doclet['isEnum'] == True:
|
||||
enumDoc = EnumDoc (name, description)
|
||||
hierarchy['enums'].append (enumDoc)
|
||||
enumNameToDoc[name] = enumDoc
|
||||
elif kind == 'member':
|
||||
parentName = doclet['memberof']
|
||||
if parentName in enumNameToDoc:
|
||||
enumDoc = enumNameToDoc[parentName]
|
||||
memberDoc = EnumMemberDoc (name, description)
|
||||
enumDoc.AddMember (memberDoc)
|
||||
return hierarchy
|
||||
|
||||
def CreateFromTemplate (templateHtmlPath, resultHtmlPath, navigation, title, content):
|
||||
shutil.copy (templateHtmlPath, resultHtmlPath)
|
||||
Tools.ReplaceStringsInFile (resultHtmlPath, [
|
||||
('$$$TITLE$$$', title),
|
||||
('$$$NAVIGATION$$$', navigation.GenerateHtml ()),
|
||||
('$$$MAIN$$$', content)
|
||||
])
|
||||
|
||||
def BuildNavigation (pages, hierarchy):
|
||||
navigation = Navigation ()
|
||||
pagesGroup = NavigationGroup ('Pages', False)
|
||||
classesGroup = NavigationGroup ('Classes', True)
|
||||
functionsGroup = NavigationGroup ('Functions', True)
|
||||
enumsGroup = NavigationGroup ('Enums', True)
|
||||
for page in pages:
|
||||
pagesGroup.AddLink (page['name'], page['url'])
|
||||
for classDoc in hierarchy['classes']:
|
||||
navigation.AddEntityLink (classDoc.name, classDoc.name + '.html')
|
||||
classesGroup.AddLink (classDoc.name, classDoc.name + '.html')
|
||||
for methodDoc in hierarchy['functions']:
|
||||
navigation.AddEntityLink (methodDoc.name, methodDoc.name + '.html')
|
||||
functionsGroup.AddLink (methodDoc.name, methodDoc.name + '.html')
|
||||
for enumDoc in hierarchy['enums']:
|
||||
navigation.AddEntityLink (enumDoc.name, enumDoc.name + '.html')
|
||||
enumsGroup.AddLink (enumDoc.name, enumDoc.name + '.html')
|
||||
navigation.AddGroup (pagesGroup)
|
||||
navigation.AddGroup (classesGroup)
|
||||
navigation.AddGroup (functionsGroup)
|
||||
navigation.AddGroup (enumsGroup)
|
||||
return navigation
|
||||
|
||||
def BuildDocumentationFiles (navigation, pages, hierarchy, sourceDir, resultDir):
|
||||
templateHtmlPath = os.path.join (sourceDir, 'Template.html')
|
||||
|
||||
for page in pages:
|
||||
if page['url'].startswith ('http'):
|
||||
continue
|
||||
sourceHtmlPath = os.path.join (sourceDir, page['url'])
|
||||
pageHtmlPath = os.path.join (resultDir, page['url'])
|
||||
pageContent = '<div class="page">\n' + Tools.GetFileContent (sourceHtmlPath) + '\n</div>'
|
||||
CreateFromTemplate (templateHtmlPath, pageHtmlPath, navigation, page['name'], pageContent)
|
||||
|
||||
for classDoc in hierarchy['classes']:
|
||||
classHtmlPath = os.path.join (resultDir, classDoc.name + '.html')
|
||||
CreateFromTemplate (templateHtmlPath, classHtmlPath, navigation, classDoc.name, classDoc.GenerateHtml (navigation))
|
||||
|
||||
for methodDoc in hierarchy['functions']:
|
||||
methodHtmlPath = os.path.join (resultDir, methodDoc.name + '.html')
|
||||
CreateFromTemplate (templateHtmlPath, methodHtmlPath, navigation, methodDoc.name, methodDoc.GenerateHtml (navigation))
|
||||
|
||||
for enumDoc in hierarchy['enums']:
|
||||
enumHtmlPath = os.path.join (resultDir, enumDoc.name + '.html')
|
||||
CreateFromTemplate (templateHtmlPath, enumHtmlPath, navigation, enumDoc.name, enumDoc.GenerateHtml (navigation))
|
||||
|
||||
def Main (argv):
|
||||
toolsDir = os.path.dirname (os.path.abspath (__file__))
|
||||
rootDir = os.path.dirname (toolsDir)
|
||||
os.chdir (rootDir)
|
||||
|
||||
shell = True
|
||||
if platform.system () != 'Windows':
|
||||
shell = False
|
||||
result = subprocess.run (['jsdoc', '-c', 'tools/jsdoc.json'], stdout = subprocess.PIPE, shell = shell)
|
||||
resultJson = json.loads (result.stdout)
|
||||
|
||||
resultDir = os.path.join (rootDir, 'docs')
|
||||
sourceDir = os.path.join (resultDir, 'source')
|
||||
|
||||
config = None
|
||||
with open (os.path.join (sourceDir, 'config.json')) as configJson:
|
||||
config = json.load (configJson)
|
||||
|
||||
doclets = GetDocumentedDoclets (resultJson)
|
||||
pages = config['pages']
|
||||
hierarchy = BuildHierarchy (doclets)
|
||||
|
||||
navigation = BuildNavigation (pages, hierarchy)
|
||||
for name in config['external_refs']:
|
||||
navigation.AddEntityLink (name, config['external_refs'][name])
|
||||
|
||||
BuildDocumentationFiles (navigation, pages, hierarchy, sourceDir, resultDir)
|
||||
|
||||
return 0
|
||||
|
||||
sys.exit (Main (sys.argv))
|
||||
@ -1,28 +1,12 @@
|
||||
{
|
||||
"source": {
|
||||
"include": ["source"]
|
||||
"include": ["source/engine"]
|
||||
},
|
||||
"opts": {
|
||||
"template": "node_modules/docdash/",
|
||||
"template": "node_modules/docdash",
|
||||
"encoding": "utf8",
|
||||
"destination": "build/docs/",
|
||||
"explain": true,
|
||||
"recurse": true,
|
||||
"verbose": false
|
||||
},
|
||||
"plugins": [
|
||||
"plugins/markdown"
|
||||
],
|
||||
"docdash" : {
|
||||
"menu": {
|
||||
"GitHub": {
|
||||
"href":"https://github.com/kovacsv/Online3DViewer",
|
||||
"target":"_blank"
|
||||
}
|
||||
}
|
||||
},
|
||||
"templates": {
|
||||
"default": {
|
||||
"includeDate": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
tools/jsdoc_custom.css
Normal file
17
tools/jsdoc_custom.css
Normal file
@ -0,0 +1,17 @@
|
||||
.usertext h1
|
||||
{
|
||||
font-size: 36px;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.usertext h2
|
||||
{
|
||||
font-size: 30px;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.usertext h3
|
||||
{
|
||||
font-size: 24px;
|
||||
margin: 1em 0;
|
||||
}
|
||||
@ -2,6 +2,12 @@ import os
|
||||
import re
|
||||
import codecs
|
||||
|
||||
def PrintInfo (message):
|
||||
print ('INFO: ' + message)
|
||||
|
||||
def PrintError (message):
|
||||
print ('ERROR: ' + message)
|
||||
|
||||
def GetFileContent (filePath):
|
||||
fileObject = codecs.open (filePath, 'r', 'utf-8')
|
||||
content = fileObject.read ()
|
||||
@ -105,6 +111,12 @@ def ReplaceStringInFile (filePath, oldString, newString):
|
||||
content = content.replace (oldString, newString)
|
||||
WriteContentToFile (filePath, content)
|
||||
|
||||
def ReplaceStringsInFile (filePath, oldNewPairs):
|
||||
content = GetFileContent (filePath)
|
||||
for oldNewPair in oldNewPairs:
|
||||
content = content.replace (oldNewPair[0], oldNewPair[1])
|
||||
WriteContentToFile (filePath, content)
|
||||
|
||||
def ReplaceRegexInFile (filePath, oldRegex, newRegex):
|
||||
content = GetFileContent (filePath)
|
||||
content = re.sub (oldRegex, newRegex, content)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user