Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dougreeder/aframe-simple-sun-sky
An A-Frame WebVR sky primitive using a simple (and fast) gradient away from the sun
https://github.com/dougreeder/aframe-simple-sun-sky
a-frame vr webvr
Last synced: about 2 months ago
JSON representation
An A-Frame WebVR sky primitive using a simple (and fast) gradient away from the sun
- Host: GitHub
- URL: https://github.com/dougreeder/aframe-simple-sun-sky
- Owner: DougReeder
- License: mit
- Created: 2018-03-09T05:25:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T01:13:25.000Z (5 months ago)
- Last Synced: 2024-10-07T05:09:11.671Z (3 months ago)
- Topics: a-frame, vr, webvr
- Language: JavaScript
- Size: 385 KB
- Stars: 15
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
aframe-simple-sun-sky
===An [A-Frame](https://aframe.io) [WebXR](https://www.webxr.community/) sky primitive using a simple (and fast) gradient away from the sun.
Saves your GPU power for the terrain!
Does *not* include any directional lighting. You may need to set sun-position on other elements to match.![sample screenshot](sample.png)
[live example scene](https://dougreeder.github.io/aframe-simple-sun-sky/example.html)
When the sun goes below the horizon, you might want to switch to a different sky.
Include using
```html```
Basic use:
```html```
The sky fades to fog-color near the horizon.
If you use fog in your scene, set fog-color the same or very similar to your fog.
If you don't use fog, set fog-color to a grayish variant of your sky colors.
The special value 'none' will disable the horizon effect, for those rare worlds that are all sky and no land.
```html```
Setting the colors of the sky:
```html```
Adding lights so shadows work correctly:
```html```
Increasing radius (default 5000) of sky sphere (increase the `far` parameter of the camera, too):
```html```
You can change any of the colors on the fly, except changing fog to or from 'none'.