Skip to content

Conversation

@vamsi2246
Copy link

@vamsi2246 vamsi2246 commented Dec 2, 2025

This PR improves the documentation in src/core/EventDispatcher.js by replacing an outdated alert() call with console.log() in the usage example.

Previously, the example used alert() to demonstrate event handling, which is discouraged as it blocks the main thread and interrupts the user experience.

Additionally, the example has been expanded to include a stop() method and a corresponding event listener, providing a more comprehensive demonstration of how to define and handle custom events.

Linked Issues
N/A

Additional context
Verified that the updated example code is valid JavaScript and correctly demonstrates the EventDispatcher functionality.

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.28
83
350.28
83
+0 B
+0 B
WebGPU 616.03
171
616.03
171
+0 B
+0 B
WebGPU Nodes 614.64
170.74
614.64
170.74
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 482.33
117.81
482.33
117.81
+0 B
+0 B
WebGPU 687.42
186.76
687.42
186.76
+0 B
+0 B
WebGPU Nodes 637.26
173.94
637.26
173.94
+0 B
+0 B

@Mugen87 Mugen87 closed this Dec 2, 2025
Repository owner locked as spam and limited conversation to collaborators Dec 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants