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

don't require shader to return materials, only set #1549

Merged
merged 1 commit into from
Jun 11, 2016

Conversation

ngokevin
Copy link
Member

This matches geometry registration. And the extra return is not needed since it's set on the instance, and it's weird for init/update methods to be returning.

this.shader.el = this.el;
material = this.shader.init(data);
this.setMaterial(material);
var ShaderClass = shaders[shaderName] && shaders[shaderName].Shader;
Copy link
Member

Choose a reason for hiding this comment

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

I think the world class here is not a good fit. It's confusing. We don't use classes. The capitalization of the variable already indicates a constructor. It's probably the most widely spread convention in JS.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there another word we can use? Because there's shaders, .Shader, this.shader, shader.

Copy link
Member

Choose a reason for hiding this comment

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

I think the capitalization is enough to discriminate.

Copy link
Member Author

Choose a reason for hiding this comment

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

k

Copy link
Member Author

Choose a reason for hiding this comment

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

k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants