Skip to content

Commit

Permalink
change spelling from reileigh to rayleigh in code
Browse files Browse the repository at this point in the history
- this depends on the
  [superframe](https://github.com/supermedium/superframe) library being
updated. See PR supermedium/superframe#297
  • Loading branch information
taylor committed Jul 28, 2021
1 parent e5bc11e commit ab9057e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Utilizes [a-sun-sky](https://supermedium.com/superframe/components/sun-sky/) and
![luminous moon + blue sky + stars](https://i.imgur.com/w6847An.png)

# features
- sunrise, daytime, and sunset feature beautiful reileigh scattering colors in the sky
- sunrise, daytime, and sunset feature beautiful rayleigh scattering colors in the sky
- `fog` component creates feeling of darkness after sunset, that then retreats as stars slowly fade into view
- moon rises and sets, creating a blue reileigh glow in the sky
- moon rises and sets, creating a blue rayleigh glow in the sky
- stars fade out, and then fog again comes in just to create a feeling of shadows retreating at dawn.

# demos
Expand Down Expand Up @@ -44,7 +44,7 @@ then add sky to your scene:
<a-scene>
<a-sun-sky
id="sun"
material="side: back; reileigh: 1; luminance: 1;"
material="side: back; rayleigh: 1; luminance: 1;"
super-sky="cycleDuration:.1; moonCycle:true; showStars:true;";
></a-sun-sky>
</a-scene>
Expand All @@ -59,7 +59,7 @@ see super-sky.js schema for options. comments explain their use.
- enable better control of sun/moon trajectory through sky
- code could be cleaner and more well tested--it's really something I shared as soon as I threw it together and got it working. "Better rough than never."
- slightly rotate world while stars are in sky to create star movement
- fix sudden shift from blue-darkness sky to grey-darkness sky after moonset resulting from reileigh and/or luminance shift
- fix sudden shift from blue-darkness sky to grey-darkness sky after moonset resulting from rayleigh and/or luminance shift
- currently night is 3x the length of day. This would imitate only northern winters/southern summers that have 8 hours of daylight, e.g. 10am to 6pm. ability to tweak this would be desirable.
- moon with phases would be an excellent improvement.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a-scene>
<a-sun-sky
id="sun"
material="side: back; reileigh: 1; luminance: 1;"
material="side: back; rayleigh: 1; luminance: 1;"
super-sky="cycleDuration:.1";
></a-sun-sky>
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
Expand Down
2 changes: 1 addition & 1 deletion super-sky.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ AFRAME.registerComponent('super-sky', {
if (this.data.debug) console.log("switching sun/moon", orbit, 'moon:', this.moon)

this.moon=!this.moon;
this.el.setAttribute('material', 'reileigh', this.moon ? 0.1 : 1);
this.el.setAttribute('material', 'rayleigh', this.moon ? 0.1 : 1);
this.el.setAttribute('material', 'luminance', this.moon ? 1.18 : 1);
this.moonSunSwitchFlag = true;
if (this.moon) {
Expand Down

0 comments on commit ab9057e

Please sign in to comment.