Remove attributes array and cleanup Shader#5310
Merged
dmarcos merged 2 commits intoaframevr:masterfrom Mar 12, 2024
Merged
Conversation
nightgryphon
reviewed
Jul 6, 2023
|
|
||
| for (key in schema) { | ||
| if (schema[key].is !== type) { continue; } | ||
| if (schema[key].is !== 'uniform') { continue; } |
Contributor
There was a problem hiding this comment.
Should 'is' property be removed from schema and all shaders updated accordingly?
Contributor
Author
There was a problem hiding this comment.
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.
hexiaokang
approved these changes
Nov 20, 2023
Member
|
Looking at this now. Nothing pending here? |
90dab37 to
ac0fa06
Compare
Contributor
Author
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
attributesand special handling ofis: "attribute"in shader.js