Skip to content

Added new DevTools #30870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 39 commits into
base: dev
Choose a base branch
from
Draft

Added new DevTools #30870

wants to merge 39 commits into from

Conversation

mrdoob
Copy link
Owner

@mrdoob mrdoob commented Apr 5, 2025

Description

Started a new and simpler Three.js DevTools.

Screenshot 2025-04-05 at 10 25 20

@mrdoob mrdoob added this to the r176 milestone Apr 5, 2025
@mrdoob mrdoob requested a review from Copilot April 5, 2025 02:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 8 out of 11 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • devtools/index.html: Language not supported
  • devtools/manifest.json: Language not supported
  • devtools/panel/panel.html: Language not supported

mrdoob and others added 3 commits April 5, 2025 11:45
… local variable

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@RenaudRohlinger
Copy link
Collaborator

Nice! I feel like adding support to the WebGPURenderer wouldn't require too much change, any plan on that? 😊

@mrdoob
Copy link
Owner Author

mrdoob commented Apr 7, 2025

It's on the Chrome Store already in case anyone wants to try it:
https://chromewebstore.google.com/detail/threejs-devtools/jechbjkglifdaldbdbigibihfaclnkbo

@mrdoob
Copy link
Owner Author

mrdoob commented Apr 7, 2025

@RenaudRohlinger

Nice! I feel like adding support to the WebGPURenderer wouldn't require too much change, any plan on that? 😊

I'll make that work today. We need to add some code to WebGPURenderer though.

The devtools Chrome extension injects `bridge.js` directly into the page content. As a result, any top-level definitions in `bridge.js` are set on `window`. This resulted in `window.dispatchEvent` being overwritten, which interfered with normal use of `window.dispatchEvent` by any site that relied on it.

This change wraps the entire `bridge.js` file in an anonymous function to prevent any littering of the `window` objcect.
@mrdoob mrdoob modified the milestones: r176, r177 Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants