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

Geometries now allow attributes to added/overridden #1038

Merged
merged 1 commit into from
Apr 8, 2019

Conversation

ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Apr 6, 2019

For #

Background

Change List

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 45.691% when pulling 93323f4 on ib/geometry-attribute-overrides into 32e87f1 on master.

NORMAL: {size: 3, value: new Float32Array(CUBE_NORMALS)},
TEXCOORD_0: {size: 2, value: new Float32Array(CUBE_TEX_COORDS)}
}
attributes: {...ATTRIBUTES, ...props.attributes}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we might want this the other way? In what case would I want to use CubeGeometry and not use the e.g. the preset cube positions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wondering if we might want this the other way? In what case would I want to use CubeGeometry and not use the e.g. the preset cube positions?

I can see the argument for that. I tend to leave such choices to the users. If they want the original attributes, then they would just not override them, but if they really do want to change (e.g. normals) then they can?

The attribute names generated by this geometry are well-documented so the behavior is predictable in that sense.

@ibgreen ibgreen merged commit 3906f91 into master Apr 8, 2019
@ibgreen ibgreen deleted the ib/geometry-attribute-overrides branch April 8, 2019 17:07
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.

None yet

3 participants