From e283ced81018110f200dd07139f9132026815d7a Mon Sep 17 00:00:00 2001 From: alan-wu Date: Mon, 26 Feb 2018 13:35:40 +1300 Subject: [PATCH] Add thee missing class keyword on the documentation for most of the classes. #4 --- js/zinc/geometry.js | 5 +++-- js/zinc/glyph.js | 1 + js/zinc/glyphset.js | 1 + js/zinc/renderer.js | 2 +- js/zinc/scene.js | 15 +++++++++++++++ js/zinc/zinc.js | 6 ++++++ 6 files changed, 27 insertions(+), 3 deletions(-) diff --git a/js/zinc/geometry.js b/js/zinc/geometry.js index 694bf6f..dfdbc7a 100644 --- a/js/zinc/geometry.js +++ b/js/zinc/geometry.js @@ -3,6 +3,7 @@ * This is created when a valid json file containging geometry is read into a {@link Zinc.Scene} * object. * + * @class * @author Alan Wu * @return {Zinc.Geometry} */ @@ -143,7 +144,7 @@ Zinc.Geometry = function () { /** * Set the colour of the geometry. * - * @param {THREE.COLOR} colour - Colour to be set for this geometry. + * @param {THREE.Color} colour - Colour to be set for this geometry. */ this.setColour = function(colour) { _this.morph.material.color = colour @@ -153,7 +154,7 @@ Zinc.Geometry = function () { /** * Set the material of the geometry. * - * @param {THREE.MATERIAL} material - Material to be set for this geometry. + * @param {THREE.Material} material - Material to be set for this geometry. */ this.setMaterial = function(material) { _this.morph.material = material; diff --git a/js/zinc/glyph.js b/js/zinc/glyph.js index ba2992f..d12b673 100644 --- a/js/zinc/glyph.js +++ b/js/zinc/glyph.js @@ -6,6 +6,7 @@ * @param {THREE.material} materialIn - Material of the glyph. * @param {Number} idIn - Ud of the glyph. * + * @class * @author Alan Wu * @return {Zinc.Glyph} */ diff --git a/js/zinc/glyphset.js b/js/zinc/glyphset.js index 9452a4b..014f6df 100644 --- a/js/zinc/glyphset.js +++ b/js/zinc/glyphset.js @@ -4,6 +4,7 @@ * and group name. Please note that all glyphs in the glyphset share the same geometry * however they may have different transformations. * + * @class * @author Alan Wu * @return {Zinc.Glyphset} */ diff --git a/js/zinc/renderer.js b/js/zinc/renderer.js index 34d21db..f244af1 100644 --- a/js/zinc/renderer.js +++ b/js/zinc/renderer.js @@ -6,7 +6,7 @@ * Zinc.Renderer also allows additional scenes to be displayed. * * @param {Object} containerIn - Container to create the renderer on. - * + * @class * @author Alan Wu * @return {Zinc.Renderer} */ diff --git a/js/zinc/scene.js b/js/zinc/scene.js index 22a866f..c9e56ce 100644 --- a/js/zinc/scene.js +++ b/js/zinc/scene.js @@ -4,6 +4,7 @@ * It is the main object used for controlling what is and what is not displayed * on the renderer. * + * @class * @param {Object} containerIn - Container to create the renderer on. * @author Alan Wu * @return {Zinc.Scene} @@ -406,6 +407,8 @@ Zinc.Scene = function ( containerIn, rendererIn) { /** * Load a legacy model(s) format with the provided URLs and parameters. This only loads the geometry * without any of the metadata. Therefore, extra parameters should be provided. + * + * @deprecated */ this.loadModelsURL = function(urls, colours, opacities, timeEnabled, morphColour, finishCallback) { @@ -542,6 +545,18 @@ Zinc.Scene = function ( containerIn, rendererIn) { /** * Add a user provided {THREE.Geometry} into the scene as zinc geometry. + * + * @param {Three.Geometry} geometry - The threejs geometry to be added as {@link Zinc.Geometry}. + * @param {Number} modelId - The numeric ID to be given to the newly created geometry. + * @param {THREE.Color} color - Colour to be assigned to this geometry, overrided if materialIn is provided. + * @param {Number} opacity - Opacity to be set for this geometry, overrided if materialIn is provided. + * @param {Boolean} localTimeEnabled - Set this to true if morph geometry is present, overrided if materialIn is provided. + * @param {Boolean} localMorphColour - Set this to true if morph colour is present, overrided if materialIn is provided. + * @param {Boolean} external - Set this to true if morph geometry is present, overrided if materialIn is provided. + * @param {Function} finishCallback - Callback once the geometry has been added succssfully. + * @param {THREE.Material} materialIn - Material to be set for this geometry if it is present. + * + * @returns {Zinc.Geometry} */ this.addZincGeometry = function(geometry, modelId, colour, opacity, localTimeEnabled, localMorphColour, external, finishCallback, materialIn) { if (external == undefined) diff --git a/js/zinc/zinc.js b/js/zinc/zinc.js index 4ad39f2..f674da1 100644 --- a/js/zinc/zinc.js +++ b/js/zinc/zinc.js @@ -1,3 +1,9 @@ +/** + * Provides a global namespace for the Zinc javascript library and some default parameters for it. + * + * @namespace + * @author Alan Wu + */ var Zinc = { REVISION: '27' };