https://github.com/donkeyclip/motorcortex-comets
https://github.com/donkeyclip/motorcortex-comets
comets motorcortex motorcortex-plugin
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/donkeyclip/motorcortex-comets
- Owner: donkeyclip
- License: mit
- Created: 2020-11-27T09:52:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T17:40:29.000Z (about 1 month ago)
- Last Synced: 2025-04-18T08:02:02.844Z (about 1 month ago)
- Topics: comets, motorcortex, motorcortex-plugin
- Language: JavaScript
- Homepage:
- Size: 6.79 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# motorcortex-comets
## Demo
[Check it out here](https://donkeyclip.github.io/motorcortex-comets/demo/index.html)
## Installation
```bash
$ npm install --save @donkeyclip/motorcortex-comets
# OR
$ yarn add @donkeyclip/motorcortex-comets
```## Loading
```javascript
const MotorCortex = require("@donkeyclip/motorcortex/");
const cometsDefinition = require("@donkeyclip/motorcortex-comets");
const Plugin = MotorCortex.loadPlugin(BannersDefinition);
```# Create incident
## Comets
```javascript
const comet = new MyPlugin.Comets(
{
width: 800,
height: 300,
cometMaxSize: 581,
cometMinSize: 200,
meteoriteColors: ["#FFFFFF", "#FFDC63"],
auraIner: ["#57DDBA", "#62D8B9", "#7CC8B3"],
auraOuter: ["#47F7C5", "#87B3C1"],
items: 3,
repeats: 5,
duration: 8000,
},
{
selector: ".comet1",
}
);
```### Comets Attrs
| Name | Are | Values |
| --------------- | :----------------------------------: | --------------: |
| width | width of incident | num |
| height | height of incident | num |
| cometMaxSize | the maximum size of comets | num |
| cometMinSize | the minimum size of comets | num |
| meteoriteColors | The list of colors of meteorite | array of colors |
| auraIner | The list of colors for the iner aura | array of colors |
| auraOuter | The list of colors for the iner aura | array of colors |
| items | how meny commet will fall | num |
| repeats | how meny times clip wiil loop | num |
| duration | max duration of one comet fall | num |## Stars
```javascript
const stars = new MyPlugin.Stars(
{
width: 800,
height: 300,
starMaxSize: 60,
starMinSize: 15,
starColor: "#F0F0F0",
starGlowColor:
"0 0 0 0 0.950946003 0 0 0 0 0.81265567 0 0 0 0 0.51528336 0 0 0 1 0",
items: 15,
repeats: 5,
duration: 8000,
},
{
selector: ".comet2",
}
);
```### Stars Attrs
| Name | Are | Values |
| ------------- | :-----------------------------------------: | -------------------------: |
| width | width of incident | num |
| height | height of incident | num |
| starMaxSize | the maximum size of each start | num |
| starMinSize | the minimum size of each start | num |
| starColor | the color of a star | color |
| starGlowColor | the color of star clow | sting of ColorMatrix value |
| items | start number | num |
| repeats | how meny times clip wiil loop | num |
| duration | max duration of one full blinking animation | num |## License
[MIT License](https://opensource.org/licenses/MIT)
[
](https://donkeyclip.com)