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

recreate geometry if width/height changes #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ngokevin
Copy link
Contributor

@ngokevin ngokevin commented Dec 5, 2017

No description provided.

@fernandojsg
Copy link
Owner

@ngokevin I don't get this change, isn't that what we already do on https://github.com/fernandojsg/aframe-slice9-component/blob/master/index.js#L174-L177
In any case is not a good idea to create new geometry on width/height change, imagine the case where we use it for animate the shape, it's better to just access the vertices and modify them as in regenerateMesh (Probably better to rename to updateMesh or so): https://github.com/fernandojsg/aframe-slice9-component/blob/master/index.js#L53-L156

@ngokevin
Copy link
Contributor Author

ngokevin commented Dec 8, 2017

If you'd want to animate a slice9 (which would be uncommon), it seems easier to animate the scale versus re-calculating the vertices/UVs every tick.

@ngokevin
Copy link
Contributor Author

ngokevin commented Dec 8, 2017

I don't get this change, isn't that what we already do on.

When width or height changes, the geometry is not updated. You can try in console to check.

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.

2 participants