diff --git a/src/js/libpannellum.js b/src/js/libpannellum.js index 5153cc1..32db362 100644 --- a/src/js/libpannellum.js +++ b/src/js/libpannellum.js @@ -53,6 +53,8 @@ function Renderer(container, image, imageType, video) { /** * Initialize renderer. + * @memberof Renderer + * @instance * @param {number} haov - Initial horizontal angle of view. * @param {number} vaov - Initial vertical angle of view. * @param {number} voffset - Initial vertical offset angle. @@ -348,6 +350,8 @@ function Renderer(container, image, imageType, video) { /** * Destroy renderer. + * @memberof Renderer + * @instance */ this.destroy = function() { if (container !== undefined) { @@ -362,6 +366,8 @@ function Renderer(container, image, imageType, video) { /** * Resize renderer (call after resizing container). + * @memberof Renderer + * @instance */ this.resize = function() { canvas.width = container.offsetWidth; @@ -376,6 +382,8 @@ function Renderer(container, image, imageType, video) { /** * Render new view of panorama. + * @memberof Renderer + * @instance * @param {number} pitch - Pitch to render at. * @param {number} yaw - Yaw to render at. * @param {number} hfov - Horizontal field of view to render with. @@ -484,7 +492,9 @@ function Renderer(container, image, imageType, video) { /** * Check if images are loading. - * @returns {number} Whether or not images are loading. + * @memberof Renderer + * @instance + * @returns {boolean} Whether or not images are loading. */ this.isLoading = function() { if (gl && imageType == 'multires') { @@ -499,6 +509,8 @@ function Renderer(container, image, imageType, video) { /** * Retrieve renderer's canvas. + * @memberof Renderer + * @instance * @returns {HTMLElement} Renderer's canvas. */ this.getCanvas = function() { diff --git a/utils/doc/generate.sh b/utils/doc/generate.sh new file mode 100755 index 0000000..39bc3ee --- /dev/null +++ b/utils/doc/generate.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Generates API documentation. +# Requires documentationjs . + +# Usage: +# +# Regular: ./generate.sh +# Include private methods: ./generate.sh private +# Release: ./generate.sh release + +version=`git rev-parse --short=10 @` +private="" + +if [ "$1" = "release" ]; then + version=`cat ../../VERSION` +elif [ "$1" = "private" ]; then + private="-p" +fi + +echo "Generating documentation..." +documentation ../../src/js/pannellum.js ../../src/js/libpannellum.js -o generated_docs -f html --name Pannellum --version $version -g $private