From c20f5a279c032c83180be55328c2e5930143b552 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 31 Oct 2025 17:47:54 +0900 Subject: [PATCH 1/6] Docs: Fixed properties layout. --- utils/docs/template/static/styles/page.css | 8 +-- utils/docs/template/tmpl/details.tmpl | 1 - utils/docs/template/tmpl/params.tmpl | 2 +- utils/docs/template/tmpl/properties.tmpl | 70 ++++++++-------------- 4 files changed, 29 insertions(+), 52 deletions(-) diff --git a/utils/docs/template/static/styles/page.css b/utils/docs/template/static/styles/page.css index e8f476a42c7e1f..35adf29d01dc69 100644 --- a/utils/docs/template/static/styles/page.css +++ b/utils/docs/template/static/styles/page.css @@ -218,13 +218,9 @@ body table code { width: auto; } -body table.params td.name { - min-width: 150px; - white-space: nowrap; -} - body table.props td.name, -body table.props td.type { +body table.params td.name { + width: 150px; white-space: nowrap; } diff --git a/utils/docs/template/tmpl/details.tmpl b/utils/docs/template/tmpl/details.tmpl index 53fd54608d6393..f81279c847599e 100644 --- a/utils/docs/template/tmpl/details.tmpl +++ b/utils/docs/template/tmpl/details.tmpl @@ -13,7 +13,6 @@ var properties = data.properties; if (properties && properties.length && properties.forEach && !data.hideconstructor) { ?> -
Properties:
diff --git a/utils/docs/template/tmpl/params.tmpl b/utils/docs/template/tmpl/params.tmpl index 8b6f446945269b..8836e46edf4d88 100644 --- a/utils/docs/template/tmpl/params.tmpl +++ b/utils/docs/template/tmpl/params.tmpl @@ -55,7 +55,7 @@ ?> - + - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - + From f26dbbe2db4dee8d55749b3990069b602ee74c44 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 31 Oct 2025 18:19:06 +0900 Subject: [PATCH 2/6] Design tweaks. --- utils/docs/template/static/styles/page.css | 1 - utils/docs/template/tmpl/params.tmpl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/docs/template/static/styles/page.css b/utils/docs/template/static/styles/page.css index 35adf29d01dc69..4721480e83279f 100644 --- a/utils/docs/template/static/styles/page.css +++ b/utils/docs/template/static/styles/page.css @@ -213,7 +213,6 @@ body table td:first-child { } body table code { - padding: 0px; margin: 0px; width: auto; } diff --git a/utils/docs/template/tmpl/params.tmpl b/utils/docs/template/tmpl/params.tmpl index 8836e46edf4d88..90f32936ba19be 100644 --- a/utils/docs/template/tmpl/params.tmpl +++ b/utils/docs/template/tmpl/params.tmpl @@ -55,7 +55,7 @@ ?> - + - + + diff --git a/utils/docs/template/tmpl/properties.tmpl b/utils/docs/template/tmpl/properties.tmpl index dfa63499377e6e..83a3d9441122a6 100644 --- a/utils/docs/template/tmpl/properties.tmpl +++ b/utils/docs/template/tmpl/properties.tmpl @@ -51,6 +51,11 @@ @@ -59,23 +64,8 @@ -


Default is .

- - - - -


- - - -  (optional) - - - -  (nullable) - +

Default is .

-

From 98bbae90f4cf866d92b9196cd53730afd1b1d5ae Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 31 Oct 2025 19:21:44 +0900 Subject: [PATCH 6/6] Clean up, --- utils/docs/template/tmpl/members.tmpl | 2 +- utils/docs/template/tmpl/params.tmpl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/docs/template/tmpl/members.tmpl b/utils/docs/template/tmpl/members.tmpl index 1d1558c3aca9db..431c9b313d8960 100644 --- a/utils/docs/template/tmpl/members.tmpl +++ b/utils/docs/template/tmpl/members.tmpl @@ -9,7 +9,7 @@
-

+

Default is .

diff --git a/utils/docs/template/tmpl/params.tmpl b/utils/docs/template/tmpl/params.tmpl index d70dafc6caf13b..f89fd9fae3b167 100644 --- a/utils/docs/template/tmpl/params.tmpl +++ b/utils/docs/template/tmpl/params.tmpl @@ -55,12 +55,12 @@ ?>
- +
NameTypeAttributesDefaultDescription
+ + - - - - + - - - - <optional>
+ + +


Default is .

+ - - <nullable>
+ +


+ + + +  (optional) + + + +  (nullable) + + +

-
- - + +
Properties
+ -
-
Properties
-
Date: Fri, 31 Oct 2025 18:19:52 +0900 Subject: [PATCH 3/6] Fixed #WebGLRenderer.~Options link. --- utils/docs/template/publish.js | 2 +- utils/docs/template/static/scripts/page.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/docs/template/publish.js b/utils/docs/template/publish.js index 1129d52efed681..0f976cfeebb384 100644 --- a/utils/docs/template/publish.js +++ b/utils/docs/template/publish.js @@ -113,7 +113,7 @@ function addParamAttributes( params ) { if ( param.type && param.type.names && param.type.names.length ) { - const escapedTypes = param.type.names.map( name => htmlsafe( name ) ); + const escapedTypes = param.type.names.map( name => linkto( name, htmlsafe( name ) ) ); itemName += ' : ' + escapedTypes.join( ' | ' ) + ''; } diff --git a/utils/docs/template/static/scripts/page.js b/utils/docs/template/static/scripts/page.js index 9d60e2b1474baf..d9f59e0417e622 100644 --- a/utils/docs/template/static/scripts/page.js +++ b/utils/docs/template/static/scripts/page.js @@ -30,10 +30,16 @@ if ( typeof hljs !== 'undefined' ) { document.addEventListener( 'click', function ( event ) { - const target = event.target.closest( 'a[href^="#"]' ); + const target = event.target.closest( 'a' ); if ( ! target || ! target.hash ) return; + // Check if it's a same-page link (either starting with # or pointing to current page) + const href = target.getAttribute( 'href' ); + const isSamePageLink = href.startsWith( '#' ) || ( target.hostname === window.location.hostname && target.pathname === window.location.pathname ); + + if ( ! isSamePageLink ) return; + const hash = target.hash.substring( 1 ); const newHash = ( hash !== className ) ? `#${className}.${hash}` : `#${hash}`; const targetWindow = ( window.parent !== window ) ? window.parent : window; From 9cc04a554ea4484b5b70a82eb5e31494797a2a1c Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 31 Oct 2025 18:20:35 +0900 Subject: [PATCH 4/6] Ignore empty returns. --- utils/docs/template/tmpl/method.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/docs/template/tmpl/method.tmpl b/utils/docs/template/tmpl/method.tmpl index 823999083cd388..24308fe8f15e6f 100644 --- a/utils/docs/template/tmpl/method.tmpl +++ b/utils/docs/template/tmpl/method.tmpl @@ -41,7 +41,7 @@ - + 1) { ?>
Returns:
    From 237d95c54ff7b04369efda8ecf11b0b1ae476076 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 31 Oct 2025 19:15:33 +0900 Subject: [PATCH 5/6] Design tweaks. --- utils/docs/template/static/styles/page.css | 17 ++++++++++++++- utils/docs/template/tmpl/members.tmpl | 16 ++++----------- utils/docs/template/tmpl/params.tmpl | 24 +++++++++------------- utils/docs/template/tmpl/properties.tmpl | 22 ++++++-------------- 4 files changed, 36 insertions(+), 43 deletions(-) diff --git a/utils/docs/template/static/styles/page.css b/utils/docs/template/static/styles/page.css index 4721480e83279f..345b80272ff7a2 100644 --- a/utils/docs/template/static/styles/page.css +++ b/utils/docs/template/static/styles/page.css @@ -204,6 +204,16 @@ body table td { border-bottom: var(--border-style); } +body table table th, +body table table td { + border-bottom: none; +} + +body table tr:last-child th, +body table tr:last-child td { + border-bottom: none; +} + body table th { text-decoration: none; } @@ -220,11 +230,16 @@ body table code { body table.props td.name, body table.params td.name { width: 150px; - white-space: nowrap; + word-break: keep-all; } body table p { margin: 0; + margin-top: 10px; +} + +body table td p:first-child { + margin-top: 0; } body strong { diff --git a/utils/docs/template/tmpl/members.tmpl b/utils/docs/template/tmpl/members.tmpl index a2b38754272935..1d1558c3aca9db 100644 --- a/utils/docs/template/tmpl/members.tmpl +++ b/utils/docs/template/tmpl/members.tmpl @@ -9,18 +9,10 @@
    - Default is ' + self.htmlsafe(data.defaultvalue) + '.'; - // If description ends with

    , insert default before closing tag - if (desc.trim().endsWith('

    ')) { - desc = desc.trim().slice(0, -4) + defaultText + '

    '; - } else { - desc = desc + defaultText; - } - } - ?> +

    + +

    Default is .

    +
    diff --git a/utils/docs/template/tmpl/params.tmpl b/utils/docs/template/tmpl/params.tmpl index 90f32936ba19be..d70dafc6caf13b 100644 --- a/utils/docs/template/tmpl/params.tmpl +++ b/utils/docs/template/tmpl/params.tmpl @@ -57,21 +57,17 @@
Default is ' + self.htmlsafe(param.defaultvalue) + '.'; - // If description ends with

, insert default before closing tag - if (desc.trim().endsWith('

')) { - desc = desc.trim().slice(0, -4) + defaultText + '

'; - } else { - desc = desc + defaultText; - } - } - ?> -
Properties
+
+ + + + +

Default is .

+ + -
+ + +
+ +
+ + - -

Default is .