Skip to content
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

Material: Add docs for .onBeforeRender function #28335

Closed
wants to merge 1 commit into from

Conversation

gkjohnson
Copy link
Collaborator

Related issue: --

Description

Add docs for Material.onBeforeRender

@gkjohnson gkjohnson added this to the r165 milestone May 11, 2024
@Mugen87
Copy link
Collaborator

Mugen87 commented May 11, 2024

This callback was only added for the removed node material integration in WebGLRenderer (#22417). It was not documented so far since it was not clear how to move on with this method. We should discuss if it is maybe better to deprecate and remove the callback was well.

@gkjohnson
Copy link
Collaborator Author

gkjohnson commented May 12, 2024

Thanks - I didn't know the history of the function.

I didn't realize it was undocumented until I went to look but I've found it useful. The use cases I've had in mind and used this for are implicitly updating uniforms based on the renderer or object before rendering. But I'm seeing that Object3D.onBeforeRender can be used for this, as well.

Closing until there's a better use case.

@gkjohnson gkjohnson closed this May 12, 2024
@gkjohnson gkjohnson removed this from the r165 milestone May 12, 2024
@gkjohnson gkjohnson deleted the onbeforerender-docs branch May 12, 2024 00:09
@Mugen87 Mugen87 added this to the r165 milestone May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants