Explorar o código

Add icon badge support for older versions of the library.

Mr.doob hai 9 meses
pai
achega
cd5b8ba19f
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      devtools/bridge.js

+ 11 - 0
devtools/bridge.js

@@ -344,6 +344,17 @@
 
 		} );
 
+		// Check if THREE is in the global scope (Old versions)
+		window.addEventListener( 'load', () => {
+
+			if ( window.THREE && window.THREE.REVISION) {
+	
+				dispatchEvent( 'register', { revision: THREE.REVISION } );
+	
+			}
+	
+		} );
+
 		// Watch for page unload to reset state
 		window.addEventListener( 'beforeunload', () => {
 

粤ICP备19079148号