Skip to content

Commit

Permalink
Merge pull request #2 from lawwrr/demo
Browse files Browse the repository at this point in the history
Bugfixes on test, added demo page
  • Loading branch information
Laura González authored Feb 8, 2017
2 parents d158583 + 4c5e066 commit c79771d
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# constellation
Draws cute moving canvas constellations.
Draws cute moving canvas constellations. [See it in action here!](https://lawwrr.github.io/constellation/)

<p align="center">
<img src="http://i.imgur.com/gLCMGoi.png">
Expand Down
60 changes: 60 additions & 0 deletions docs/css.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@import url('https://fonts.googleapis.com/css?family=Pangolin');

* {
margin: 0;
padding: 0;
-webkit-font-smoothing: antialiased;
}
body {
background: #000;
font-family: 'Pangolin', cursive;
width: 100%;
height: 100%;
position: fixed;
top: 0;
bottom:0;
left:0;
right:0;
}
canvas {
background: linear-gradient(to bottom right,#450068,#2f0068);
}
.ct {
color: #fff;
position: fixed;
height: 4em;
width: 20em;
text-align: center;
margin: auto;
top: 0;
bottom:0;
left:0;
right:0;
}

.ct h1 {
font-size: 2rem;
}

.ct p {
font-size: .75rem;
opacity: .75;
}

.ct a {
display: inline-block;
color: #450068;
padding: .5em 1em;
border-radius: 99999em;
background: #fff;
font-size: 1rem;
margin-top: 2em;
text-decoration: none;
text-transform: uppercase;
}

.ct a:hover {
box-shadow: inset 0 0 0 2px #fff;
background: none;
color: #fff;
}
36 changes: 36 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Constellation</title>
<link rel="stylesheet" href="css.css" />
<script src="https://github.com/lawwrr/constellation/releases/download/v1.0.0/constellation.min.js"></script>
</head>
<body>
<div class="ct">
<h1>Constellation</h1>
<p>(cute animated constellations)</p>
<a href="https://github.com/lawwrr/constellation">Grab it!</a>
</div>
<canvas></canvas>
<script>
var constellationInstance = window.constellation({
size:[window.innerWidth,window.innerHeight],
canvas: document.querySelector('canvas'),
nodeSize: 2,
nodePadding: 1,
padding: [-100,-100],
nodesTotal: 100,
shipsTotal: 400,
fuzzyness: 100,
style: {
starColor: '#fff',
lineColor: 'rgba(255,255,255,.5)',
lineSize: .5,
starPadding: 0,
starSize: 2
}
});
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "constelation-canvas",
"version": "1.0.0",
"version": "1.0.1",
"description": "draws cute moving canvas constellations",

"main": "src/app.js",
Expand Down
1 change: 0 additions & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<meta charset="utf-8">
<title>Constellation</title>
<link rel="stylesheet" href="css.css" />
<script src="../dist/constellation.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd');</script>
<script src="test.js"></script>
Expand Down

0 comments on commit c79771d

Please sign in to comment.