Bladeren bron

Docs: Remove *.is* properties from search results. (#32578)

mrdoob 3 weken geleden
bovenliggende
commit
19b60c93ec
1 gewijzigde bestanden met toevoegingen van 21 en 0 verwijderingen
  1. 21 0
      utils/docs/template/publish.js

+ 21 - 0
utils/docs/template/publish.js

@@ -151,8 +151,29 @@ function buildSearchListForData() {
 		'TSL': []
 	};
 
+	// State flags that should appear in search (not type-checking properties)
+	const allowedIsProperties = new Set( [
+		'isPlaying',
+		'isDisposed',
+		'isPresenting'
+	] );
+
 	data().each( ( item ) => {
 
+		// Skip .is* type-checking properties (e.g., isCamera, isMesh)
+		// but keep state flags listed in allowedIsProperties
+		if ( item.name && item.kind === 'member' ) {
+
+			const name = item.name;
+
+			if ( name.startsWith( 'is' ) && ! allowedIsProperties.has( name ) ) {
+
+				return;
+
+			}
+
+		}
+
 		if ( item.kind !== 'package' && item.kind !== 'typedef' && ! item.inherited ) {
 
 			// Extract the class name from the longname (e.g., "Animation#getAnimationLoop" -> "Animation")

粤ICP备19079148号