Merge pull request #12963 from MiladNazeri/docs/DocsToJSDocsUpdate

Docs/docs to js docs update
This commit is contained in:
MiladNazeri 2018-04-25 12:26:19 -07:00 committed by GitHub
commit 0f87e53902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1415 additions and 55 deletions

View file

@ -15,6 +15,10 @@
#include <DependencyManager.h>
#include "Bookmarks.h"
/**jsdoc
* This API helps manage adding and deleting Avatar bookmarks
*/
class AvatarBookmarks: public Bookmarks, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
@ -23,6 +27,15 @@ public:
AvatarBookmarks();
void setupMenus(Menu* menubar, MenuWrapper* menu) override;
/**jsdoc
* Add the current Avatar to your Avatar Bookmarks
* @function AvatarBookmarks.addBookMark
*/
/**jsdoc
* @function AvatarBookmarks.deleteBookMark
*/
public slots:
void addBookmark();

View file

@ -1,4 +1,4 @@
//
//
// Bookmarks.h
// interface/src
//
@ -48,6 +48,10 @@ protected:
bool _isMenuSorted;
protected slots:
/**jsdoc
* Delete
* @function AvatarBookmarks.deleteBookmark
*/
void deleteBookmark();
private:

View file

@ -9,6 +9,11 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
/**jsdoc
* The LOD class manages your Level of Detail functions within interface
* @namespace LODManager
*/
#ifndef hifi_LODManager_h
#define hifi_LODManager_h
@ -39,28 +44,125 @@ class LODManager : public QObject, public Dependency {
SINGLETON_DEPENDENCY
public:
/**jsdoc
* @function LODManager.setAutomaticLODAdjust
* @param {boolean} value
*/
Q_INVOKABLE void setAutomaticLODAdjust(bool value) { _automaticLODAdjust = value; }
/**jsdoc
* @function LODManager.getAutomaticLODAdjust
* @returns {boolean}
*/
Q_INVOKABLE bool getAutomaticLODAdjust() const { return _automaticLODAdjust; }
/**jsdoc
* @function LODManager.setDesktopLODDecreaseFPS
* @param {float} value
*/
Q_INVOKABLE void setDesktopLODDecreaseFPS(float value);
/**jsdoc
* @function LODManager.getDesktopLODDecreaseFPS
* @returns {number}
*/
Q_INVOKABLE float getDesktopLODDecreaseFPS() const;
/**jsdoc
* @function LODManager.getDesktopLODIncreaseFPS
* @returns {number}
*/
Q_INVOKABLE float getDesktopLODIncreaseFPS() const;
/**jsdoc
* @function LODManager.setHMDLODDecreaseFPS
* @param {number} value
*/
Q_INVOKABLE void setHMDLODDecreaseFPS(float value);
/**jsdoc
* @function LODManager.getHMDLODDecreaseFPS
* @returns {number}
*/
Q_INVOKABLE float getHMDLODDecreaseFPS() const;
/**jsdoc
* @function LODManager.getHMDLODIncreaseFPS
* @returns {number}
*/
Q_INVOKABLE float getHMDLODIncreaseFPS() const;
// User Tweakable LOD Items
/**jsdoc
* @function LODManager.getLODFeedbackText
* @returns {string}
*/
Q_INVOKABLE QString getLODFeedbackText();
/**jsdoc
* @function LODManager.setOctreeSizeScale
* @param {number} sizeScale
*/
Q_INVOKABLE void setOctreeSizeScale(float sizeScale);
/**jsdoc
* @function LODManager.getOctreeSizeScale
* @returns {number}
*/
Q_INVOKABLE float getOctreeSizeScale() const { return _octreeSizeScale; }
/**jsdoc
* @function LODManager.setBoundaryLevelAdjust
* @param {number} boundaryLevelAdjust
*/
Q_INVOKABLE void setBoundaryLevelAdjust(int boundaryLevelAdjust);
/**jsdoc
* @function LODManager.getBoundaryLevelAdjust
* @returns {number}
*/
Q_INVOKABLE int getBoundaryLevelAdjust() const { return _boundaryLevelAdjust; }
/**jsdoc
* @function LODManager.getLODDecreaseFPS
* @returns {number}
*/
Q_INVOKABLE float getLODDecreaseFPS() const;
/**jsdoc
* @function LODManager.getLODIncreaseFPS
* @returns {number}
*/
Q_INVOKABLE float getLODIncreaseFPS() const;
/**jsdoc
* @namespace LODManager
* @property presentTime {number}
* @property engineRunTime {number}
* @property gpuTime {number}
* @property avgRenderTime {number}
* @property fps {number}
* @property lodLevel {number}
* @property lodDecreaseFPS {number}
* @property lodIncreaseFPS {number}
*/
Q_PROPERTY(float presentTime READ getPresentTime)
Q_PROPERTY(float engineRunTime READ getEngineRunTime)
Q_PROPERTY(float gpuTime READ getGPUTime)
@ -88,7 +190,19 @@ public:
float getLODLevel() const;
signals:
/**jsdoc
* @function LODManager.LODIncreased
* @returns {Signal}
*/
void LODIncreased();
/**jsdoc
* @function LODManager.LODDecreased
* @returns {Signal}
*/
void LODDecreased();
private:

View file

@ -25,6 +25,17 @@ class AudioScope : public QObject, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
/**jsdoc
* The AudioScope API helps control the Audio Scope features in Interface
* @namespace AudioScope
* @property {int} scopeInput
* @property {int} scopeOutputLeft
* @property {int} scopeOutputRight
* @property {int} triggerInput
* @property {int} triggerOutputLeft
* @property {int} triggerOutputRight
*/
Q_PROPERTY(QVector<int> scopeInput READ getScopeInput)
Q_PROPERTY(QVector<int> scopeOutputLeft READ getScopeOutputLeft)
Q_PROPERTY(QVector<int> scopeOutputRight READ getScopeOutputRight)
@ -40,42 +51,192 @@ public:
void reallocateScope(int frames);
public slots:
/**jsdoc
* @function AudioScope.toggle
*/
void toggle() { setVisible(!_isEnabled); }
/**jsdoc
* @function AudioScope.setVisible
* @param {boolean} visible
*/
void setVisible(bool visible);
/**jsdoc
* @function AudioScope.getVisible
* @param {boolean} visible
* @returns {boolean}
*/
bool getVisible() const { return _isEnabled; }
/**jsdoc
* @function AudioScope.togglePause
*/
void togglePause() { setPause(!_isPaused); }
/**jsdoc
* @function AudioScope.setPause
* @param {boolean}
*/
void setPause(bool paused) { _isPaused = paused; emit pauseChanged(); }
/**jsdoc
* @function AudioScope.getPause
* @returns {boolean}
*/
bool getPause() { return _isPaused; }
/**jsdoc
* @function AudioScope.toggleTrigger
*/
void toggleTrigger() { _autoTrigger = !_autoTrigger; }
/**jsdoc
* @function AudioScope.getAutoTrigger
* @returns {boolean}
*/
bool getAutoTrigger() { return _autoTrigger; }
/**jsdoc
* @function AudioScope.setAutoTrigger
* @param {boolean} autoTrigger
*/
void setAutoTrigger(bool autoTrigger) { _isTriggered = false; _autoTrigger = autoTrigger; }
/**jsdoc
* @function AudioScope.setTriggerValues
* @param {number} x
* @param {number} y
*/
void setTriggerValues(int x, int y) { _triggerValues.x = x; _triggerValues.y = y; }
/**jsdoc
* @function AudioScope.setTriggered
* @param {boolean} triggered
*/
void setTriggered(bool triggered) { _isTriggered = triggered; }
/**jsdoc
* @function AudioScope.getTriggered
* @returns {boolean}
*/
bool getTriggered() { return _isTriggered; }
/**jsdoc
* @function AudioScope.getFramesPerSecond
* @returns {number}
*/
float getFramesPerSecond();
/**jsdoc
* @function AudioScope.getFramesPerScope
* @returns {number}
*/
int getFramesPerScope() { return _framesPerScope; }
/**jsdoc
* @function AudioScope.selectAudioScopeFiveFrames
*/
void selectAudioScopeFiveFrames();
/**jsdoc
* @function AudioScope.selectAudioScopeTwentyFrames
*/
void selectAudioScopeTwentyFrames();
/**jsdoc
* @function AudioScope.selectAudioScopeFiftyFrames
*/
void selectAudioScopeFiftyFrames();
/**jsdoc
* @function AudioScope.getScopeInput
* @returns {number}
*/
QVector<int> getScopeInput() { return _scopeInputData; };
/**jsdoc
* @function AudioScope.getScopeOutputLeft
* @returns {number}
*/
QVector<int> getScopeOutputLeft() { return _scopeOutputLeftData; };
/**jsdoc
* @function AudioScope.getScopeOutputRight
* @returns {number}
*/
QVector<int> getScopeOutputRight() { return _scopeOutputRightData; };
/**jsdoc
* @function AudioScope.getTriggerInput
* @returns {number}
*/
QVector<int> getTriggerInput() { return _triggerInputData; };
/**jsdoc
* @function AudioScope.getTriggerOutputLeft
* @returns {number}
*/
QVector<int> getTriggerOutputLeft() { return _triggerOutputLeftData; };
/**jsdoc
* @function AudioScope.getTriggerOutputRight
* @returns {number}
*/
QVector<int> getTriggerOutputRight() { return _triggerOutputRightData; };
/**jsdoc
* @function AudioScope.setLocalEcho
* @parm {boolean} serverEcho
*/
void setLocalEcho(bool serverEcho);
/**jsdoc
* @function AudioScope.setServerEcho
* @parm {boolean} serverEcho
*/
void setServerEcho(bool serverEcho);
signals:
/**jsdoc
* @function AudioScope.pauseChanged
* @returns {Signal}
*/
void pauseChanged();
/**jsdoc
* @function AudioScope.triggered
* @returns {Signal}
*/
void triggered();
protected:

View file

@ -27,12 +27,86 @@
#include "AvatarMotionState.h"
#include "MyAvatar.h"
/**jsdoc
* The AvatarManager API has properties and methods which manage Avatars within the same domain.
* @namespace AvatarManager
*/
class AvatarManager : public AvatarHashMap {
Q_OBJECT
SINGLETON_DEPENDENCY
public:
// JSDOCS Copied over from AvatarHashMap (see AvatarHashMap.h for reason)
/**jsdoc
* @function AvatarManager.getAvatarIdentifiers
*/
/**jsdoc
* @function AvatarManager.getAvatarsInRange
* @param {Vec3} position
* @param {float} rangeMeters
* @returns {string[]}
*/
/**jsdoc
* @function AvatarManager.getAvatar
* @param {string} avatarID
* @returns {ScriptAvatarData}
*/
/**jsdoc
* @function AvatarManager.avatarAddedEvent
* @param {string} sessionUUID
* @returns {Signal}
*/
/**jsdoc
* @function AvatarManager.avatarRemovedEvent
* @param {string} sessionUUID
* @returns {Signal}
*/
/**jsdoc
* @function AvatarManager.avatarSessionChangedEvent
* @param {string} sessionUUID
* @param {string} oldUUID
* @returns {Signal}
*/
/**jsdoc
* @function AvatarManager.isAvatarInRange
* @param {string} position
* @param {string} range
* @returns {boolean}
*/
/**jsdoc
* @function AvatarManager.sessionUUIDChanged
* @param {string} sessionUUID
* @param {string} oldUUID
*/
/**jsdoc
* @function AvatarManager.processAvatarDataPacket
* @param {} message
* @param {} sendingNode
*/
/**jsdoc
* @function AvatarManager.processAvatarIdentityPacket
* @param {} message
* @param {} sendingNode
*/
/**jsdoc
* @function AvatarManager.processKillAvatar
* @param {} message
* @param {} sendingNode
*/
/// Registers the script types associated with the avatar manager.
static void registerMetaTypes(QScriptEngine* engine);
@ -43,6 +117,12 @@ public:
std::shared_ptr<MyAvatar> getMyAvatar() { return _myAvatar; }
glm::vec3 getMyAvatarPosition() const { return _myAvatar->getWorldPosition(); }
/**jsdoc
* @function AvatarManager.getAvatar
* @param {string} avatarID
* @returns {}
*/
// Null/Default-constructed QUuids will return MyAvatar
Q_INVOKABLE virtual ScriptAvatarData* getAvatar(QUuid avatarID) override { return new ScriptAvatar(getAvatarBySessionID(avatarID)); }
@ -66,24 +146,82 @@ public:
void handleChangedMotionStates(const VectorOfMotionStates& motionStates);
void handleCollisionEvents(const CollisionEvents& collisionEvents);
/**jsdoc
* @function AvatarManager.getAvatarDataRate
* @param {string} sessionID
* @param {string} [rateName=""]
* @returns {number}
*/
Q_INVOKABLE float getAvatarDataRate(const QUuid& sessionID, const QString& rateName = QString("")) const;
/**jsdoc
* @function AvatarManager.getAvatarUpdateRate
* @param {string} sessionID
* @param {string} [rateName=""]
* @returns {number}
*/
Q_INVOKABLE float getAvatarUpdateRate(const QUuid& sessionID, const QString& rateName = QString("")) const;
/**jsdoc
* @function AvatarManager.getAvatarSimulationRate
* @param {string} sessionID
* @param {string} [rateName=""]
* @returns {number}
*/
Q_INVOKABLE float getAvatarSimulationRate(const QUuid& sessionID, const QString& rateName = QString("")) const;
/**jsdoc
* @function AvatarManager.findRayIntersection
* @param {PickRay} ray
* @param {} avatarIdsToInclude
* @param {} avatarIdsToDiscard
* @returns {RayToAvatarIntersectionResult}
*/
Q_INVOKABLE RayToAvatarIntersectionResult findRayIntersection(const PickRay& ray,
const QScriptValue& avatarIdsToInclude = QScriptValue(),
const QScriptValue& avatarIdsToDiscard = QScriptValue());
/**jsdoc
* @function AvatarManager.findRayIntersectionVector
* @param {PickRay} ray
* @param {} avatarsToInclude
* @param {} avatarIdsToDiscard
* @returns {RayToAvatarIntersectionResult}
*/
Q_INVOKABLE RayToAvatarIntersectionResult findRayIntersectionVector(const PickRay& ray,
const QVector<EntityItemID>& avatarsToInclude,
const QVector<EntityItemID>& avatarsToDiscard);
// TODO: remove this HACK once we settle on optimal default sort coefficients
/**jsdoc
* @function AvatarManager.getAvatarSortCoefficient
* @param {string} name
* @returns {number}
*/
Q_INVOKABLE float getAvatarSortCoefficient(const QString& name);
/**jsdoc
* @function AvatarManager.setAvatarSortCoefficient
* @param {string} name
* @param {string} value
*/
Q_INVOKABLE void setAvatarSortCoefficient(const QString& name, const QScriptValue& value);
float getMyAvatarSendRate() const { return _myAvatarSendRate.rate(); }
public slots:
/**jsdoc
* @function AvatarManager.updateAvatarRenderStatus
* @param {boolean} shouldRenderAvatars
*/
void updateAvatarRenderStatus(bool shouldRenderAvatars);
private:

View file

@ -26,6 +26,11 @@
#include <trackers/FaceTracker.h>
/**jsdoc
* The FaceTracker API helps manage facial tracking hardware.
* @namespace FaceTracker
*/
class DdeFaceTracker : public FaceTracker, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
@ -57,7 +62,18 @@ public:
void setEyeClosingThreshold(float eyeClosingThreshold);
public slots:
/**jsdoc
* @function FaceTracker.setEnabled
* @param {boolean} enabled
*/
void setEnabled(bool enabled) override;
/**jsdoc
* @function FaceTracker.calibrate
*/
void calibrate();
private slots:

View file

@ -34,7 +34,17 @@ void DownloadInfoResultFromScriptValue(const QScriptValue& object, DownloadInfoR
class AccountServicesScriptingInterface : public QObject {
Q_OBJECT
/**jsdoc
* The AccountServices API contains helper functions related to user connectivity
*
* @namespace AccountServices
* @property {string} username
* @property {boolean} loggedIn
* @property {string} findableBy
* @property {string} metaverseServerURL
*/
Q_PROPERTY(QString username READ getUsername NOTIFY myUsernameChanged)
Q_PROPERTY(bool loggedIn READ loggedIn NOTIFY loggedInChanged)
Q_PROPERTY(QString findableBy READ getFindableBy WRITE setFindableBy NOTIFY findableByChanged)
@ -48,11 +58,38 @@ public:
QUrl getMetaverseServerURL() { return DependencyManager::get<AccountManager>()->getMetaverseServerURL(); }
public slots:
/**jsdoc
* @function AccountServices.getDownloadInfo
* @returns {DownloadInfoResult}
*/
DownloadInfoResult getDownloadInfo();
/**jsdoc
* @function AccountServices.updateDownloadInfo
*/
void updateDownloadInfo();
/**jsdoc
* @function AccountServices.isLoggedIn
* @returns {boolean}
*/
bool isLoggedIn();
/**jsdoc
* @function AccountServices.checkAndSignalForAccessToken
* @returns {boolean}
*/
bool checkAndSignalForAccessToken();
/**jsdoc
* @function AccountServices.logOut
*/
void logOut();
private slots:
@ -66,11 +103,52 @@ private slots:
void onUsernameChanged(const QString& username);
signals:
/**jsdoc
* @function AccountServices.connected
* @returns {Signal}
*/
void connected();
/**jsdoc
* @function AccountServices.disconnected
* @params {string} reason
* @returns {Signal}
*/
void disconnected(const QString& reason);
/**jsdoc
* @function AccountServices.myUsernameChanged
* @params {string} username
* @returns {Signal}
*/
void myUsernameChanged(const QString& username);
/**jsdoc
* @function AccountServices.downloadInfoChanged
* @params {} info
* @returns {Signal}
*/
void downloadInfoChanged(DownloadInfoResult info);
/**jsdoc
* @function AccountServices.findableByChanged
* @params {string} discoverabilityMode
* @returns {Signal}
*/
void findableByChanged(const QString& discoverabilityMode);
/**jsdoc
* @function AccountServices.loggedInChanged
* @params {boolean} loggedIn
* @returns {Signal}
*/
void loggedInChanged(bool loggedIn);
private:

View file

@ -25,6 +25,18 @@ class Audio : public AudioScriptingInterface, protected ReadWriteLockable {
Q_OBJECT
SINGLETON_DEPENDENCY
/**jsdoc
* The Audio API features tools to help control audio contexts and settings.
*
* @namespace Audio
* @property {boolean} muted
* @property {boolean} noiseReduction
* @property {boolean} inputVolume
* @property {boolean} inputLevel
* @property {string} context
* @property {} devices
*/
Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
Q_PROPERTY(bool noiseReduction READ noiseReductionEnabled WRITE enableNoiseReduction NOTIFY noiseReductionChanged)
Q_PROPERTY(float inputVolume READ getInputVolume WRITE setInputVolume NOTIFY inputVolumeChanged)
@ -49,24 +61,111 @@ public:
void showMicMeter(bool show);
/**jsdoc
* @function Audio.setInputDevice
* @param {} device
* @param {boolean} isHMD
*/
Q_INVOKABLE void setInputDevice(const QAudioDeviceInfo& device, bool isHMD);
/**jsdoc
* @function Audio.setOutputDevice
* @param {} device
* @param {boolean} isHMD
*/
Q_INVOKABLE void setOutputDevice(const QAudioDeviceInfo& device, bool isHMD);
/**jsdoc
* @function Audio.setReverb
* @param {boolean} enable
*/
Q_INVOKABLE void setReverb(bool enable);
/**jsdoc
* @function Audio.setReverbOptions
* @param {} options
*/
Q_INVOKABLE void setReverbOptions(const AudioEffectOptions* options);
/**jsdoc
* @function Audio.setReverbOptions
* @param {string} filename
*/
Q_INVOKABLE bool startRecording(const QString& filename);
/**jsdoc
* @function Audio.stopRecording
*/
Q_INVOKABLE void stopRecording();
/**jsdoc
* @function Audio.getRecording
*/
Q_INVOKABLE bool getRecording();
signals:
/**jsdoc
* @function Audio.nop
* @returns {Signal}
*/
void nop();
/**jsdoc
* @function Audio.nop
* @param {bool} isMuted
* @returns {Signal}
*/
void mutedChanged(bool isMuted);
/**jsdoc
* @function Audio.noiseReductionChanged
* @param {bool} isEnabled
* @returns {Signal}
*/
void noiseReductionChanged(bool isEnabled);
/**jsdoc
* @function Audio.inputVolumeChanged
* @param {float} volume
* @returns {Signal}
*/
void inputVolumeChanged(float volume);
/**jsdoc
* @function Audio.inputLevelChanged
* @param {float} level
* @returns {Signal}
*/
void inputLevelChanged(float level);
/**jsdoc
* @function Audio.contextChanged
* @param {string} context
* @returns {Signal}
*/
void contextChanged(const QString& context);
public slots:
/**jsdoc
* @function Audio.onContextChanged
* @returns {Signal}
*/
void onContextChanged();
private slots:

View file

@ -15,6 +15,11 @@
#include <QObject>
#include <DependencyManager.h>
/**jsdoc
* The GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity.
* @namespace GooglePoly
*/
class GooglePolyScriptingInterface : public QObject, public Dependency {
Q_OBJECT
@ -22,15 +27,84 @@ public:
GooglePolyScriptingInterface();
public slots:
/**jsdoc
* @function GooglePoly.setAPIKey
* @param {string} key
*/
void setAPIKey(const QString& key);
/**jsdoc
* @function GooglePoly.getAssetList
* @param {string} keyword
* @param {string} category
* @param {string} format
* @returns {string}
*/
QString getAssetList(const QString& keyword, const QString& category, const QString& format);
/**jsdoc
* @function GooglePoly.getFBX
* @param {string} keyword
* @param {string} category
* @returns {string}
*/
QString getFBX(const QString& keyword, const QString& category);
/**jsdoc
* @function GooglePoly.getOBJ
* @param {string} keyword
* @param {string} category
* @returns {string}
*/
QString getOBJ(const QString& keyword, const QString& category);
QString getBlocks(const QString& keyword, const QString& categoryy);
/**jsdoc
* @function GooglePoly.getBlocks
* @param {string} keyword
* @param {string} category
* @returns {string}
*/
QString getBlocks(const QString& keyword, const QString& category);
/**jsdoc
* @function GooglePoly.getGLTF
* @param {string} keyword
* @param {string} category
* @returns {string}
*/
QString getGLTF(const QString& keyword, const QString& category);
/**jsdoc
* @function GooglePoly.getGLTF2
* @param {string} keyword
* @param {string} category
* @returns {string}
*/
QString getGLTF2(const QString& keyword, const QString& category);
/**jsdoc
* @function GooglePoly.getTilt
* @param {string} keyword
* @param {string} category
* @returns {string}
*/
QString getTilt(const QString& keyword, const QString& category);
/**jsdoc
* @function GooglePoly.getModelInfo
* @param {string} input
* @returns {string}
*/
QString getModelInfo(const QString& input);
private:

View file

@ -23,6 +23,15 @@ class AvatarInputs : public QObject {
Q_OBJECT
HIFI_QML_DECL
/**jsdoc
* API to help manage your Avatar's input
* @namespace AvatarInputs
* @param {boolean} cameraEnabled
* @param {boolean} cameraMuted
* @param {boolean} isHMD
* @param {boolean} showAudioTools
*/
AI_PROPERTY(bool, cameraEnabled, false)
AI_PROPERTY(bool, cameraMuted, false)
AI_PROPERTY(bool, isHMD, false)
@ -31,22 +40,70 @@ class AvatarInputs : public QObject {
public:
static AvatarInputs* getInstance();
/**jsdoc
* @function AvatarInputs.loudnessToAudioLevel
* @param {number} loudness
* @returns {number}
*/
Q_INVOKABLE float loudnessToAudioLevel(float loudness);
AvatarInputs(QObject* parent = nullptr);
void update();
bool showAudioTools() const { return _showAudioTools; }
public slots:
/**jsdoc
* @function AvatarInputs.setShowAudioTools
* @param {boolean} showAudioTools
*/
void setShowAudioTools(bool showAudioTools);
signals:
/**jsdoc
* @function AvatarInputs.cameraEnabledChanged
* @returns {Signal}
*/
void cameraEnabledChanged();
/**jsdoc
* @function AvatarInputs.cameraMutedChanged
* @returns {Signal}
*/
void cameraMutedChanged();
/**jsdoc
* @function AvatarInputs.isHMDChanged
* @returns {Signal}
*/
void isHMDChanged();
/**jsdoc
* @function AvatarInputs.showAudioToolsChanged
* @param {boolean} show
* @returns {Signal}
*/
void showAudioToolsChanged(bool show);
protected:
/**jsdoc
* @function AvatarInputs.resetSensors
*/
Q_INVOKABLE void resetSensors();
/**jsdoc
* @function AvatarInputs.toggleCameraMute
*/
Q_INVOKABLE void toggleCameraMute();
private:

View file

@ -20,6 +20,11 @@
#include <FBXReader.h>
#include <ResourceCache.h>
/**jsdoc
* API to manage Animation Cache resources
* @namespace AnimationCache
*/
class Animation;
typedef QSharedPointer<Animation> AnimationPointer;
@ -29,19 +34,80 @@ class AnimationCache : public ResourceCache, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
public:
// Copied over from ResourceCache (see ResourceCache.h for reason)
/**jsdoc
* @namespace AnimationCache
* @augments ResourceCache
* @property numTotal {number} total number of total resources
* @property numCached {number} total number of cached resource
* @property sizeTotal {number} size in bytes of all resources
* @property sizeCached {number} size in bytes of all cached resources
*/
public:
/**jsdoc
* Returns the total number of resources
* @function AnimationCache.getNumTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of all resources
* @function AnimationCache.getSizeTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total number of cached resources
* @function AnimationCache.getNumCachedResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of cached resources
* @function AnimationCache.getSizeCachedResources
* @returns {number}
*/
/**jsdoc
* Returns list of all resource urls
* @function AnimationCache.getResourceList
* @returns {string[]}
*/
/**jsdoc
* Asynchronously loads a resource from the spedified URL and returns it.
* @param url {string} url of resource to load
* @param fallback {string} fallback URL if load of the desired url fails
* @function AnimationCache.getResource
* @returns {Resource}
*/
/**jsdoc
* Prefetches a resource.
* @param url {string} url of resource to load
* @function AnimationCache.prefetch
* @returns {Resource}
*/
/**jsdoc
* @param {number} deltaSize
* @function AnimationCache.updateTotalSize
* @returns {Resource}
*/
/**jsdoc
* @function AnimationCache.dirty
* @returns {Signal}
*/
/**jsdoc
* Returns animation resource for particular animation
* @function AnimationCache.getAnimation
* @param url {string} url to load
* @return {Resource} animation
* @returns {Resource} animation
*/
Q_INVOKABLE AnimationPointer getAnimation(const QString& url) { return getAnimation(QUrl(url)); }
Q_INVOKABLE AnimationPointer getAnimation(const QUrl& url);

View file

@ -38,6 +38,49 @@ class MixedProcessedAudioStream;
class AudioStreamStatsInterface : public QObject {
Q_OBJECT
/**jsdoc
* Audio stats from the Audio Mixer
* @namespace AudioStats.mixerStream
* @param {number} lossRate
* @param {number} lossCount
* @param {number} lossRateWindow
* @param {number} lossCountWindow
* @param {number} framesDesired
* @param {number} framesAvailable
* @param {number} framesAvailableAvg
* @param {number} unplayedMsMax
* @param {number} starveCount
* @param {number} lastStarveDurationCount
* @param {number} dropCount
* @param {number} overflowCount
* @param {number} timegapMsMax
* @param {number} timegapMsAvg
* @param {number} timegapMsMaxWindow
* @param {number} timegapMsAvgWindow
*/
/**jsdoc
* Audio stats from the Client Mixer
* @namespace AudioStats.clientMixer
* @param {number} lossRate
* @param {number} lossCount
* @param {number} lossRateWindow
* @param {number} lossCountWindow
* @param {number} framesDesired
* @param {number} framesAvailable
* @param {number} framesAvailableAvg
* @param {number} unplayedMsMax
* @param {number} starveCount
* @param {number} lastStarveDurationCount
* @param {number} dropCount
* @param {number} overflowCount
* @param {number} timegapMsMax
* @param {number} timegapMsAvg
* @param {number} timegapMsMaxWindow
* @param {number} timegapMsAvgWindow
*/
AUDIO_PROPERTY(float, lossRate)
AUDIO_PROPERTY(float, lossCount)
AUDIO_PROPERTY(float, lossRateWindow)
@ -68,6 +111,20 @@ private:
class AudioStatsInterface : public QObject {
Q_OBJECT
/**jsdoc
* Audio stats from the client
* @namespace AudioStats
* @param {number} pingMs
* @param {number} inputReadMsMax
* @param {number} inputUnplayedMsMax
* @param {number} outputUnplayedMsMax
* @param {number} sentTimegapMsMax
* @param {number} sentTimegapMsAvg
* @param {number} sentTimegapMsMaxWindow
* @param {number} sentTimegapMsAvgWindow
*/
AUDIO_PROPERTY(float, pingMs);
AUDIO_PROPERTY(float, inputReadMsMax);
@ -97,8 +154,26 @@ public:
void updateInjectorStreams(const QHash<QUuid, AudioStreamStats>& stats);
signals:
/**jsdoc
* @function AudioStats.mixerStreamChanged
* @returns {Signal}
*/
void mixerStreamChanged();
/**jsdoc
* @function AudioStats.clientStreamChanged
* @returns {Signal}
*/
void clientStreamChanged();
/**jsdoc
* @function AudioStats.injectorStreamsChanged
* @returns {Signal}
*/
void injectorStreamsChanged();
private:

View file

@ -16,12 +16,97 @@
#include "Sound.h"
/**jsdoc
* API to manage Sound Cache resources
* @namespace SoundCache
*/
/// Scriptable interface for sound loading.
class SoundCache : public ResourceCache, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
public:
// Copied over from ResourceCache (see ResourceCache.h for reason)
/**jsdoc
* @namespace SoundCache
* @property numTotal {number} total number of total resources
* @property numCached {number} total number of cached resource
* @property sizeTotal {number} size in bytes of all resources
* @property sizeCached {number} size in bytes of all cached resources
*/
/**jsdoc
* Returns the total number of resources
* @function SoundCache.getNumTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of all resources
* @function SoundCache.getSizeTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total number of cached resources
* @function SoundCache.getNumCachedResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of cached resources
* @function SoundCache.getSizeCachedResources
* @returns {number}
*/
/**jsdoc
* Returns list of all resource urls
* @function SoundCache.getResourceList
* @returns {string[]}
*/
/**jsdoc
* Returns animation resource for particular animation
* @function SoundCache.getAnimation
* @param url {string} url to load
* @returns {Resource} animation
*/
/**jsdoc
* Asynchronously loads a resource from the spedified URL and returns it.
* @param url {string} url of resource to load
* @param fallback {string} fallback URL if load of the desired url fails
* @function SoundCache.getResource
* @returns {Resource}
*/
/**jsdoc
* Prefetches a resource.
* @param url {string} url of resource to load
* @function SoundCache.prefetch
* @returns {Resource}
*/
/**jsdoc
* @param {number} deltaSize
* @function SoundCache.updateTotalSize
* @returns {Resource}
*/
/**jsdoc
* @function SoundCache.dirty
* @returns {Signal}
*/
/**jsdoc
* @function SoundCache.getSound
* @param {string} url
* @returns {}
*/
Q_INVOKABLE SharedSoundPointer getSound(const QUrl& url);
protected:
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,

View file

@ -9,6 +9,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_AvatarHashMap_h
#define hifi_AvatarHashMap_h
@ -29,6 +30,15 @@
#include "AvatarData.h"
/**jsdoc
* The AvatarHashMap API deals with functionality related to Avatar information and connectivity
* @namespace AvatarHashMap
*/
// JSDoc 3.5.5 doesn't augment @property definitions.
// These functions are being copied into Avatar classes which inherit the AvatarHashMap
class AvatarHashMap : public QObject, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
@ -39,9 +49,28 @@ public:
int size() { return _avatarHash.size(); }
// Currently, your own avatar will be included as the null avatar id.
/**jsdoc
* @function AvatarHashMap.getAvatarIdentifiers
*/
Q_INVOKABLE QVector<QUuid> getAvatarIdentifiers();
/**jsdoc
* @function AvatarHashMap.getAvatarsInRange
* @param {Vec3} position
* @param {float} rangeMeters
* @returns {string[]}
*/
Q_INVOKABLE QVector<QUuid> getAvatarsInRange(const glm::vec3& position, float rangeMeters) const;
/**jsdoc
* @function AvatarHashMap.getAvatar
* @param {string} avatarID
* @returns {ScriptAvatarData}
*/
// Null/Default-constructed QUuids will return MyAvatar
Q_INVOKABLE virtual ScriptAvatarData* getAvatar(QUuid avatarID) { return new ScriptAvatarData(getAvatarBySessionID(avatarID)); }
@ -49,18 +78,75 @@ public:
int numberOfAvatarsInRange(const glm::vec3& position, float rangeMeters);
signals:
/**jsdoc
* @function AvatarHashMap.avatarAddedEvent
* @param {string} sessionUUID
* @returns {Signal}
*/
void avatarAddedEvent(const QUuid& sessionUUID);
/**jsdoc
* @function AvatarHashMap.avatarRemovedEvent
* @param {string} sessionUUID
* @returns {Signal}
*/
void avatarRemovedEvent(const QUuid& sessionUUID);
/**jsdoc
* @function AvatarHashMap.avatarSessionChangedEvent
* @param {string} sessionUUID
* @param {string} oldUUID
* @returns {Signal}
*/
void avatarSessionChangedEvent(const QUuid& sessionUUID,const QUuid& oldUUID);
public slots:
/**jsdoc
* @function AvatarHashMap.isAvatarInRange
* @param {string} position
* @param {string} range
* @returns {boolean}
*/
bool isAvatarInRange(const glm::vec3 & position, const float range);
protected slots:
/**jsdoc
* @function AvatarHashMap.sessionUUIDChanged
* @param {string} sessionUUID
* @param {string} oldUUID
*/
void sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& oldUUID);
/**jsdoc
* @function AvatarHashMap.processAvatarDataPacket
* @param {} message
* @param {} sendingNode
*/
void processAvatarDataPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
/**jsdoc
* @function AvatarHashMap.processAvatarIdentityPacket
* @param {} message
* @param {} sendingNode
*/
void processAvatarIdentityPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
/**jsdoc
* @function AvatarHashMap.processKillAvatar
* @param {} message
* @param {} sendingNode
*/
void processKillAvatar(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
protected:

View file

@ -21,6 +21,11 @@
#include "FBXReader.h"
#include "TextureCache.h"
/**jsdoc
* API to manage Model Cache resources
* @namespace ModelCache
*/
// Alias instead of derive to avoid copying
class NetworkTexture;
@ -136,7 +141,73 @@ class ModelCache : public ResourceCache, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
public:
/**jsdoc
* @namespace ModelCache
* @property numTotal {number} total number of total resources
* @property numCached {number} total number of cached resource
* @property sizeTotal {number} size in bytes of all resources
* @property sizeCached {number} size in bytes of all cached resources
*/
/**jsdoc
* Returns the total number of resources
* @function ModelCache.getNumTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of all resources
* @function ModelCache.getSizeTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total number of cached resources
* @function ModelCache.getNumCachedResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of cached resources
* @function ModelCache.getSizeCachedResources
* @returns {number}
*/
/**jsdoc
* Returns list of all resource urls
* @function ModelCache.getResourceList
* @returns {string[]}
*/
/**jsdoc
* Asynchronously loads a resource from the spedified URL and returns it.
* @param url {string} url of resource to load
* @param fallback {string} fallback URL if load of the desired url fails
* @function ModelCache.getResource
* @returns {Resource}
*/
/**jsdoc
* Prefetches a resource.
* @param url {string} url of resource to load
* @function ModelCache.prefetch
* @returns {Resource}
*/
/**jsdoc
* @param {number} deltaSize
* @function ModelCache.updateTotalSize
* @returns {Resource}
*/
/**jsdoc
* @function ModelCache.dirty
* @returns {Signal}
*/
GeometryResource::Pointer getGeometryResource(const QUrl& url,
const QVariantHash& mapping = QVariantHash(),
const QUrl& textureBaseUrl = QUrl());

View file

@ -137,12 +137,90 @@ using NetworkTexturePointer = QSharedPointer<NetworkTexture>;
Q_DECLARE_METATYPE(QWeakPointer<NetworkTexture>)
/**jsdoc
* API to manage Texture Cache resources
* @namespace TextureCache
*/
/// Stores cached textures, including render-to-texture targets.
class TextureCache : public ResourceCache, public Dependency {
Q_OBJECT
SINGLETON_DEPENDENCY
public:
// Copied over from ResourceCache (see ResourceCache.h for reason)
/**jsdoc
* @namespace TextureCache
* @property numTotal {number} total number of total resources
* @property numCached {number} total number of cached resource
* @property sizeTotal {number} size in bytes of all resources
* @property sizeCached {number} size in bytes of all cached resources
*/
/**jsdoc
* Returns the total number of resources
* @function TextureCache.getNumTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of all resources
* @function TextureCache.getSizeTotalResources
* @returns {number}
*/
/**jsdoc
* Returns the total number of cached resources
* @function TextureCache.getNumCachedResources
* @returns {number}
*/
/**jsdoc
* Returns the total size in bytes of cached resources
* @function TextureCache.getSizeCachedResources
* @returns {number}
*/
/**jsdoc
* Returns list of all resource urls
* @function TextureCache.getResourceList
* @returns {string[]}
*/
/**jsdoc
* Returns animation resource for particular animation
* @function TextureCache.getAnimation
* @param url {string} url to load
* @returns {Resource} animation
*/
/**jsdoc
* Asynchronously loads a resource from the spedified URL and returns it.
* @param url {string} url of resource to load
* @param fallback {string} fallback URL if load of the desired url fails
* @function TextureCache.getResource
* @returns {Resource}
*/
/**jsdoc
* Prefetches a resource.
* @param url {string} url of resource to load
* @function TextureCache.prefetch
* @returns {Resource}
*/
/**jsdoc
* @param {number} deltaSize
* @function TextureCache.updateTotalSize
* @returns {Resource}
*/
/**jsdoc
* @function TextureCache.dirty
* @returns {Signal}
*/
/// Returns the ID of the permutation/normal texture used for Perlin noise shader programs. This texture
/// has two lines: the first, a set of random numbers in [0, 255] to be used as permutation offsets, and
/// the second, a set of random unit vectors to be used as noise gradients.
@ -180,6 +258,10 @@ public:
static const int DEFAULT_SPECTATOR_CAM_HEIGHT { 1024 };
signals:
/**jsdoc
* @function TextureCache.spectatorCameraFramebufferReset
* @returns {Signal}
*/
void spectatorCameraFramebufferReset();
protected:

View file

@ -1,4 +1,4 @@
//
//
// ResourceCache.h
// libraries/shared/src
//
@ -85,9 +85,7 @@ private:
/// Wrapper to expose resources to JS/QML
class ScriptableResource : public QObject {
Q_OBJECT
Q_PROPERTY(QUrl url READ getURL)
Q_PROPERTY(int state READ getState NOTIFY stateChanged)
/**jsdoc
* @constructor Resource
@ -95,6 +93,12 @@ class ScriptableResource : public QObject {
* @property state {Resource.State} current loading state
*/
Q_OBJECT
Q_PROPERTY(QUrl url READ getURL)
Q_PROPERTY(int state READ getState NOTIFY stateChanged)
public:
/**jsdoc
@ -181,11 +185,8 @@ Q_DECLARE_METATYPE(ScriptableResource*);
/// Base class for resource caches.
class ResourceCache : public QObject {
Q_OBJECT
Q_PROPERTY(size_t numTotal READ getNumTotalResources NOTIFY dirty)
Q_PROPERTY(size_t numCached READ getNumCachedResources NOTIFY dirty)
Q_PROPERTY(size_t sizeTotal READ getSizeTotalResources NOTIFY dirty)
Q_PROPERTY(size_t sizeCached READ getSizeCachedResources NOTIFY dirty)
// JSDoc 3.5.5 doesn't augment @property definitions.
// These functions are being copied into the different exposed cache classes
/**jsdoc
* @namespace ResourceCache
* @property numTotal {number} total number of total resources
@ -193,6 +194,10 @@ class ResourceCache : public QObject {
* @property sizeTotal {number} size in bytes of all resources
* @property sizeCached {number} size in bytes of all cached resources
*/
Q_PROPERTY(size_t numTotal READ getNumTotalResources NOTIFY dirty)
Q_PROPERTY(size_t numCached READ getNumCachedResources NOTIFY dirty)
Q_PROPERTY(size_t sizeTotal READ getSizeTotalResources NOTIFY dirty)
Q_PROPERTY(size_t sizeCached READ getSizeCachedResources NOTIFY dirty)
public:
/**jsdoc

View file

@ -25,6 +25,7 @@
#include <QtNetwork/QNetworkDiskCache>
/**jsdoc
* The Assets API allows you to communicate with the Asset Browser
* @namespace Assets
*/
class AssetScriptingInterface : public BaseAssetScriptingInterface, QScriptable {
@ -53,8 +54,7 @@ public:
/**jsdoc
* Download data from the connected domain's asset server.
* @function Assets.downloadData
* @static
* @param url {string} url of asset to download, must be atp scheme url.
* @param url {string} URL of asset to download, must be ATP scheme URL.
* @param callback {Assets~downloadDataCallback}
*/
@ -69,7 +69,6 @@ public:
/**jsdoc
* Sets up a path to hash mapping within the connected domain's asset server
* @function Assets.setMapping
* @static
* @param path {string}
* @param hash {string}
* @param callback {Assets~setMappingCallback}
@ -80,12 +79,12 @@ public:
* @callback Assets~setMappingCallback
* @param {string} error
*/
Q_INVOKABLE void setMapping(QString path, QString hash, QScriptValue callback);
/**jsdoc
* Look up a path to hash mapping within the connected domain's asset server
* @function Assets.getMapping
* @static
* @param path {string}
* @param callback {Assets~getMappingCallback}
*/
@ -93,11 +92,26 @@ public:
/**jsdoc
* Called when getMapping is complete.
* @callback Assets~getMappingCallback
* @param error {string} error description if the path could not be resolved; otherwise a null value.
* @param assetID {string} hash value if found, else an empty string
* @param error {string} error description if the path could not be resolved; otherwise a null value.
*/
/**jsdoc
* Called when getMapping is complete.
* @callback Assets~getMappingCallback
* @param assetID {string} hash value if found, else an empty string
* @param error {string} error description if the path could not be resolved; otherwise a null value.
*/
Q_INVOKABLE void getMapping(QString path, QScriptValue callback);
/**jsdoc
* @function Assets.setBakingEnabled
* @param path {string}
* @param enabled {boolean}
* @param callback {}
*/
Q_INVOKABLE void setBakingEnabled(QString path, bool enabled, QScriptValue callback);
#if (PR_BUILD || DEV_BUILD)
@ -110,31 +124,35 @@ public:
* @param {URL|Assets.GetOptions} options An atp: style URL, hash, or relative mapped path; or an {@link Assets.GetOptions} object with request parameters
* @param {Assets~getAssetCallback} scope[callback] A scope callback function to receive (error, results) values
*/
/**jsdoc
* A set of properties that can be passed to {@link Assets.getAsset}.
* @typedef {Object} Assets.GetOptions
* @property {URL} [url] an "atp:" style URL, hash, or relative mapped path to fetch
* @property {string} [responseType=text] the desired reponse type (text | arraybuffer | json)
* @property {boolean} [decompress=false] whether to attempt gunzip decompression on the fetched data
* See: {@link Assets.putAsset} and its .compress=true option
*/
/**jsdoc
* A set of properties that can be passed to {@link Assets.getAsset}.
* @typedef {Object} Assets.GetOptions
* @property {URL} [url] an "atp:" style URL, hash, or relative mapped path to fetch
* @property {string} [responseType=text] the desired reponse type (text | arraybuffer | json)
* @property {boolean} [decompress=false] whether to attempt gunzip decompression on the fetched data
* See: {@link Assets.putAsset} and its .compress=true option
*/
/**jsdoc
* Called when Assets.getAsset is complete.
* @callback Assets~getAssetCallback
* @param {string} error - contains error message or null value if no error occured fetching the asset
* @param {Asset~getAssetResult} result - result object containing, on success containing asset metadata and contents
*/
/**jsdoc
* Result value returned by {@link Assets.getAsset}.
* @typedef {Object} Assets~getAssetResult
* @property {url} [url] the resolved "atp:" style URL for the fetched asset
* @property {string} [hash] the resolved hash for the fetched asset
* @property {string|ArrayBuffer|Object} [response] response data (possibly converted per .responseType value)
* @property {string} [responseType] response type (text | arraybuffer | json)
* @property {string} [contentType] detected asset mime-type (autodetected)
* @property {number} [byteLength] response data size in bytes
* @property {number} [decompressed] flag indicating whether data was decompressed
*/
/**jsdoc
* Result value returned by {@link Assets.getAsset}.
* @typedef {Object} Assets~getAssetResult
* @property {url} [url] the resolved "atp:" style URL for the fetched asset
* @property {string} [hash] the resolved hash for the fetched asset
* @property {string|ArrayBuffer|Object} [response] response data (possibly converted per .responseType value)
* @property {string} [responseType] response type (text | arraybuffer | json)
* @property {string} [contentType] detected asset mime-type (autodetected)
* @property {number} [byteLength] response data size in bytes
* @property {number} [decompressed] flag indicating whether data was decompressed
*/
Q_INVOKABLE void getAsset(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
@ -143,46 +161,131 @@ public:
* @param {Assets.PutOptions} options A PutOptions object with upload parameters
* @param {Assets~putAssetCallback} scope[callback] A scoped callback function invoked with (error, results)
*/
/**jsdoc
* A set of properties that can be passed to {@link Assets.putAsset}.
* @typedef {Object} Assets.PutOptions
* @property {ArrayBuffer|string} [data] byte buffer or string value representing the new asset's content
* @property {string} [path=null] ATP path mapping to automatically create (upon successful upload to hash)
* @property {boolean} [compress=false] whether to gzip compress data before uploading
*/
/**jsdoc
* A set of properties that can be passed to {@link Assets.putAsset}.
* @typedef {Object} Assets.PutOptions
* @property {ArrayBuffer|string} [data] byte buffer or string value representing the new asset's content
* @property {string} [path=null] ATP path mapping to automatically create (upon successful upload to hash)
* @property {boolean} [compress=false] whether to gzip compress data before uploading
*/
/**jsdoc
* Called when Assets.putAsset is complete.
* @callback Assets~puttAssetCallback
* @param {string} error - contains error message (or null value if no error occured while uploading/mapping the new asset)
* @param {Asset~putAssetResult} result - result object containing error or result status of asset upload
*/
/**jsdoc
* Result value returned by {@link Assets.putAsset}.
* @typedef {Object} Assets~putAssetResult
* @property {url} [url] the resolved "atp:" style URL for the uploaded asset (based on .path if specified, otherwise on the resulting ATP hash)
* @property {string} [path] the uploaded asset's resulting ATP path (or undefined if no path mapping was assigned)
* @property {string} [hash] the uploaded asset's resulting ATP hash
* @property {boolean} [compressed] flag indicating whether the data was compressed before upload
* @property {number} [byteLength] flag indicating final byte size of the data uploaded to the ATP server
*/
/**jsdoc
* Result value returned by {@link Assets.putAsset}.
* @typedef {Object} Assets~putAssetResult
* @property {url} [url] the resolved "atp:" style URL for the uploaded asset (based on .path if specified, otherwise on the resulting ATP hash)
* @property {string} [path] the uploaded asset's resulting ATP path (or undefined if no path mapping was assigned)
* @property {string} [hash] the uploaded asset's resulting ATP hash
* @property {boolean} [compressed] flag indicating whether the data was compressed before upload
* @property {number} [byteLength] flag indicating final byte size of the data uploaded to the ATP server
*/
Q_INVOKABLE void putAsset(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.deleteAsset
* @property {} options
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void deleteAsset(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.resolveAsset
* @property {} options
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void resolveAsset(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.decompressData
* @property {} options
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void decompressData(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.compressData
* @property {} options
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void compressData(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.initializeCache
* @returns {boolean}
*/
Q_INVOKABLE bool initializeCache() { return Parent::initializeCache(); }
/**jsdoc
* @function Assets.canWriteCacheValue
* @property {string} url
* @returns {boolean}
*/
Q_INVOKABLE bool canWriteCacheValue(const QUrl& url);
/**jsdoc
* @function Assets.getCacheStatus
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void getCacheStatus(QScriptValue scope, QScriptValue callback = QScriptValue()) {
jsPromiseReady(Parent::getCacheStatus(), scope, callback);
}
/**jsdoc
* @function Assets.queryCacheMeta
* @property {} options
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void queryCacheMeta(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.loadFromCache
* @property {} options
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void loadFromCache(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.saveToCache
* @property {} options
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void saveToCache(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue());
/**jsdoc
* @function Assets.saveToCache
* @property {} url
* @property {} data
* @property {} metadata
* @property {} scope
* @property {} [callback = ""]
*/
Q_INVOKABLE void saveToCache(const QUrl& url, const QByteArray& data, const QVariantMap& metadata,
QScriptValue scope, QScriptValue callback = QScriptValue());
protected:

View file

@ -18,6 +18,7 @@
#include <SettingHandle.h>
/// Base class for face trackers (DDE, BinaryVR).
class FaceTracker : public QObject {
Q_OBJECT
@ -58,11 +59,34 @@ public:
QVector<float>& coefficients);
signals:
/**jsdoc
* @function FaceTracker.muteToggled
* @returns {Signal}
*/
void muteToggled();
public slots:
/**jsdoc
* @function FaceTracker.setEnabled
* @param {boolean} enabled
*/
virtual void setEnabled(bool enabled) = 0;
/**jsdoc
* @function FaceTracker.toggleMute
*/
void toggleMute();
/**jsdoc
* @function FaceTracker.getMuted
* @returns {boolean}
*/
bool getMuted() { return _isMuted; }
protected:

View file

@ -17,11 +17,20 @@ exports.handlers = {
// directories to scan for jsdoc comments
var dirList = [
'../../interface/src',
'../../interface/src/assets',
'../../interface/src/audio',
'../../interface/src/avatar',
'../../interface/src/commerce',
'../../interface/src/devices',
'../../interface/src/java',
'../../interface/src/networking',
'../../interface/src/ui/',
'../../interface/src/scripting',
'../../interface/src/ui/overlays',
'../../interface/src/raypick',
'../../libraries/animation/src',
'../../libraries/audio-client/src',
'../../libraries/audio/src',
'../../libraries/avatars/src',
'../../libraries/avatars-renderer/src/avatars-renderer',
'../../libraries/controllers/src/controllers/',