-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Remove attributes array and cleanup Shader #5310
Conversation
var key; | ||
var schema = this.schema; | ||
var variables = {}; | ||
var varType; | ||
|
||
for (key in schema) { | ||
if (schema[key].is !== type) { continue; } | ||
if (schema[key].is !== 'uniform') { continue; } |
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.
Should 'is' property be removed from schema and all shaders updated accordingly?
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 did contemplate that as well, but I think it's safer to leave it. It can also serve some purpose. Say for example you rename or deprecate a uniform on your shader. Now you can add a property to the schema under the old name, but not mark it as a uniform. By overloading the update
method you can then print a warning message and delegate to the old behaviour without it ending up as a uniform.
Looking at this now. Nothing pending here? |
90dab37
to
ac0fa06
Compare
Thanks! |
Description:
The property combination
is: "attribute"
doesn't really do anything any more as attributes don't have to be manually specified for(Raw)ShaderMaterial
. This PR removes it from the code and cleans up the Shader file and corresponding test cases.Changes proposed:
attributes
and special handling ofis: "attribute"
in shader.js