https://github.com/sepmein/startrail
Using RaphaelJS to simulate the star trail
https://github.com/sepmein/startrail
Last synced: 3 months ago
JSON representation
Using RaphaelJS to simulate the star trail
- Host: GitHub
- URL: https://github.com/sepmein/startrail
- Owner: sepmein
- Created: 2012-08-19T12:04:25.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-27T11:43:27.000Z (about 12 years ago)
- Last Synced: 2025-01-22T20:30:08.114Z (5 months ago)
- Language: JavaScript
- Size: 211 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#Star Trail
###by Spencer使用Raphaeljs模拟星空长曝光的情景。下载该repo,双击index.html在浏览器中查看该效果。
配置星空效果:
打开scripts.js,找到一下片段,对该变量作的任何修改能改变star trails在浏览器中的表现。
```
var preference = {
P: [640, 400],
//中心位置
ALPHA: 0,
//星轨的初始角度
MAXRANGE: 1000,
//最远的星轨到中心的距离,越大分布越稀疏
NUMOFTRAILS: 100,
//星轨条数,数目增大严重影响性能,3000左右能模拟真实自然界场景
MAGNITUDE: {
NUM: [10, 23, 67, 229, 738, 2420],
//模拟自然界中星等,分别为一等星、二等星。。。
LIGHT: [1, 1 / 1.35, 1 / 1.35 / 1.35, 1 / 1.35 / 1.35 / 1.35, 1 / 1.35 / 1.35 / 1.35 / 1.35, 1 / 1.35 / 1.35 / 1.35 / 1.35 / 1.35, 1 / 1.35 / 1.35 / 1.35 / 1.35 / 1.35 / 1.35] //各星等间亮度差异
},
speed: 120000,
//星轨运行速度,完成一圈所需要的ms
step: 360 //步进,星轨完成动画总共运行的角度
};
```[前往](http://spencer.kokiya.com 'kokiya')Spencer的博客查看关于starTrail的博文
contact [[email protected]](mailto:[email protected] 'send me an email')ps:branch bigbang is also good, check it out
另:bigbang分支也不错,有空玩玩儿check doc/ for more docs