-
Notifications
You must be signed in to change notification settings - Fork 312
Renderers refactor #1850
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
base: master
Are you sure you want to change the base?
Renderers refactor #1850
Conversation
1d32a74
to
e41f600
Compare
e41f600
to
998b102
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - refactoring to use common factories for DRY makes sense.
@@ -70,6 +74,42 @@ <h3>Components used</h3> | |||
canvasId: "myCanvas" | |||
}); | |||
|
|||
// new ReflectionMap(viewer.scene, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this commented out bit
@@ -1031,6 +1031,21 @@ class XKTLoaderPlugin extends Plugin { | |||
} | |||
}; | |||
|
|||
window._timestamp = (function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like window._timeStamp
is no longer needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it's one of the things left temporarily for the draft, as it's easier to debug with.
It'll be gone in the final PR.
? lightSetup.directionalLights.map( | ||
light => `(max(dot(${attributes.normal.view}, ${light.getDirection(geometry.viewMatrix, attributes.position.view)}), 0.0) * ${light.getColor()})`) | ||
: [ ]); | ||
// TODO: A blending mode for emphasis materials, to select add/multiply/mix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree - dynamic blending mode for emphasis materials
@@ -285,11 +286,20 @@ <h3>Components Used</h3> | |||
|
|||
const map = {}; | |||
|
|||
const RNG = function(seed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is introduced in this PR in many examples to replace Math.random(), but I don't think it makes sense here, as examples should be simple. But if it's really needed for some reason, then it would be good to at least refer to the source. I'm not sure where the original source comes from, if this is the one: https://stackoverflow.com/a/72732727, then we should refer to it, as it is under CC BY-SA 4.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function has been introduced temporarily for reproducibility during debugging.
There's a few commits there in the branch (especially at its beginning) that were meant only for development, and will be gone in the final PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment, that it is great case to use automatic tests Ania and Mateusz prepared for us. Not only to make sure it works after refactor, but also to check their work and see if these tests makes sense. I'd ask Mateusz once he's back to try to run them before merge.
@xeolabs I've pushed the latest commits added on top of the branch that we discussed last time. |
7e980ed
to
5d128a5
Compare
The following relates to the current HEAD at 5d128a5. This PR refactors renderers architecture, but in general doesn't change rendered outputs. By the end of the PR three commits are added that reintroduce those previously reverted changes. |
5d128a5
to
e7d6c8c
Compare
2cad949
to
e1c0f92
Compare
f5c04fe
to
5caed07
Compare
…s failing randomness
…reverted at the beginning of this branch Note that the "cleaner edges" had originally only been implemented for VBO's and DTX's Color and FlatColor programs. The support probably needs to be extended to some of the other programs, as well as to the Mesh hierarchy.
…es layers)" #1884 - reverted at the beginning of this branch
…ntextrestored handlers
…ext lose handling
…} into renderSnapshotToCanvas
5b5e8a9
to
af6f353
Compare
No description provided.