Skip to content

Commit b42ad49

Browse files
author
Samuel Rigaud
committed
fix-types
1 parent 1e6ed3f commit b42ad49

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

examples/jsm/loaders/ColladaLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class ColladaLoader extends Loader {
112112
* an array of animation clips and kinematics.
113113
*
114114
* @param {string} text - The raw Collada data as a string.
115-
* @param {string} path - The asset path.
115+
* @param {string} [path] - The asset path.
116116
* @return {?{scene:Group,animations:Array<AnimationClip>,kinematics:Object}} An object representing the parsed asset.
117117
*/
118118
parse( text, path ) {

examples/jsm/loaders/DDSLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class DDSLoader extends CompressedTextureLoader {
4444
*/
4545
parse( buffer, loadMipmaps ) {
4646

47-
const dds = { mipmaps: [], width: 0, height: 0, format: null, mipmapCount: 1 };
47+
const dds = { mipmaps: [], width: 0, height: 0, format: null, mipmapCount: 1, isCubemap: false };
4848

4949
// Adapted from @toji's DDS utils
5050
// https://github.com/toji/webgl-texture-utils/blob/master/texture-util/dds.js

examples/jsm/misc/ProgressiveLightMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ class ProgressiveLightMap {
280280
*
281281
* @private
282282
* @param {number} res - The square resolution of this object's lightMap.
283-
* @param {?WebGLRenderTarget} [lightMap] - The lightmap to initialize the plane with.
283+
* @param {WebGLRenderTarget} lightMap - The lightmap to initialize the plane with.
284284
*/
285-
_initializeBlurPlane( res, lightMap = null ) {
285+
_initializeBlurPlane( res, lightMap ) {
286286

287287
const blurMaterial = new MeshBasicMaterial();
288288
blurMaterial.uniforms = { previousShadowMap: { value: null },

examples/jsm/renderers/CSS2DRenderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CSS2DObject extends Object3D {
1616
/**
1717
* Constructs a new CSS2D object.
1818
*
19-
* @param {DOMElement} [element] - The DOM element.
19+
* @param {HTMLElement} [element] - The DOM element.
2020
*/
2121
constructor( element = document.createElement( 'div' ) ) {
2222

@@ -34,7 +34,7 @@ class CSS2DObject extends Object3D {
3434
/**
3535
* The DOM element which defines the appearance of this 3D object.
3636
*
37-
* @type {DOMElement}
37+
* @type {HTMLElement}
3838
* @readonly
3939
* @default true
4040
*/
@@ -132,7 +132,7 @@ class CSS2DRenderer {
132132
/**
133133
* The DOM where the renderer appends its child-elements.
134134
*
135-
* @type {DOMElement}
135+
* @type {HTMLElement}
136136
*/
137137
this.domElement = domElement;
138138

@@ -310,7 +310,7 @@ class CSS2DRenderer {
310310
* Constructor parameters of `CSS2DRenderer`.
311311
*
312312
* @typedef {Object} CSS2DRenderer~Parameters
313-
* @property {DOMElement} [element] - A DOM element where the renderer appends its child-elements.
313+
* @property {HTMLElement} [element] - A DOM element where the renderer appends its child-elements.
314314
* If not passed in here, a new div element will be created.
315315
**/
316316

examples/jsm/renderers/CSS3DRenderer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CSS3DObject extends Object3D {
2222
/**
2323
* Constructs a new CSS3D object.
2424
*
25-
* @param {DOMElement} [element] - The DOM element.
25+
* @param {HTMLElement} [element] - The DOM element.
2626
*/
2727
constructor( element = document.createElement( 'div' ) ) {
2828

@@ -40,7 +40,7 @@ class CSS3DObject extends Object3D {
4040
/**
4141
* The DOM element which defines the appearance of this 3D object.
4242
*
43-
* @type {DOMElement}
43+
* @type {HTMLElement}
4444
* @readonly
4545
* @default true
4646
*/
@@ -94,7 +94,7 @@ class CSS3DSprite extends CSS3DObject {
9494
/**
9595
* Constructs a new CSS3D sprite object.
9696
*
97-
* @param {DOMElement} [element] - The DOM element.
97+
* @param {Element} [element] - The DOM element.
9898
*/
9999
constructor( element ) {
100100

@@ -179,7 +179,7 @@ class CSS3DRenderer {
179179
/**
180180
* The DOM where the renderer appends its child-elements.
181181
*
182-
* @type {DOMElement}
182+
* @type {Element}
183183
*/
184184
this.domElement = domElement;
185185

@@ -446,7 +446,7 @@ class CSS3DRenderer {
446446
* Constructor parameters of `CSS3DRenderer`.
447447
*
448448
* @typedef {Object} CSS3DRenderer~Parameters
449-
* @property {DOMElement} [element] - A DOM element where the renderer appends its child-elements.
449+
* @property {Element} [element] - A DOM element where the renderer appends its child-elements.
450450
* If not passed in here, a new div element will be created.
451451
**/
452452

examples/jsm/renderers/SVGRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class SVGRenderer {
120120
/**
121121
* The DOM where the renderer appends its child-elements.
122122
*
123-
* @type {DOMElement}
123+
* @type {SVGSVGElement}
124124
*/
125125
this.domElement = _svg;
126126

src/renderers/WebGLRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class WebGLRenderer {
131131
* document.body.appendChild( renderer.domElement );
132132
* ```
133133
*
134-
* @type {DOMElement}
134+
* @type {Element}
135135
*/
136136
this.domElement = canvas;
137137

@@ -3414,7 +3414,7 @@ class WebGLRenderer {
34143414
* WebGLRenderer options.
34153415
*
34163416
* @typedef {Object} WebGLRenderer~Options
3417-
* @property {DOMElement} [canvas=null] - A canvas element where the renderer draws its output. If not passed in here, a new canvas element will be created by the renderer.
3417+
* @property {HTMLCanvasElement} [canvas=null] - A canvas element where the renderer draws its output. If not passed in here, a new canvas element will be created by the renderer.
34183418
* @property {WebGL2RenderingContext} [context=null] - Can be used to attach an existing rendering context to this renderer.
34193419
* @property {('highp'|'mediump'|'lowp')} [precision='highp'] - The default shader precision. Uses `highp` if supported by the device.
34203420
* @property {boolean} [alpha=false] - Controls the default clear alpha value. When set to`true`, the value is `0`. Otherwise it's `1`.

0 commit comments

Comments
 (0)