Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bereziuk committed Feb 5, 2016
1 parent 4055bf9 commit 7542c1a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -16,6 +16,7 @@ npm install particler --save
```html
<!-- create canvas tag -->
<canvas id="particler-instance"></canvas>
<!-- define proper styles if needed -->

<!-- include particler.js library -->
<script src="node_modules/particler/dist/particler.js"></script>
Expand Down
1 change: 0 additions & 1 deletion dist/particler.js
Expand Up @@ -7,7 +7,6 @@ var ParticlerDefaultConfig = (function () {
this.maxSize = 3;
this.minimalLineLength = 250;
this.speed = 25;
this.framesPerSecond = 60;
this.frameDuration = 20;
this.backgroundColor = "transparent";
}
Expand Down
26 changes: 13 additions & 13 deletions dist/particler.ts
Expand Up @@ -38,7 +38,7 @@ interface IParticler {
dotsArray: Array<IDot>;
}

class ParticlerDefaultConfig implements IParticlerConfig {
class ParticlerDefaultConfig2 implements IParticlerConfig {
quantity = 20;
lineWidth = 0.05;
fillColor = "#000000";
Expand Down Expand Up @@ -81,13 +81,13 @@ class Particler implements IParticler {
};

createDot(i: number, arr: Array<IDot>): void {
let size;
let vx;
let vy;
let posX;
let posY;
let angle = Math.random() * 360;
let rads = angle * Math.PI / 180;
let size: number;
let vx: number;
let vy: number;
let posX: number;
let posY: number;
let angle: number = Math.random() * 360;
let rads: number = angle * Math.PI / 180;

// set radom size and position
size = Math.floor(Math.random() * (this.config.maxSize - this.config.minSize + 1) + this.config.minSize);
Expand All @@ -107,11 +107,11 @@ class Particler implements IParticler {
}

drawDots(): void {
let i;
let i: number;
let j = this.config.quantity;
let k;
let el;
let getDistance = (x1: number, y1: number, x2: number, y2: number) => {
let k: number;
let el: IDot;
let getDistance = (x1: number, y1: number, x2: number, y2: number): number => {
return Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2));
};

Expand Down Expand Up @@ -185,4 +185,4 @@ class Particler implements IParticler {
this.setWrapperSize();
});
}
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Expand Up @@ -7,6 +7,6 @@
"outDir": "dist"
},
"files": [
"src/example.ts"
"dist/particler.ts"
]
}

0 comments on commit 7542c1a

Please sign in to comment.