Skip to content

Conversation

@nzjony
Copy link
Contributor

@nzjony nzjony commented Mar 20, 2019

Related to: #14009

After cloning an object, it took me a lot of effort to track down the reason that the clone was rendering differently. We use the on(After|Before)Render functions to set the stencil state and this wasn't clear to me until we used RenderDoc to see that the stencil state was different.
This should at least save some people some hassle.

@nzjony
Copy link
Contributor Author

nzjony commented Mar 22, 2019

@donmccurdy, I saw you were involved in some discussion about #14009, do you have an opinion about this?


Copy the given object into this object.

Note, the callbacks [page:.onAfterRender] and [page:.onBeforeRender] are not copied across.
Copy link
Collaborator

Choose a reason for hiding this comment

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

To make this a little more general and cover EventDispatcher methods, let's say:

Note that event listeners and render callbacks ([page:.onAfterRender] and [page:.onBeforeRender]) are not copied.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this be better?

Note: event listeners and user-defined callbacks ([page:.onAfterRender] and [page:.onBeforeRender]) are not copied.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry for late response, thanks for feedback!

@donmccurdy
Copy link
Collaborator

Suggested a wording addition, but otherwise I'm fine with this change thanks!

@mrdoob mrdoob added this to the r103 milestone Mar 26, 2019
@mrdoob
Copy link
Owner

mrdoob commented Mar 26, 2019

Will fix post-merge.

@mrdoob mrdoob merged commit ebfa122 into mrdoob:dev Mar 26, 2019
@mrdoob
Copy link
Owner

mrdoob commented Mar 26, 2019

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Mar 26, 2019

4919ced

@pailhead
Copy link
Contributor

pailhead commented Oct 7, 2019

It'd be really nice to know how frequently these callbacks are used for managing the stencil buffer. I imagine this is one of the main reasons why one might want access to the gl context and modifying it before draws.

@mrdoob
Copy link
Owner

mrdoob commented Oct 7, 2019

@pailhead do you mind creating a new issue?

Repository owner deleted a comment Oct 7, 2019
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.

5 participants