-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Component - Add support for componentization in the renderer #31185
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
Comments
Why does this need to be built-in? |
Can you create a jsfiddle that showcases your proposal better than these two screenshots? |
Okay, I'll get back to you after uploading the example |
Currently, only WebGLRenderer is supported, and WebGPURenderer is not yet fully adapted |
onLoad() {
console.log( `${this.obj.name} loaded` );
}
onUpdate() {
// console.log(`${this.obj.name} update`);
}
onEnable() {
console.log( `${this.obj.name} enable` );
}
onDisable() {
console.log( `${this.obj.name} disable` );
}
onDestroy() {
console.log( `${this.obj.name} destroy` );
} Are these all the needed callbacks for this? |
More questions...
|
Description
Add support for componentized code to nodes, use lifecycle and event-driven for better code management.
Solution
Use components to manage your code, like this.
Alternatives
It's very inconvenient to wrap all the componentization logic into methods and then call them manually, so I tried modifying the code of Object3D and Renderer to support componentization
Additional context
No response
The text was updated successfully, but these errors were encountered: