We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Just copy paste the example from the docs:
<a-entity environment="lightPosition: 1 5 -2; groundColor: #445"></a-entity>
doesn't work, the scene is dark. No matter what value of lightPosition I choose
The console prints preset: default; lightPosition: NaN NaN NaN; groundColor: #445 which looks sus..
preset: default; lightPosition: NaN NaN NaN; groundColor: #445
The text was updated successfully, but these errors were encountered:
I think there's an issue with parsing coordinate attributes in general.
A quick hack that fixes this:
In the update() function
const parsedAttributes = JSON.parse(JSON.stringify(this.el.components.environment.attrValue)); // Add this **Object.keys(parsedAttributes).map(function(key, index) { const val = parsedAttributes[key]; if (typeof val == 'string' && val.split(' ').length == 3) { const coords = val.split(' '); parsedAttributes[key] = {x: coords[0], y: coords[1], z: coords[2]}; } });** this.environmentData = {}; Object.assign(this.environmentData, this.data); Object.assign(this.environmentData, this.presets[this.data.preset]); // Change this **Object.assign(this.environmentData, parsedAttributes);** console.log(this.environmentData);
Sorry, something went wrong.
No branches or pull requests
Just copy paste the example from the docs:
doesn't work, the scene is dark. No matter what value of lightPosition I choose
The console prints
preset: default; lightPosition: NaN NaN NaN; groundColor: #445
which looks sus..The text was updated successfully, but these errors were encountered: