Skip to content

Docs: fix some types #30723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/jsm/helpers/ViewHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class ViewHelper extends Object3D {
* This method should be called when a click or pointer event
* has happened in the app.
*
* @param {Event} event - The event to process.
* @param {PointerEvent} event - The event to process.
* @return {boolean} Whether an intersection with the helper has been detected or not.
*/
this.handleClick = function ( event ) {
Expand Down
6 changes: 3 additions & 3 deletions examples/jsm/loaders/MD2Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ class MD2Loader extends Loader {
* to the `onLoad()` callback.
*
* @param {string} url - The path/URL of the file to be loaded. This can also be a data URI.
* @param {function({scene:Group})} onLoad - Executed when the loading process has been finished.
* @param {onProgressCallback} onProgress - Executed while the loading is in progress.
* @param {onErrorCallback} onError - Executed when errors occur.
* @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished.
* @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
* @param {onErrorCallback} [onError] - Executed when errors occur.
*/
load( url, onLoad, onProgress, onError ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/loaders/UltraHDRLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class UltraHDRLoader extends Loader {
* to the `onLoad()` callback.
*
* @param {string} url - The path/URL of the files to be loaded. This can also be a data URI.
* @param {function(DataTexture)} onLoad - Executed when the loading process has been finished.
* @param {function(DataTexture, Object)} onLoad - Executed when the loading process has been finished.
* @param {onProgressCallback} onProgress - Executed while the loading is in progress.
* @param {onErrorCallback} onError - Executed when errors occur.
* @return {DataTexture} The Ultra HDR texture.
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/utils/ShadowMapViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class ShadowMapViewer {
* The position of the viewer. When changing this property, make sure
* to call {@link ShadowMapViewer#update}.
*
* @type {{width:number,height:number}}
* @type {{x:number,y:number, set:function(number,number)}}
* @default true
*/
this.position = {
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/webxr/OculusHandPointerModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class OculusHandPointerModel extends Object3D {
/**
* Whether the model is attached or not.
*
* @type {?boolean}
* @type {boolean}
* @default false
*/
this.attached = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/webxr/XRHandMeshModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class XRHandMeshModel {
*
* @param {XRHandModel} handModel - The hand model.
* @param {Group} controller - The WebXR controller.
* @param {string} path - The model path.
* @param {?string} path - The model path.
* @param {XRHandedness} handedness - The handedness of the XR input source.
* @param {?Loader} [loader=null] - The loader. If not provided, an instance of `GLTFLoader` will be used to load models.
* @param {?Function} [onLoad=null] - A callback that is executed when a controller model has been loaded.
Expand Down
4 changes: 2 additions & 2 deletions src/loaders/FileLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class FileLoader extends Loader {
*
* @param {string} url - The path/URL of the file to be loaded. This can also be a data URI.
* @param {function(any)} onLoad - Executed when the loading process has been finished.
* @param {onProgressCallback} onProgress - Executed while the loading is in progress.
* @param {onErrorCallback} onError - Executed when errors occur.
* @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
* @param {onErrorCallback} [onError] - Executed when errors occur.
* @return {any|undefined} The cached resource if available.
*/
load( url, onLoad, onProgress, onError ) {
Expand Down
8 changes: 4 additions & 4 deletions src/loaders/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Loader {
* The [request header]{@link https://developer.mozilla.org/en-US/docs/Glossary/Request_header}
* used in HTTP request.
*
* @type {Object}
* @type {Object<string, any>}
*/
this.requestHeader = {};

Expand All @@ -69,16 +69,16 @@ class Loader {
*
* @param {string} url - The path/URL of the file to be loaded.
* @param {Function} onLoad - Executed when the loading process has been finished.
* @param {onProgressCallback} onProgress - Executed while the loading is in progress.
* @param {onErrorCallback} onError - Executed when errors occur.
* @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
* @param {onErrorCallback} [onError] - Executed when errors occur.
*/
load( /* url, onLoad, onProgress, onError */ ) {}

/**
* A async version of {@link Loader#load}.
*
* @param {string} url - The path/URL of the file to be loaded.
* @param {onProgressCallback} onProgress - Executed while the loading is in progress.
* @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
* @return {Promise} A Promise that resolves when the asset has been loaded.
*/
loadAsync( url, onProgress ) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/common/Color4.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Color4 extends Color {
* You can also pass a single THREE.Color, hex or
* string argument to this method.
*
* @param {number|string} r - The red value.
* @param {number|string|Color} r - The red value.
* @param {number} g - The green value.
* @param {number} b - The blue value.
* @param {number} [a=1] - The alpha value.
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/common/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,7 @@ class Renderer {
* if the renderer has been initialized.
*
* @param {Node|Array<Node>} computeNodes - The compute node(s).
* @return {?Promise} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
* @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
*/
compute( computeNodes ) {

Expand Down Expand Up @@ -2932,7 +2932,7 @@ class Renderer {
* @param {Object3D} scene - The scene or 3D object to precompile.
* @param {Camera} camera - The camera that is used to render the scene.
* @param {Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added.
* @return {Promise} A Promise that resolves when the compile has been finished.
* @return {function(Object3D, Camera, ?Scene): Promise|undefined} A Promise that resolves when the compile has been finished.
*/
get compile() {

Expand Down
Loading