Skip to content

Commit

Permalink
feat: use CSSEffect and remove anime
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvl01 committed Nov 24, 2021
1 parent 836aa10 commit 0044557
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 57 deletions.
65 changes: 21 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@
"path": "cz-conventional-changelog"
}
},
"dependencies": {
"@donkeyclip/motorcortex-anime": "^2.1.16"
},
"dependencies": {},
"peerDependencies": {
"@donkeyclip/motorcortex": ">= 7.4.0 < 8"
"@donkeyclip/motorcortex": ">= 7.6.2 < 8"
},
"devDependencies": {
"@babel/cli": "7.16.0",
Expand Down
6 changes: 2 additions & 4 deletions src/Incidents/Comets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { HTMLClip, loadPlugin } from "@donkeyclip/motorcortex";
import AnimeDefinition from "@donkeyclip/motorcortex-anime";
const Anime = loadPlugin(AnimeDefinition);
import { HTMLClip, CSSEffect } from "@donkeyclip/motorcortex";
import { _addDimension, timely } from "../helpers/randomizer";
const closeAngle = 29;

Expand Down Expand Up @@ -112,7 +110,7 @@ export default class Comets extends HTMLClip {
for (let i = 0; i < this.comets.length; i++) {
// console.log(Math.tan(angle)*(-this.itemData[i].width -this.itemData[i].left)+ this.itemData[i].top)
const angle = (-closeAngle * Math.PI) / 180;
const moveMagentComet = new Anime.Anime(
const moveMagentComet = new CSSEffect(
{
animatedAttrs: {
left: `-${this.itemData[i].width}px`,
Expand Down
8 changes: 3 additions & 5 deletions src/Incidents/Stars.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { HTMLClip, loadPlugin, Combo } from "@donkeyclip/motorcortex";
import AnimeDefinition from "@donkeyclip/motorcortex-anime";
const Anime = loadPlugin(AnimeDefinition);
import { HTMLClip, CSSEffect, Combo } from "@donkeyclip/motorcortex";
import { spatial, timely } from "../helpers/randomizer";

export default class Stars extends HTMLClip {
Expand Down Expand Up @@ -103,7 +101,7 @@ export default class Stars extends HTMLClip {
{
incidents: [
{
incidentClass: Anime.Anime,
incidentClass: CSSEffect,
attrs: {
animatedAttrs: _getAnimatedAttr(
0,
Expand All @@ -116,7 +114,7 @@ export default class Stars extends HTMLClip {
position: 0,
},
{
incidentClass: Anime.Anime,
incidentClass: CSSEffect,
attrs: {
animatedAttrs: _getAnimatedAttr(
1,
Expand Down

0 comments on commit 0044557

Please sign in to comment.