Forked from De-Panther/load_spectorjs_in_dev_console.js
Created
January 30, 2024 06:23
-
-
Save mehmetron/5d066da2beebe23a224077c5376bb86c to your computer and use it in GitHub Desktop.
Code snippet for loading SpectorJS in WebGL page. Copy this code to the development console of a web page with WebGL content. Make sure that you are posting it in the right context(if the canvas is inside an iframe).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newScript = document.createElement("script"); | |
newScript.onload = function() { | |
var spector = new SPECTOR.Spector(); | |
spector.displayUI(); | |
}; | |
document.head.appendChild(newScript); | |
newScript.src = "https://spectorcdn.babylonjs.com/spector.bundle.js"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment