diff --git a/examples/jsm/animation/CCDIKSolver.js b/examples/jsm/animation/CCDIKSolver.js index d4c8ad3292dd25..2591d0c6aac87f 100644 --- a/examples/jsm/animation/CCDIKSolver.js +++ b/examples/jsm/animation/CCDIKSolver.js @@ -330,6 +330,8 @@ class CCDIKHelper extends Object3D { /** * Updates IK bones visualization. + * + * @param {Boolean} force */ updateMatrixWorld( force ) { diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index a1f456a7816d26..4819cf39bf9009 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -2255,6 +2255,9 @@ const ALPHA_MODES = { /** * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#default-material + * + * @param {Object<String, Material>} cache + * @return {Material} */ function createDefaultMaterial( cache ) { @@ -2753,6 +2756,9 @@ class GLTFParser { * Textures) can be reused directly and are not marked here. * * Example: CesiumMilkTruck sample model reuses "Wheel" meshes. + * + * @param {Object} cache + * @param {Object3D} index */ _addNodeRef( cache, index ) { @@ -2768,7 +2774,14 @@ class GLTFParser { } - /** Returns a reference to a shared resource, cloning it if necessary. */ + /** + * Returns a reference to a shared resource, cloning it if necessary. + * + * @param {Object} cache + * @param {Number} index + * @param {Object} object + * @return {Object} + */ _getNodeRef( cache, index, object ) { if ( cache.refs[ index ] <= 1 ) return object; @@ -3653,7 +3666,12 @@ class GLTFParser { } - /** When Object3D instances are targeted by animation, they need unique names. */ + /** + * When Object3D instances are targeted by animation, they need unique names. + * + * @param {String} originalName + * @return {String} + */ createUniqueName( originalName ) { const sanitizedName = PropertyBinding.sanitizeNodeName( originalName || '' ); diff --git a/examples/jsm/loaders/KTX2Loader.js b/examples/jsm/loaders/KTX2Loader.js index b11ae7424b4f78..547bea42ff32f4 100644 --- a/examples/jsm/loaders/KTX2Loader.js +++ b/examples/jsm/loaders/KTX2Loader.js @@ -790,7 +790,12 @@ KTX2Loader.BasisWorker = function () { } - /** Concatenates N byte arrays. */ + /** + * Concatenates N byte arrays. + * + * @param {Uint8Array[]} arrays + * @return {Uint8Array} + */ function concat( arrays ) { if ( arrays.length === 1 ) return arrays[ 0 ]; diff --git a/examples/jsm/math/OBB.js b/examples/jsm/math/OBB.js index 29ae1286dc39ba..dd3a4ab59bcc40 100644 --- a/examples/jsm/math/OBB.js +++ b/examples/jsm/math/OBB.js @@ -84,6 +84,10 @@ class OBB { /** * Reference: Closest Point on OBB to Point in Real-Time Collision Detection * by Christer Ericson (chapter 5.1.4) + * + * @param {Vector3} point + * @param {Vector3} result + * @returns {Vector3} */ clampPoint( point, result ) { @@ -146,6 +150,9 @@ class OBB { * Reference: OBB-OBB Intersection in Real-Time Collision Detection * by Christer Ericson (chapter 4.4.1) * + * @param {OBB} obb + * @param {Number} [epsilon=Number.EPSILON] - A small value to prevent arithmetic errors + * @returns {Boolean} */ intersectsOBB( obb, epsilon = Number.EPSILON ) { @@ -285,6 +292,9 @@ class OBB { /** * Reference: Testing Box Against Plane in Real-Time Collision Detection * by Christer Ericson (chapter 5.2.3) + * + * @param {Plane} plane + * @returns {Boolean} */ intersectsPlane( plane ) { @@ -309,6 +319,10 @@ class OBB { /** * Performs a ray/OBB intersection test and stores the intersection point * to the given 3D vector. If no intersection is detected, *null* is returned. + * + * @param {Ray} ray + * @param {Vector3} result + * @return {Vector3?} */ intersectRay( ray, result ) { @@ -347,6 +361,9 @@ class OBB { /** * Performs a ray/OBB intersection test. Returns either true or false if * there is a intersection or not. + * + * @param {Ray} ray + * @returns {Boolean} */ intersectsRay( ray ) { diff --git a/examples/jsm/webxr/XRControllerModelFactory.js b/examples/jsm/webxr/XRControllerModelFactory.js index d56b1e569da613..dfb1d4c194f5b8 100644 --- a/examples/jsm/webxr/XRControllerModelFactory.js +++ b/examples/jsm/webxr/XRControllerModelFactory.js @@ -54,6 +54,8 @@ class XRControllerModel extends Object3D { /** * Polls data from the XRInputSource and updates the model's components to match * the real world data + * + * @param {Boolean} force */ updateMatrixWorld( force ) { @@ -109,6 +111,9 @@ class XRControllerModel extends Object3D { * Walks the model's tree to find the nodes needed to animate the components and * saves them to the motionController components for use in the frame loop. When * touchpads are found, attaches a touch dot to them. + * + * @param {MotionController} motionController + * @param {Object3D} scene */ function findNodes( motionController, scene ) {