aframe-environment-component icon indicating copy to clipboard operation
aframe-environment-component copied to clipboard

Enhancement: Allow additional parameters for sky

Open dsinni opened this issue 6 years ago • 0 comments

I was working on a project not long ago, and I needed the sky to also be visible from the exterior (space), which actually looked great after I used something like the custom code, below:

''' AFRAME.registerComponent('planet-sky', {

init: function () {

var scene = this.el.sceneEl;
var sky = scene.querySelector('a-sky');

sky.setAttribute('material', 'side', 'double');
sky.setAttribute('theta-length', 180);

}

}); '''

It took some poking around at first to achieve this, so I was thinking it would be great if it were possible to easily set sky parameters such as geometry.thetaLength and material.side for a full sphere that can also be seen from the exterior.

Of course, radius would also be great, which I mentioned in #45.

Just a thought. Keep up the great work!

dsinni avatar May 22 '18 05:05 dsinni