mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 08:18:56 +02:00
Adding dedent
This commit is contained in:
commit
91c0fa2778
53 changed files with 454 additions and 226 deletions
|
@ -18,6 +18,10 @@
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* This API helps manage adding and deleting avatar bookmarks.
|
* This API helps manage adding and deleting avatar bookmarks.
|
||||||
* @namespace AvatarBookmarks
|
* @namespace AvatarBookmarks
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AvatarBookmarks: public Bookmarks, public Dependency {
|
class AvatarBookmarks: public Bookmarks, public Dependency {
|
||||||
|
|
|
@ -10,8 +10,11 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The LOD class manages your Level of Detail functions within interface
|
* The LODManager API manages your Level of Detail functions within interface.
|
||||||
* @namespace LODManager
|
* @namespace LODManager
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef hifi_LODManager_h
|
#ifndef hifi_LODManager_h
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace SpeechRecognizer
|
* @namespace SpeechRecognizer
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
class SpeechRecognizer : public QObject, public Dependency {
|
class SpeechRecognizer : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -28,6 +28,10 @@ class AudioScope : public QObject, public Dependency {
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The AudioScope API helps control the Audio Scope features in Interface
|
* The AudioScope API helps control the Audio Scope features in Interface
|
||||||
* @namespace AudioScope
|
* @namespace AudioScope
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {number} scopeInput <em>Read-only.</em>
|
* @property {number} scopeInput <em>Read-only.</em>
|
||||||
* @property {number} scopeOutputLeft <em>Read-only.</em>
|
* @property {number} scopeOutputLeft <em>Read-only.</em>
|
||||||
* @property {number} scopeOutputRight <em>Read-only.</em>
|
* @property {number} scopeOutputRight <em>Read-only.</em>
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The AvatarManager API has properties and methods which manage Avatars within the same domain.
|
* The AvatarManager API has properties and methods which manage Avatars within the same domain.
|
||||||
* @namespace AvatarManager
|
* @namespace AvatarManager
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AvatarManager : public AvatarHashMap {
|
class AvatarManager : public AvatarHashMap {
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The FaceTracker API helps manage facial tracking hardware.
|
* The FaceTracker API helps manage facial tracking hardware.
|
||||||
* @namespace FaceTracker
|
* @namespace FaceTracker
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DdeFaceTracker : public FaceTracker, public Dependency {
|
class DdeFaceTracker : public FaceTracker, public Dependency {
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
* The Picks API lets you create and manage objects for repeatedly calculating intersections in different ways.
|
* The Picks API lets you create and manage objects for repeatedly calculating intersections in different ways.
|
||||||
*
|
*
|
||||||
* @namespace Picks
|
* @namespace Picks
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property PICK_NOTHING {number} A filter flag. Don't intersect with anything.
|
* @property PICK_NOTHING {number} A filter flag. Don't intersect with anything.
|
||||||
* @property PICK_ENTITIES {number} A filter flag. Include entities when intersecting.
|
* @property PICK_ENTITIES {number} A filter flag. Include entities when intersecting.
|
||||||
* @property PICK_OVERLAYS {number} A filter flag. Include overlays when intersecting.
|
* @property PICK_OVERLAYS {number} A filter flag. Include overlays when intersecting.
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
* Pointers can also be configured to automatically generate PointerEvents.
|
* Pointers can also be configured to automatically generate PointerEvents.
|
||||||
*
|
*
|
||||||
* @namespace Pointers
|
* @namespace Pointers
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PointerScriptingInterface : public QObject, public Dependency {
|
class PointerScriptingInterface : public QObject, public Dependency {
|
||||||
|
|
|
@ -38,6 +38,9 @@ class AccountServicesScriptingInterface : public QObject {
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The AccountServices API contains helper functions related to user connectivity
|
* The AccountServices API contains helper functions related to user connectivity
|
||||||
*
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @namespace AccountServices
|
* @namespace AccountServices
|
||||||
* @property {string} username <em>Read-only.</em>
|
* @property {string} username <em>Read-only.</em>
|
||||||
* @property {boolean} loggedIn <em>Read-only.</em>
|
* @property {boolean} loggedIn <em>Read-only.</em>
|
||||||
|
|
|
@ -27,8 +27,14 @@ class Audio : public AudioScriptingInterface, protected ReadWriteLockable {
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The Audio API features tools to help control audio contexts and settings.
|
* The Audio API features tools to help control audio contexts and settings.
|
||||||
*
|
*
|
||||||
* @namespace Audio
|
* @namespace Audio
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {boolean} muted
|
* @property {boolean} muted
|
||||||
* @property {boolean} noiseReduction
|
* @property {boolean} noiseReduction
|
||||||
* @property {number} inputVolume
|
* @property {number} inputVolume
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
* The Clipboard API enables you to export and import entities to and from JSON files.
|
* The Clipboard API enables you to export and import entities to and from JSON files.
|
||||||
*
|
*
|
||||||
* @namespace Clipboard
|
* @namespace Clipboard
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
class ClipboardScriptingInterface : public QObject {
|
class ClipboardScriptingInterface : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -145,7 +145,10 @@ class ScriptEngine;
|
||||||
*
|
*
|
||||||
* @namespace Controller
|
* @namespace Controller
|
||||||
*
|
*
|
||||||
* @property {Controller.Actions} Actions - Predefined actions on Interface and the user's avatar. These can be used as end
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
|
* @property {Controller.Actions} Actions - Predefined actions on Interface and the user's avatar. These can be used as end
|
||||||
* points in a {@link RouteObject} mapping. A synonym for <code>Controller.Hardware.Actions</code>.
|
* points in a {@link RouteObject} mapping. A synonym for <code>Controller.Hardware.Actions</code>.
|
||||||
* <em>Read-only.</em><br />
|
* <em>Read-only.</em><br />
|
||||||
* Default mappings are provided from the <code>Controller.Hardware.Keyboard</code> and <code>Controller.Standard</code> to
|
* Default mappings are provided from the <code>Controller.Hardware.Keyboard</code> and <code>Controller.Standard</code> to
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity.
|
* The GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity.
|
||||||
* @namespace GooglePoly
|
* @namespace GooglePoly
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GooglePolyScriptingInterface : public QObject, public Dependency {
|
class GooglePolyScriptingInterface : public QObject, public Dependency {
|
||||||
|
|
|
@ -28,7 +28,11 @@ class QScriptEngine;
|
||||||
* The HMD API provides access to the HMD used in VR display mode.
|
* The HMD API provides access to the HMD used in VR display mode.
|
||||||
*
|
*
|
||||||
* @namespace HMD
|
* @namespace HMD
|
||||||
* @property {Vec3} position - The position of the HMD if currently in VR display mode, otherwise
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
|
* @property {Vec3} position - The position of the HMD if currently in VR display mode, otherwise
|
||||||
* {@link Vec3(0)|Vec3.ZERO}. <em>Read-only.</em>
|
* {@link Vec3(0)|Vec3.ZERO}. <em>Read-only.</em>
|
||||||
* @property {Quat} orientation - The orientation of the HMD if currently in VR display mode, otherwise
|
* @property {Quat} orientation - The orientation of the HMD if currently in VR display mode, otherwise
|
||||||
* {@link Quat(0)|Quat.IDENTITY}. <em>Read-only.</em>
|
* {@link Quat(0)|Quat.IDENTITY}. <em>Read-only.</em>
|
||||||
|
|
|
@ -32,6 +32,9 @@ class MenuItemProperties;
|
||||||
* If a menu item doesn't belong to a group it is always displayed.
|
* If a menu item doesn't belong to a group it is always displayed.
|
||||||
*
|
*
|
||||||
* @namespace Menu
|
* @namespace Menu
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -86,6 +86,9 @@ protected:
|
||||||
* The <code>Selection</code> API provides a means of grouping together avatars, entities, and overlays in named lists.
|
* The <code>Selection</code> API provides a means of grouping together avatars, entities, and overlays in named lists.
|
||||||
* @namespace Selection
|
* @namespace Selection
|
||||||
*
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @example <caption>Outline an entity when it is grabbed by a controller.</caption>
|
* @example <caption>Outline an entity when it is grabbed by a controller.</caption>
|
||||||
* // Create a box and copy the following text into the entity's "Script URL" field.
|
* // Create a box and copy the following text into the entity's "Script URL" field.
|
||||||
* (function () {
|
* (function () {
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The Settings API provides a facility to store and retrieve values that persist between Interface runs.
|
* The Settings API provides a facility to store and retrieve values that persist between Interface runs.
|
||||||
* @namespace Settings
|
* @namespace Settings
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SettingsScriptingInterface : public QObject {
|
class SettingsScriptingInterface : public QObject {
|
||||||
|
|
|
@ -28,7 +28,11 @@
|
||||||
* physics.
|
* physics.
|
||||||
*
|
*
|
||||||
* @namespace Window
|
* @namespace Window
|
||||||
* @property {number} innerWidth - The width of the drawable area of the Interface window (i.e., without borders or other
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
|
* @property {number} innerWidth - The width of the drawable area of the Interface window (i.e., without borders or other
|
||||||
* chrome), in pixels. <em>Read-only.</em>
|
* chrome), in pixels. <em>Read-only.</em>
|
||||||
* @property {number} innerHeight - The height of the drawable area of the Interface window (i.e., without borders or other
|
* @property {number} innerHeight - The height of the drawable area of the Interface window (i.e., without borders or other
|
||||||
* chrome), in pixels. <em>Read-only.</em>
|
* chrome), in pixels. <em>Read-only.</em>
|
||||||
|
|
|
@ -26,6 +26,10 @@ class AvatarInputs : public QObject {
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* API to help manage your Avatar's input
|
* API to help manage your Avatar's input
|
||||||
* @namespace AvatarInputs
|
* @namespace AvatarInputs
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {boolean} cameraEnabled <em>Read-only.</em>
|
* @property {boolean} cameraEnabled <em>Read-only.</em>
|
||||||
* @property {boolean} cameraMuted <em>Read-only.</em>
|
* @property {boolean} cameraMuted <em>Read-only.</em>
|
||||||
* @property {boolean} isHMD <em>Read-only.</em>
|
* @property {boolean} isHMD <em>Read-only.</em>
|
||||||
|
|
|
@ -31,9 +31,6 @@
|
||||||
#include "EntityTree.h"
|
#include "EntityTree.h"
|
||||||
#include "ContextOverlayLogging.h"
|
#include "ContextOverlayLogging.h"
|
||||||
|
|
||||||
/**jsdoc
|
|
||||||
* @namespace ContextOverlay
|
|
||||||
*/
|
|
||||||
class ContextOverlayInterface : public QObject, public Dependency {
|
class ContextOverlayInterface : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,10 @@ void RayToOverlayIntersectionResultFromScriptValue(const QScriptValue& object, R
|
||||||
* The Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to
|
* The Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to
|
||||||
* yourself and that aren't persisted to the domain. They are used for UI.
|
* yourself and that aren't persisted to the domain. They are used for UI.
|
||||||
* @namespace Overlays
|
* @namespace Overlays
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {Uuid} keyboardFocusOverlay - Get or set the {@link Overlays.OverlayType|web3d} overlay that has keyboard focus.
|
* @property {Uuid} keyboardFocusOverlay - Get or set the {@link Overlays.OverlayType|web3d} overlay that has keyboard focus.
|
||||||
* If no overlay has keyboard focus, get returns <code>null</code>; set to <code>null</code> or {@link Uuid|Uuid.NULL} to
|
* If no overlay has keyboard focus, get returns <code>null</code>; set to <code>null</code> or {@link Uuid|Uuid.NULL} to
|
||||||
* clear keyboard focus.
|
* clear keyboard focus.
|
||||||
|
|
|
@ -37,6 +37,10 @@ public:
|
||||||
* API to manage animation cache resources.
|
* API to manage animation cache resources.
|
||||||
* @namespace AnimationCache
|
* @namespace AnimationCache
|
||||||
*
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
||||||
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
||||||
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
||||||
|
|
|
@ -41,6 +41,10 @@ class AudioStreamStatsInterface : public QObject {
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @class AudioStats.AudioStreamStats
|
* @class AudioStats.AudioStreamStats
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {number} lossRate <em>Read-only.</em>
|
* @property {number} lossRate <em>Read-only.</em>
|
||||||
* @property {number} lossCount <em>Read-only.</em>
|
* @property {number} lossCount <em>Read-only.</em>
|
||||||
* @property {number} lossRateWindow <em>Read-only.</em>
|
* @property {number} lossRateWindow <em>Read-only.</em>
|
||||||
|
@ -185,6 +189,10 @@ class AudioStatsInterface : public QObject {
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Audio stats from the client.
|
* Audio stats from the client.
|
||||||
* @namespace AudioStats
|
* @namespace AudioStats
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {number} pingMs <em>Read-only.</em>
|
* @property {number} pingMs <em>Read-only.</em>
|
||||||
* @property {number} inputReadMsMax <em>Read-only.</em>
|
* @property {number} inputReadMsMax <em>Read-only.</em>
|
||||||
* @property {number} inputUnplayedMsMax <em>Read-only.</em>
|
* @property {number} inputUnplayedMsMax <em>Read-only.</em>
|
||||||
|
|
|
@ -29,6 +29,11 @@ public:
|
||||||
* API to manage sound cache resources.
|
* API to manage sound cache resources.
|
||||||
* @namespace SoundCache
|
* @namespace SoundCache
|
||||||
*
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
||||||
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
||||||
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
||||||
|
|
|
@ -49,9 +49,12 @@ class UserInputMapper;
|
||||||
* output that already has a route the new route is ignored.</li>
|
* output that already has a route the new route is ignored.</li>
|
||||||
* <li>New mappings override previous mappings: each output is processed using the route in the most recently enabled
|
* <li>New mappings override previous mappings: each output is processed using the route in the most recently enabled
|
||||||
* mapping that contains that output.</li>
|
* mapping that contains that output.</li>
|
||||||
* </p>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @class MappingObject
|
* @class MappingObject
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
|
|
@ -35,6 +35,9 @@ class ScriptingInterface;
|
||||||
* types.<p>
|
* types.<p>
|
||||||
*
|
*
|
||||||
* @class RouteObject
|
* @class RouteObject
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO migrate functionality to a RouteBuilder class and make the proxy defer to that
|
// TODO migrate functionality to a RouteBuilder class and make the proxy defer to that
|
||||||
|
|
|
@ -174,6 +174,10 @@ private:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace Reticle
|
* @namespace Reticle
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {boolean} allowMouseCapture
|
* @property {boolean} allowMouseCapture
|
||||||
* @property {number} depth
|
* @property {number} depth
|
||||||
* @property {Vec2} maximumPosition
|
* @property {Vec2} maximumPosition
|
||||||
|
|
|
@ -94,6 +94,12 @@ void RayToEntityIntersectionResultFromScriptValue(const QScriptValue& object, Ra
|
||||||
* Interface has displayed and so knows about.
|
* Interface has displayed and so knows about.
|
||||||
*
|
*
|
||||||
* @namespace Entities
|
* @namespace Entities
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {Uuid} keyboardFocusEntity - Get or set the {@link Entities.EntityType|Web} entity that has keyboard focus.
|
* @property {Uuid} keyboardFocusEntity - Get or set the {@link Entities.EntityType|Web} entity that has keyboard focus.
|
||||||
* If no entity has keyboard focus, get returns <code>null</code>; set to <code>null</code> or {@link Uuid|Uuid.NULL} to
|
* If no entity has keyboard focus, get returns <code>null</code>; set to <code>null</code> or {@link Uuid|Uuid.NULL} to
|
||||||
* clear keyboard focus.
|
* clear keyboard focus.
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The experimental Graphics API <em>(experimental)</em> lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting.
|
* The experimental Graphics API <em>(experimental)</em> lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting.
|
||||||
* @namespace Graphics
|
* @namespace Graphics
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GraphicsScriptingInterface : public QObject, public QScriptable, public Dependency {
|
class GraphicsScriptingInterface : public QObject, public QScriptable, public Dependency {
|
||||||
|
|
|
@ -144,6 +144,9 @@ public:
|
||||||
* API to manage model cache resources.
|
* API to manage model cache resources.
|
||||||
* @namespace ModelCache
|
* @namespace ModelCache
|
||||||
*
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
||||||
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
||||||
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
||||||
|
|
|
@ -151,6 +151,9 @@ public:
|
||||||
* API to manage texture cache resources.
|
* API to manage texture cache resources.
|
||||||
* @namespace TextureCache
|
* @namespace TextureCache
|
||||||
*
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
* @property {number} numTotal - Total number of total resources. <em>Read-only.</em>
|
||||||
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
* @property {number} numCached - Total number of cached resource. <em>Read-only.</em>
|
||||||
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
* @property {number} sizeTotal - Size in bytes of all resources. <em>Read-only.</em>
|
||||||
|
|
|
@ -33,6 +33,11 @@ const QString GET_PLACE = "/api/v1/places/%1";
|
||||||
* The location API provides facilities related to your current location in the metaverse.
|
* The location API provides facilities related to your current location in the metaverse.
|
||||||
*
|
*
|
||||||
* @namespace location
|
* @namespace location
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid|Uuid.NULL} if you're not
|
* @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid|Uuid.NULL} if you're not
|
||||||
* connected to the domain or are in a serverless domain.
|
* connected to the domain or are in a serverless domain.
|
||||||
* <em>Read-only.</em>
|
* <em>Read-only.</em>
|
||||||
|
|
|
@ -37,6 +37,11 @@
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @namespace Messages
|
* @namespace Messages
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
*/
|
*/
|
||||||
class MessagesClient : public QObject, public Dependency {
|
class MessagesClient : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -89,6 +89,12 @@ class ScriptableResource : public QObject {
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @constructor Resource
|
* @constructor Resource
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {string} url - URL of this resource.
|
* @property {string} url - URL of this resource.
|
||||||
* @property {Resource.State} state - Current loading state.
|
* @property {Resource.State} state - Current loading state.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The Assets API allows you to communicate with the Asset Browser.
|
* The Assets API allows you to communicate with the Asset Browser.
|
||||||
* @namespace Assets
|
* @namespace Assets
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
*/
|
*/
|
||||||
class AssetScriptingInterface : public BaseAssetScriptingInterface, QScriptable {
|
class AssetScriptingInterface : public BaseAssetScriptingInterface, QScriptable {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -35,6 +35,12 @@
|
||||||
* of gimbal lock.
|
* of gimbal lock.
|
||||||
* @namespace Quat
|
* @namespace Quat
|
||||||
* @variation 0
|
* @variation 0
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property IDENTITY {Quat} <code>{ x: 0, y: 0, z: 0, w: 1 }</code> : The identity rotation, i.e., no rotation.
|
* @property IDENTITY {Quat} <code>{ x: 0, y: 0, z: 0, w: 1 }</code> : The identity rotation, i.e., no rotation.
|
||||||
* <em>Read-only.</em>
|
* <em>Read-only.</em>
|
||||||
* @example <caption>Print the <code>IDENTITY</code> value.</caption>
|
* @example <caption>Print the <code>IDENTITY</code> value.</caption>
|
||||||
|
|
|
@ -25,6 +25,10 @@ class QScriptValue;
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace Recording
|
* @namespace Recording
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
*/
|
*/
|
||||||
class RecordingScriptingInterface : public QObject, public Dependency {
|
class RecordingScriptingInterface : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -112,6 +112,10 @@ namespace SceneScripting {
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @class Scene.Stage
|
* @class Scene.Stage
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {string} backgroundMode
|
* @property {string} backgroundMode
|
||||||
* @property {Scene.Stage.KeyLight} keyLight
|
* @property {Scene.Stage.KeyLight} keyLight
|
||||||
* @property {Scene.Stage.Location} location
|
* @property {Scene.Stage.Location} location
|
||||||
|
@ -171,6 +175,10 @@ namespace SceneScripting {
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace Scene
|
* @namespace Scene
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {boolean} shouldRenderAvatars
|
* @property {boolean} shouldRenderAvatars
|
||||||
* @property {boolean} shouldRenderEntities
|
* @property {boolean} shouldRenderEntities
|
||||||
* @property {Scene.Stage} stage
|
* @property {Scene.Stage} stage
|
||||||
|
|
|
@ -89,6 +89,12 @@ public:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace Script
|
* @namespace Script
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {string} context
|
* @property {string} context
|
||||||
*/
|
*/
|
||||||
class ScriptEngine : public BaseScriptEngine, public EntitiesScriptEngineProvider {
|
class ScriptEngine : public BaseScriptEngine, public EntitiesScriptEngineProvider {
|
||||||
|
|
|
@ -29,6 +29,10 @@ class ScriptEngine;
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace ScriptDiscoveryService
|
* @namespace ScriptDiscoveryService
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {string} debugScriptUrl
|
* @property {string} debugScriptUrl
|
||||||
* @property {string} defaultScriptsPath
|
* @property {string} defaultScriptsPath
|
||||||
* @property {ScriptsModel} scriptsModel
|
* @property {ScriptsModel} scriptsModel
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
* hexadecimal digits.
|
* hexadecimal digits.
|
||||||
*
|
*
|
||||||
* @namespace Uuid
|
* @namespace Uuid
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property NULL {Uuid} The null UUID, <code>{00000000-0000-0000-0000-000000000000}</code>.
|
* @property NULL {Uuid} The null UUID, <code>{00000000-0000-0000-0000-000000000000}</code>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,9 @@ public:
|
||||||
* <p>Has properties and functions below in addition to those of <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html">
|
* <p>Has properties and functions below in addition to those of <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html">
|
||||||
* http://doc.qt.io/qt-5/qabstractitemmodel.html</a>.</p>
|
* http://doc.qt.io/qt-5/qabstractitemmodel.html</a>.</p>
|
||||||
* @class ScriptsModel
|
* @class ScriptsModel
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
class ScriptsModel : public QAbstractItemModel {
|
class ScriptsModel : public QAbstractItemModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
* <p>Has properties and functions per <a href="http://doc.qt.io/qt-5/qsortfilterproxymodel.html">
|
* <p>Has properties and functions per <a href="http://doc.qt.io/qt-5/qsortfilterproxymodel.html">
|
||||||
* http://doc.qt.io/qt-5/qsortfilterproxymodel.html</a>.</p>
|
* http://doc.qt.io/qt-5/qsortfilterproxymodel.html</a>.</p>
|
||||||
* @class ScriptsModelFilter
|
* @class ScriptsModelFilter
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
class ScriptsModelFilter : public QSortFilterProxyModel {
|
class ScriptsModelFilter : public QSortFilterProxyModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -18,7 +18,12 @@
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace Users
|
* @namespace Users
|
||||||
* @property {boolean} canKick - <code>true</code> if the domain server allows the node or avatar to kick (ban) avatars,
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
|
* @property {boolean} canKick - <code>true</code> if the domain server allows the node or avatar to kick (ban) avatars,
|
||||||
* otherwise <code>false</code>. <em>Read-only.</em>
|
* otherwise <code>false</code>. <em>Read-only.</em>
|
||||||
* @property {boolean} requestsDomainListData - <code>true</code> if the avatar requests extra data from the mixers (such as
|
* @property {boolean} requestsDomainListData - <code>true</code> if the avatar requests extra data from the mixers (such as
|
||||||
* positional data of an avatar you've ignored). <em>Read-only.</em>
|
* positional data of an avatar you've ignored). <em>Read-only.</em>
|
||||||
|
|
|
@ -47,6 +47,12 @@
|
||||||
*
|
*
|
||||||
* @namespace Vec3
|
* @namespace Vec3
|
||||||
* @variation 0
|
* @variation 0
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @property {Vec3} UNIT_X - <code>{ x: 1, y: 0, z: 0 }</code> : Unit vector in the x-axis direction. <em>Read-only.</em>
|
* @property {Vec3} UNIT_X - <code>{ x: 1, y: 0, z: 0 }</code> : Unit vector in the x-axis direction. <em>Read-only.</em>
|
||||||
* @property {Vec3} UNIT_Y - <code>{ x: 0, y: 1, z: 0 }</code> : Unit vector in the y-axis direction. <em>Read-only.</em>
|
* @property {Vec3} UNIT_Y - <code>{ x: 0, y: 1, z: 0 }</code> : Unit vector in the y-axis direction. <em>Read-only.</em>
|
||||||
* @property {Vec3} UNIT_Z - <code>{ x: 0, y: 0, z: 1 }</code> : Unit vector in the z-axis direction. <em>Read-only.</em>
|
* @property {Vec3} UNIT_Z - <code>{ x: 0, y: 0, z: 1 }</code> : Unit vector in the z-axis direction. <em>Read-only.</em>
|
||||||
|
|
|
@ -25,6 +25,11 @@
|
||||||
* Helper functions to render ephemeral debug markers and lines.
|
* Helper functions to render ephemeral debug markers and lines.
|
||||||
* DebugDraw markers and lines are only visible locally, they are not visible by other users.
|
* DebugDraw markers and lines are only visible locally, they are not visible by other users.
|
||||||
* @namespace DebugDraw
|
* @namespace DebugDraw
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
*/
|
*/
|
||||||
class DebugDraw : public QObject {
|
class DebugDraw : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
* The Paths API provides absolute paths to the scripts and resources directories.
|
* The Paths API provides absolute paths to the scripts and resources directories.
|
||||||
*
|
*
|
||||||
* @namespace Paths
|
* @namespace Paths
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @deprecated The Paths API is deprecated. Use {@link Script.resolvePath} and {@link Script.resourcesPath} instead.
|
* @deprecated The Paths API is deprecated. Use {@link Script.resolvePath} and {@link Script.resourcesPath} instead.
|
||||||
* @readonly
|
* @readonly
|
||||||
* @property {string} defaultScripts - The path to the scripts directory. <em>Read-only.</em>
|
* @property {string} defaultScripts - The path to the scripts directory. <em>Read-only.</em>
|
||||||
|
|
|
@ -361,6 +361,12 @@ using MeshPointer = std::shared_ptr<graphics::Mesh>;
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* A handle for a mesh in an entity, such as returned by {@link Entities.getMeshes}.
|
* A handle for a mesh in an entity, such as returned by {@link Entities.getMeshes}.
|
||||||
* @class MeshProxy
|
* @class MeshProxy
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
* @hifi-server-entity
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*
|
||||||
* @deprecated Use the {@link Graphics} API instead.
|
* @deprecated Use the {@link Graphics} API instead.
|
||||||
*/
|
*/
|
||||||
class MeshProxy : public QObject {
|
class MeshProxy : public QObject {
|
||||||
|
|
|
@ -40,6 +40,10 @@ class Camera : public QObject {
|
||||||
* The Camera API provides access to the "camera" that defines your view in desktop and HMD display modes.
|
* The Camera API provides access to the "camera" that defines your view in desktop and HMD display modes.
|
||||||
*
|
*
|
||||||
* @namespace Camera
|
* @namespace Camera
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property position {Vec3} The position of the camera. You can set this value only when the camera is in independent mode.
|
* @property position {Vec3} The position of the camera. You can set this value only when the camera is in independent mode.
|
||||||
* @property orientation {Quat} The orientation of the camera. You can set this value only when the camera is in independent
|
* @property orientation {Quat} The orientation of the camera. You can set this value only when the camera is in independent
|
||||||
* mode.
|
* mode.
|
||||||
|
|
|
@ -40,6 +40,9 @@ class OffscreenQmlSurface;
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @namespace Tablet
|
* @namespace Tablet
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
*/
|
*/
|
||||||
class TabletScriptingInterface : public QObject, public Dependency {
|
class TabletScriptingInterface : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -176,6 +179,10 @@ Q_DECLARE_METATYPE(TabletButtonsProxyModel*);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @class TabletProxy
|
* @class TabletProxy
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {string} name - Name of this tablet. <em>Read-only.</em>
|
* @property {string} name - Name of this tablet. <em>Read-only.</em>
|
||||||
* @property {boolean} toolbarMode - Used to transition this tablet into and out of toolbar mode.
|
* @property {boolean} toolbarMode - Used to transition this tablet into and out of toolbar mode.
|
||||||
* When tablet is in toolbar mode, all its buttons will appear in a floating toolbar.
|
* When tablet is in toolbar mode, all its buttons will appear in a floating toolbar.
|
||||||
|
@ -410,6 +417,10 @@ Q_DECLARE_METATYPE(TabletProxy*);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @class TabletButtonProxy
|
* @class TabletButtonProxy
|
||||||
|
*
|
||||||
|
* @hifi-interface
|
||||||
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
* @property {Uuid} uuid - Uniquely identifies this button. <em>Read-only.</em>
|
* @property {Uuid} uuid - Uniquely identifies this button. <em>Read-only.</em>
|
||||||
* @property {TabletButtonProxy.ButtonProperties} properties
|
* @property {TabletButtonProxy.ButtonProperties} properties
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,243 +1,259 @@
|
||||||
const htmlclean = require('htmlclean');
|
// Dependencies
|
||||||
const fs = require('fs');
|
const htmlclean = require('htmlclean');
|
||||||
const path = require('path');
|
const fs = require('fs');
|
||||||
const pretty = require('pretty');
|
const path = require('path');
|
||||||
const cheerio = require('cheerio');
|
const pretty = require('pretty');
|
||||||
const rimraf = require('rimraf');
|
const cheerio = require('cheerio');
|
||||||
|
const rimraf = require('rimraf');
|
||||||
|
|
||||||
// required directories
|
// Required directories
|
||||||
let dir_out = path.join(__dirname, 'out');
|
let dir_out = path.join(__dirname, 'out');
|
||||||
|
|
||||||
let dir_grav = path.join(dir_out, 'grav');
|
let dir_grav = path.join(dir_out, 'grav');
|
||||||
let dir_css = path.join(dir_grav, 'css');
|
let dir_css = path.join(dir_grav, 'css');
|
||||||
let dir_js = path.join(dir_grav, 'js');
|
let dir_js = path.join(dir_grav, 'js');
|
||||||
let dir_template = path.join(dir_grav, 'templates');
|
let dir_template = path.join(dir_grav, 'templates');
|
||||||
|
|
||||||
let dir_md = path.join(dir_grav, '06.api-reference');
|
let dir_md = path.join(dir_grav, '06.api-reference');
|
||||||
let dir_md_objects = path.join(dir_md, '02.Objects');
|
let dir_md_objects = path.join(dir_md, '02.Objects');
|
||||||
let dir_md_namespaces = path.join(dir_md, '01.Namespaces');
|
let dir_md_namespaces = path.join(dir_md, '01.Namespaces');
|
||||||
let dir_md_globals = path.join(dir_md, '03.Globals');
|
let dir_md_globals = path.join(dir_md, '03.Globals');
|
||||||
|
|
||||||
// maps for sorting
|
// Target Copy Directories
|
||||||
let map_dir_md = {
|
let targetTemplateDirectory = "D:/ROLC/Organize/O_Projects/Hifi/Docs/hifi-docs-grav/user/themes/learn2/";
|
||||||
"Class": dir_md_objects,
|
let targetMDDirectory = "D:/ROLC/Organize/O_Projects/Hifi/Docs/hifi-docs-grav-content/";
|
||||||
"Namespace": dir_md_namespaces,
|
|
||||||
"Global": dir_md_globals,
|
|
||||||
}
|
|
||||||
|
|
||||||
// html variables to be replaced
|
// Array to itterate over and create if doesn't exist
|
||||||
const html_reg_static = /<span class="type-signature">\(static\)<\/span>/g
|
let dirArray = [dir_grav, dir_css, dir_js, dir_template, dir_md, dir_md_objects, dir_md_namespaces, dir_md_globals];
|
||||||
const html_reg_title = /\<h1.+?\>.+?\<\/h1\>/g;
|
|
||||||
const html_reg_htmlExt = /\.html/g;
|
|
||||||
|
|
||||||
// remove grav directory if exists to make sure old files aren't kept
|
// Maps for directory names
|
||||||
if (fs.existsSync(dir_grav)){
|
let map_dir_md = {
|
||||||
console.log("dir_grav exists");
|
"API-Reference": dir_md,
|
||||||
rimraf.sync(dir_grav);
|
"Globals": dir_md_globals,
|
||||||
}
|
"Objects": dir_md_objects,
|
||||||
|
"Namespaces": dir_md_namespaces,
|
||||||
// array to itterate over and create if doesn't exist
|
"Class": dir_md_objects,
|
||||||
let dirArray = [dir_grav, dir_css, dir_js, dir_template, dir_md, dir_md_objects, dir_md_namespaces, dir_md_globals];
|
"Namespace": dir_md_namespaces,
|
||||||
|
"Global": dir_md_globals
|
||||||
dirArray.forEach(function(dir){
|
|
||||||
if (!fs.existsSync(dir)) {
|
|
||||||
fs.mkdirSync(dir);
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
function createMD(title, directory){
|
// Base Grouping Directories for MD files
|
||||||
let mdSource = makeMdSource(title);
|
let baseMDDirectories = ["API-Reference", "Globals", "Namespaces", "Objects"]
|
||||||
let destinationMDFile = path.join(directory, `API_${title}.md`);
|
|
||||||
fs.writeFileSync(destinationMDFile, mdSource);
|
|
||||||
}
|
|
||||||
|
|
||||||
function createTemplate(title,directory, content ){
|
// Html variables to be handle regex replacements
|
||||||
let twigBasePartial = makeTwigFile(content);
|
const html_reg_static = /<span class="type-signature">\(static\)<\/span>/g
|
||||||
let destinationFile = path.join(directory, `API_${title}.html.twig`);
|
const html_reg_title = /\<h1.+?\>.+?\<\/h1\>/g;
|
||||||
fs.writeFileSync(destinationFile, twigBasePartial);
|
const html_reg_htmlExt = /\.html/g;
|
||||||
}
|
const html_reg_objectHeader = /<header>[\s\S]+?<\/header>/;
|
||||||
|
const html_reg_objectSpanNew = /<h4 class="name"[\s\S]+?<\/span><\/h4>/;
|
||||||
|
|
||||||
createMD("API-Reference", dir_md);
|
// Procedural functions
|
||||||
createTemplate("API-Reference", dir_template,"");
|
function createMD(title, directory, needsDir){
|
||||||
createMD("Globals", dir_md_globals);
|
let mdSource = makeMdSource(title);
|
||||||
createTemplate("Globals", dir_template,"");
|
if (needsDir){
|
||||||
createMD("Namespaces", dir_md_namespaces);
|
if (!fs.existsSync(directory)) {
|
||||||
createTemplate("Namespaces", dir_template,"");
|
fs.mkdirSync(directory);
|
||||||
createMD("Objects", dir_md_objects);
|
|
||||||
createTemplate("Objects", dir_template,"");
|
|
||||||
|
|
||||||
// read jsdoc output folder
|
|
||||||
|
|
||||||
let files = fs.readdirSync(dir_out);
|
|
||||||
files.forEach(function (file){
|
|
||||||
let curSource = path.join(dir_out, file);
|
|
||||||
if (path.extname(curSource) == ".html" && path.basename(curSource, '.html') !== "index") {
|
|
||||||
// clean up the html source
|
|
||||||
|
|
||||||
let loadedHtml = prepareHtml(curSource);
|
|
||||||
|
|
||||||
// extract the title, groupename, and the main div
|
|
||||||
|
|
||||||
let splitTitle = loadedHtml("title").text().split(": ");
|
|
||||||
// console.log(splitTitle);
|
|
||||||
let groupName = splitTitle[1];
|
|
||||||
let htmlTitle = splitTitle.pop();
|
|
||||||
// strip out undesired regex
|
|
||||||
let mainDiv = loadedHtml("#main").html();
|
|
||||||
let mainDivRegexed = mainDiv.replace(html_reg_static,"")
|
|
||||||
.replace(html_reg_title,"")
|
|
||||||
.replace(html_reg_htmlExt,"")
|
|
||||||
|
|
||||||
// create the .md file and corresponding folder
|
|
||||||
|
|
||||||
if (htmlTitle !== "Global"){
|
|
||||||
let mdSource = makeMdSource(htmlTitle);
|
|
||||||
let destinationDirectory = path.join(map_dir_md[groupName], htmlTitle);
|
|
||||||
if (!fs.existsSync(destinationDirectory)) {
|
|
||||||
fs.mkdirSync(destinationDirectory);
|
|
||||||
}
|
}
|
||||||
let destinationMDFile = path.join(destinationDirectory, `API_${htmlTitle}.md`);
|
|
||||||
fs.writeFileSync(destinationMDFile, mdSource);
|
|
||||||
} else {
|
|
||||||
let mdSource = makeMdSource(htmlTitle);
|
|
||||||
let destinationMDFile = path.join(map_dir_md[groupName], `API_Globals.md`);
|
|
||||||
fs.writeFileSync(destinationMDFile, mdSource);
|
|
||||||
}
|
}
|
||||||
|
let destinationMDFile = path.join(directory, `API_${title}.md`);
|
||||||
|
fs.writeFileSync(destinationMDFile, mdSource);
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTemplate(title,content){
|
||||||
// create the twig template
|
let twigBasePartial = makeTwigFile(content);
|
||||||
|
let destinationFile = path.join(dir_template, `API_${title}.html.twig`);
|
||||||
let twigBasePartial = makeTwigFile(mainDivRegexed);
|
|
||||||
let destinationFile = path.join(dir_template, `API_${htmlTitle}.html.twig`);
|
|
||||||
fs.writeFileSync(destinationFile, twigBasePartial);
|
fs.writeFileSync(destinationFile, twigBasePartial);
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
// let curSource = path.join(dir_out, "Camera.html");
|
function copyFileSync( source, target ) {
|
||||||
|
let targetFile = target;
|
||||||
|
|
||||||
|
// If target is a directory a new file with the same name will be created
|
||||||
|
if ( fs.existsSync( target ) ) {
|
||||||
|
// console.log("target exists");
|
||||||
|
if ( fs.lstatSync( target ).isDirectory() ) {
|
||||||
|
// console.log("target is a directory");
|
||||||
|
|
||||||
|
targetFile = path.join( target, path.basename( source ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync(targetFile, fs.readFileSync(source));
|
||||||
function prepareHtml(source){
|
|
||||||
let htmlBefore = fs.readFileSync(source, {encoding: 'utf8'});
|
|
||||||
let htmlAfter = htmlclean(htmlBefore);
|
|
||||||
let htmlAfterPretty = pretty(htmlAfter);
|
|
||||||
return cheerio.load(htmlAfterPretty);
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeMdSource(title){
|
|
||||||
return (
|
|
||||||
`---
|
|
||||||
title: '${title}'
|
|
||||||
taxonomy:
|
|
||||||
category:
|
|
||||||
- docs
|
|
||||||
visible: true
|
|
||||||
---
|
|
||||||
`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeTwigFile(contentHtml){
|
|
||||||
return (
|
|
||||||
`
|
|
||||||
{% extends 'partials/base_noGit.html.twig' %}
|
|
||||||
{% set tags = page.taxonomy.tag %}
|
|
||||||
{% if tags %}
|
|
||||||
{% set progress = page.collection({'items':{'@taxonomy':{'category': 'docs', 'tag': tags}},'order': {'by': 'default', 'dir': 'asc'}}) %}
|
|
||||||
{% else %}
|
|
||||||
{% set progress = page.collection({'items':{'@taxonomy':{'category': 'docs'}},'order': {'by': 'default', 'dir': 'asc'}}) %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% block navigation %}
|
|
||||||
<div id="navigation">
|
|
||||||
{% if not progress.isFirst(page.path) %}
|
|
||||||
<a class="nav nav-prev" href="{{ progress.nextSibling(page.path).url }}"> <img src="{{ url('theme://images/left-arrow.png') }}"></a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if not progress.isLast(page.path) %}
|
|
||||||
<a class="nav nav-next" href="{{ progress.prevSibling(page.path).url }}"><img src="{{ url('theme://images/right-arrow.png') }}"></a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div id="body-inner">
|
|
||||||
<h1>{{ page.title }}</h1>
|
|
||||||
${contentHtml}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
let targertTwigDirectory = "D:/ROLC/Organize/O_Projects/Hifi/Docs/hifi-docs-grav/user/themes/learn2/";
|
|
||||||
let targetMDDirectory = "D:/ROLC/Organize/O_Projects/Hifi/Docs/hifi-docs-grav-content/";
|
|
||||||
|
|
||||||
// Copy files to the Twig Directory
|
|
||||||
let templateFiles = fs.readdirSync(path.resolve(targertTwigDirectory));
|
|
||||||
templateFiles.forEach(function(file){
|
|
||||||
let curSource = path.join(targertTwigDirectory, file);
|
|
||||||
if(path.basename(file, '.html').indexOf("API") > -1){
|
|
||||||
fs.unlink(curSource);
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
copyFolderRecursiveSync(dir_template, targertTwigDirectory);
|
function copyFolderRecursiveSync( source, target ) {
|
||||||
|
var files = [];
|
||||||
|
|
||||||
// Copy files to the Md Directory
|
// Check if folder needs to be created or integrated
|
||||||
|
var targetFolder = path.join( target, path.basename( source ) );
|
||||||
|
if ( !fs.existsSync( targetFolder ) ) {
|
||||||
|
fs.mkdirSync( targetFolder );
|
||||||
|
}
|
||||||
|
|
||||||
let baseMdRefDir = path.join(targetMDDirectory,"06.api-reference");
|
// Copy
|
||||||
|
if ( fs.lstatSync( source ).isDirectory() ) {
|
||||||
if (fs.existsSync(baseMdRefDir)){
|
files = fs.readdirSync( source );
|
||||||
rimraf.sync(baseMdRefDir);
|
files.forEach( function ( file ) {
|
||||||
}
|
var curSource = path.join( source, file );
|
||||||
|
if ( fs.lstatSync( curSource ).isDirectory() ) {
|
||||||
copyFolderRecursiveSync(dir_md, targetMDDirectory);
|
copyFolderRecursiveSync( curSource, targetFolder );
|
||||||
|
} else {
|
||||||
// helper functions
|
copyFileSync( curSource, targetFolder );
|
||||||
function copyFileSync( source, target ) {
|
}
|
||||||
console.log("sourece:" + source);
|
} );
|
||||||
let targetFile = target;
|
|
||||||
|
|
||||||
//if target is a directory a new file with the same name will be created
|
|
||||||
if ( fs.existsSync( target ) ) {
|
|
||||||
console.log("target exists");
|
|
||||||
if ( fs.lstatSync( target ).isDirectory() ) {
|
|
||||||
console.log("target is a directory");
|
|
||||||
|
|
||||||
targetFile = path.join( target, path.basename( source ) );
|
|
||||||
console.log("targetFile:" + targetFile);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync(targetFile, fs.readFileSync(source));
|
function prepareHtml(source){
|
||||||
}
|
let htmlBefore = fs.readFileSync(source, {encoding: 'utf8'});
|
||||||
|
let htmlAfter = htmlclean(htmlBefore);
|
||||||
function copyFolderRecursiveSync( source, target ) {
|
let htmlAfterPretty = pretty(htmlAfter);
|
||||||
var files = [];
|
return cheerio.load(htmlAfterPretty);
|
||||||
|
|
||||||
//check if folder needs to be created or integrated
|
|
||||||
// console.log("target:" + target)
|
|
||||||
// console.log("source:" + source)
|
|
||||||
// console.log("basename source:" + path.basename( source ))
|
|
||||||
|
|
||||||
var targetFolder = path.join( target, path.basename( source ) );
|
|
||||||
// console.log("targetFolder:" + targetFolder);
|
|
||||||
if ( !fs.existsSync( targetFolder ) ) {
|
|
||||||
fs.mkdirSync( targetFolder );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy
|
function makeMdSource(title){
|
||||||
if ( fs.lstatSync( source ).isDirectory() ) {
|
return (
|
||||||
files = fs.readdirSync( source );
|
`---
|
||||||
files.forEach( function ( file ) {
|
title: '${title}'
|
||||||
var curSource = path.join( source, file );
|
taxonomy:
|
||||||
if ( fs.lstatSync( curSource ).isDirectory() ) {
|
category:
|
||||||
copyFolderRecursiveSync( curSource, targetFolder );
|
- docs
|
||||||
} else {
|
visible: true
|
||||||
copyFileSync( curSource, targetFolder );
|
---
|
||||||
}
|
`
|
||||||
} );
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
function makeTwigFile(contentHtml){
|
||||||
|
return (
|
||||||
|
`
|
||||||
|
{% extends 'partials/base_noGit.html.twig' %}
|
||||||
|
{% set tags = page.taxonomy.tag %}
|
||||||
|
{% if tags %}
|
||||||
|
{% set progress = page.collection({'items':{'@taxonomy':{'category': 'docs', 'tag': tags}},'order': {'by': 'default', 'dir': 'asc'}}) %}
|
||||||
|
{% else %}
|
||||||
|
{% set progress = page.collection({'items':{'@taxonomy':{'category': 'docs'}},'order': {'by': 'default', 'dir': 'asc'}}) %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block navigation %}
|
||||||
|
<div id="navigation">
|
||||||
|
{% if not progress.isFirst(page.path) %}
|
||||||
|
<a class="nav nav-prev" href="{{ progress.nextSibling(page.path).url }}"> <img src="{{ url('theme://images/left-arrow.png') }}"></a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not progress.isLast(page.path) %}
|
||||||
|
<a class="nav nav-next" href="{{ progress.prevSibling(page.path).url }}"><img src="{{ url('theme://images/right-arrow.png') }}"></a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div id="body-inner">
|
||||||
|
<h1>{{ page.title }}</h1>
|
||||||
|
${contentHtml}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleNamespace(title, content){
|
||||||
|
let destinationDirectory = path.join(map_dir_md["Namespace"], title);
|
||||||
|
createMD(title, destinationDirectory, true);
|
||||||
|
createTemplate(title, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClass(title, content){
|
||||||
|
let destinationDirectory = path.join(map_dir_md["Class"], title);
|
||||||
|
createMD(title, destinationDirectory, true)
|
||||||
|
|
||||||
|
let formatedHtml = content
|
||||||
|
.replace(html_reg_objectHeader,"")
|
||||||
|
.replace(html_reg_objectSpanNew,"");
|
||||||
|
createTemplate(title, formatedHtml);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleGlobal(title, content){
|
||||||
|
createMD("API_Globals", map_dir_md["Global"], false);
|
||||||
|
createTemplate("API_Globals", content);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove grav directory if exists to make sure old files aren't kept
|
||||||
|
if (fs.existsSync(dir_grav)){
|
||||||
|
console.log("dir_grav exists");
|
||||||
|
rimraf.sync(dir_grav);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create Grav directories in JSDOC output
|
||||||
|
dirArray.forEach(function(dir){
|
||||||
|
if (!fs.existsSync(dir)) {
|
||||||
|
fs.mkdirSync(dir);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Create baseMD files
|
||||||
|
baseMDDirectories.forEach( md => {
|
||||||
|
createMD(md, map_dir_md[md]);
|
||||||
|
})
|
||||||
|
|
||||||
|
// Read jsdoc output folder and process html files
|
||||||
|
let files = fs.readdirSync(dir_out);
|
||||||
|
files.forEach(function (file){
|
||||||
|
let curSource = path.join(dir_out, file);
|
||||||
|
if (path.extname(curSource) == ".html" && path.basename(curSource, '.html') !== "index") {
|
||||||
|
// Clean up the html source
|
||||||
|
let loadedHtml = prepareHtml(curSource);
|
||||||
|
|
||||||
|
// Extract the title, group name, and the main div
|
||||||
|
let splitTitle = loadedHtml("title").text().split(": ");
|
||||||
|
let groupName = splitTitle[1];
|
||||||
|
let htmlTitle = splitTitle.pop();
|
||||||
|
let mainDiv = loadedHtml("#main").html();
|
||||||
|
|
||||||
|
// Strip out undesired regex
|
||||||
|
let mainDivRegexed = mainDiv.replace(html_reg_static,"")
|
||||||
|
.replace(html_reg_title,"")
|
||||||
|
.replace(html_reg_htmlExt,"");
|
||||||
|
// Handle Unique Categories
|
||||||
|
switch(groupName){
|
||||||
|
case "Namespace":
|
||||||
|
handleNamespace(htmlTitle, mainDivRegexed);
|
||||||
|
break;
|
||||||
|
case "Class":
|
||||||
|
handleClass(htmlTitle, mainDivRegexed);
|
||||||
|
break;
|
||||||
|
case "Global":
|
||||||
|
handleGlobal(htmlTitle, mainDivRegexed);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(`Case not handled for ${groupName}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Create the base Templates after processing individual files
|
||||||
|
createTemplate("API-Reference","");
|
||||||
|
createTemplate("Globals","");
|
||||||
|
createTemplate("Namespaces","");
|
||||||
|
createTemplate("Objects","");
|
||||||
|
|
||||||
|
// Copy files to the Twig Directory
|
||||||
|
let templateFiles = fs.readdirSync(path.resolve(targetTemplateDirectory));
|
||||||
|
// Remove Existing API files
|
||||||
|
templateFiles.forEach(function(file){
|
||||||
|
let curSource = path.join(targetTemplateDirectory, file);
|
||||||
|
|
||||||
|
if(path.basename(file, '.html').indexOf("API") > -1){
|
||||||
|
fs.unlink(curSource);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
copyFolderRecursiveSync(dir_template, targetTemplateDirectory);
|
||||||
|
|
||||||
|
// Copy files to the Md Directory
|
||||||
|
let baseMdRefDir = path.join(targetMDDirectory,"06.api-reference");
|
||||||
|
// Remove existing MD directory
|
||||||
|
if (fs.existsSync(baseMdRefDir)){
|
||||||
|
rimraf.sync(baseMdRefDir);
|
||||||
|
}
|
||||||
|
copyFolderRecursiveSync(dir_md, targetMDDirectory);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "hifiJSDoc",
|
"name": "hifiJSDoc",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cheerio": "^1.0.0-rc.2",
|
"cheerio": "^1.0.0-rc.2",
|
||||||
|
"dedent-js": "^1.0.1",
|
||||||
"htmlclean": "^3.0.8",
|
"htmlclean": "^3.0.8",
|
||||||
"jsdoc": "^3.5.5",
|
"jsdoc": "^3.5.5",
|
||||||
"pretty": "^2.0.0",
|
"pretty": "^2.0.0",
|
||||||
|
|
|
@ -107,7 +107,7 @@ exports.handlers = {
|
||||||
// Append an Available In: table at the end of the namespace description.
|
// Append an Available In: table at the end of the namespace description.
|
||||||
if (rows.length > 0) {
|
if (rows.length > 0) {
|
||||||
var table = "<br><br><table><tr><th>Available in:</th><td>" + rows.join("</td><td>") + "</td></tr></table>";
|
var table = "<br><br><table><tr><th>Available in:</th><td>" + rows.join("</td><td>") + "</td></tr></table>";
|
||||||
e.doclet.description = e.doclet.description + table;
|
e.doclet.description = (e.doclet.description ? e.doclet.description : "") + table;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue