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

Remove invalid component's attributes #2

Closed
fernandojsg opened this issue Jun 30, 2016 · 5 comments
Closed

Remove invalid component's attributes #2

fernandojsg opened this issue Jun 30, 2016 · 5 comments
Milestone

Comments

@fernandojsg
Copy link
Member

If we have an entity with an standard material like:

<a-entity geometry="primitive: sphere" material="metalness:0.0;roughness:1.0;shader:standard"></a-entity>

And we change the shader, some of the parameters won't be available on this new shader (metalness, roughness):

<a-entity geometry="primitive: sphere" material="metalness:0.0;roughness:1.0;shader:noise"></a-entity>

So probably we should delete them, as it will keep giving warnings on the console:

core:schema:warn Unknown component property: metalness +0ms
browser.js:112 core:schema:warn Unknown component property: roughness +2ms
@fernandojsg
Copy link
Member Author

@dmarcos could you take a look at it? As I believe it may be related with the work you did on the copy to clipbard

@dmarcos
Copy link
Member

dmarcos commented Feb 8, 2017

This warning is expected since the schema has changed. I'm not super fan of removing any attributes since it might surprise the user.

@fernandojsg
Copy link
Member Author

Yes I'm not sure about removing the attributes either, I feel like it's nice as you're just removing attributes not used with the current schema, but on the other hand it's true that you could delete an attribute that the user could need later, like having a sphere with radius=10, switching to box by mistake and then back to sphere and the radius value is gone...
@ngokevin what do you think? better to close it?

@ngokevin
Copy link
Member

ngokevin commented Feb 8, 2017

Yeah, I'd close. Wouldn't mess with user code. Maybe they expect to change schema later or something.

@fernandojsg
Copy link
Member Author

Cool, thanks!

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

No branches or pull requests

3 participants