-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- refactor a bunch of functions - fix some performance/loop errors
- Loading branch information
1 parent
44e42d5
commit 197ff5f
Showing
11 changed files
with
671 additions
and
621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Change log | ||
## 1.1.0 | ||
|
||
- shapes and images can now be used together in an array to mix basic shapes and custom images; | ||
```js | ||
let mySparticles = new Sparticles( el, { | ||
|
||
shape: ["circle", "image"], | ||
imageUrl: "./snowflake.png" | ||
|
||
}) | ||
``` | ||
|
||
- fixed some performance / looping errors | ||
- refactored/renamed a lot of prototype methods | ||
|
||
- added the ability to write custom shapes in the off-chance that's | ||
better/easier than using a custom svg-image | ||
```js | ||
// first make sure the Sparticles is ready in page. | ||
// then you can add a custom offScreenCanvas before initialising. | ||
Sparticles.prototype.offScreenCanvas.doge = function(style, color, canvas) { | ||
// code for custom shape here, access to "this" object | ||
// which is the Sparticles prototype. | ||
}; | ||
// then initialise your sparticles instance with the custom shape | ||
let mySparticles = new Sparticles( el, { shape: "doge" }); | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.