Skip to content

Commit

Permalink
fix:remove anime plugin and fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvl01 committed Feb 2, 2022
1 parent 285210d commit 7f58817
Show file tree
Hide file tree
Showing 8 changed files with 2,670 additions and 2,874 deletions.
6 changes: 2 additions & 4 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
}
#clip {
background-color: black;
width: 90%;
height: 90%;
margin:auto;
margin-top:2%;
width: 100%;
height: 100%;
}
</style>
</head>
Expand Down
5,461 changes: 2,635 additions & 2,826 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
}
},
"peerDependencies": {
"@donkeyclip/motorcortex": "^7",
"@donkeyclip/motorcortex-anime": ">= 2.1.16 < 3"
"@donkeyclip/motorcortex": "^7"
},
"devDependencies": {
"@babel/cli": "7.16.8",
Expand All @@ -83,7 +82,6 @@
"@commitlint/cli": "16.1.0",
"@commitlint/config-conventional": "16.0.0",
"@donkeyclip/motorcortex": "7.8.0",
"@donkeyclip/motorcortex-anime": "2.1.17",
"@donkeyclip/motorcortex-player": "2.5.0",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "21.0.1",
Expand Down
12 changes: 5 additions & 7 deletions src/FontWeight.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import MotorCortex from "@donkeyclip/motorcortex";
import AnimeDefinition from "@donkeyclip/motorcortex-anime";
const Anime = MotorCortex.loadPlugin(AnimeDefinition);
import {CSSEffect,HTMLClip,Combo} from "@donkeyclip/motorcortex";

export default class FontWeight extends MotorCortex.HTMLClip {
export default class FontWeight extends HTMLClip {
get fonts() {
let wordlist = this.attrs.fontFamily.split(" ").join("+");
wordlist += `:wght@${this.attrs.fontWeightList.join(";")}`;
Expand Down Expand Up @@ -54,11 +52,11 @@ export default class FontWeight extends MotorCortex.HTMLClip {
}

buildTree() {
const fontWeight = new MotorCortex.Combo(
const fontWeight = new Combo(
{
incidents: [
{
incidentClass: Anime.Anime,
incidentClass: CSSEffect,
attrs: {
animatedAttrs: {
fontWeight: "900"
Expand All @@ -70,7 +68,7 @@ export default class FontWeight extends MotorCortex.HTMLClip {
position: 0
},
{
incidentClass: Anime.Anime,
incidentClass: CSSEffect,
attrs: {
animatedAttrs: {
fontWeight: "100"
Expand Down
26 changes: 13 additions & 13 deletions src/Shadow/IncidentTree.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default (Anime, colorsRGB, duration) => [
new Anime.Anime(
export default (CSSEffect, colorsRGB, duration) => [
new CSSEffect(
{
animatedAttrs: {
textShadow: ` 5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -30,7 +30,7 @@ export default (Anime, colorsRGB, duration) => [
}
),

new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: ` 5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -60,7 +60,7 @@ export default (Anime, colorsRGB, duration) => [
selector: `.text`
}
),
new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: ` 5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -91,7 +91,7 @@ export default (Anime, colorsRGB, duration) => [
}
),

new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: ` 5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -122,7 +122,7 @@ export default (Anime, colorsRGB, duration) => [
}
),

new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: ` 5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -153,7 +153,7 @@ export default (Anime, colorsRGB, duration) => [
}
),

new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: ` 5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -186,7 +186,7 @@ export default (Anime, colorsRGB, duration) => [

///REVERSE

new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: `5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -216,7 +216,7 @@ export default (Anime, colorsRGB, duration) => [
selector: `.text`
}
),
new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: `5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -246,7 +246,7 @@ export default (Anime, colorsRGB, duration) => [
selector: `.text`
}
),
new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: `5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -276,7 +276,7 @@ export default (Anime, colorsRGB, duration) => [
selector: `.text`
}
),
new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: `5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -306,7 +306,7 @@ export default (Anime, colorsRGB, duration) => [
selector: `.text`
}
),
new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: `5px 5px 0px rgba(${colorsRGB[0]},1),
Expand Down Expand Up @@ -336,7 +336,7 @@ export default (Anime, colorsRGB, duration) => [
selector: `.text`
}
),
new Anime.Anime(
new CSSEffect(
{
animatedAttrs: {
textShadow: `5px 5px 0px rgba(${colorsRGB[0]},0),
Expand Down
8 changes: 3 additions & 5 deletions src/Shadow/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import MotorCortex from "@donkeyclip/motorcortex";
import AnimeDefinition from "@donkeyclip/motorcortex-anime";
import {CSSEffect,HTMLClip} from "@donkeyclip/motorcortex";
import { fontFamilyHelper } from "../helpers";
import loadIncidents from "./IncidentTree";

const Anime = MotorCortex.loadPlugin(AnimeDefinition);

export default class Shadow extends MotorCortex.HTMLClip {
export default class Shadow extends HTMLClip {
get fonts() {
const font = [
{
Expand Down Expand Up @@ -78,7 +76,7 @@ export default class Shadow extends MotorCortex.HTMLClip {
}

buildTree() {
const incidents = loadIncidents(Anime, this.colorsRGB, 500);
const incidents = loadIncidents(CSSEffect, this.colorsRGB, 500);
const length = this.attrs.reverse ? incidents.length : incidents.length / 2;
for (let i = 0; i < length; i++) {
this.addIncident(incidents[i], i * 500);
Expand Down
18 changes: 8 additions & 10 deletions src/SvgExplosion.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import MotorCortex from "@donkeyclip/motorcortex";
import AnimeDefinition from "@donkeyclip/motorcortex-anime";
const Anime = MotorCortex.loadPlugin(AnimeDefinition);
import {CSSEffect,HTMLClip,Group} from "@donkeyclip/motorcortex";
import { fontFamilyHelper } from "./helpers";

export default class SvgExplosion extends MotorCortex.HTMLClip {
export default class SvgExplosion extends HTMLClip {
get fonts() {
const family = fontFamilyHelper(
this.attrs.fontFamily,
Expand Down Expand Up @@ -138,7 +136,7 @@ export default class SvgExplosion extends MotorCortex.HTMLClip {
let polyPosition = (this.textSize * this.attrs.text.length) / 2;
for (let i = 0; i < this.attrs.text.length; i++) {
const rotation = -50 + Math.random() * 100;
const textAnimation = new Anime.Anime(
const textAnimation = new CSSEffect(
{
animatedAttrs: {
width: `${this.textSize}px`,
Expand All @@ -164,7 +162,7 @@ export default class SvgExplosion extends MotorCortex.HTMLClip {
easing: "easeOutExpo",
}
);
const polyMcGrou = new MotorCortex.Group();
const polyMcGrou = new Group();
let waitTIme = 0;
for (let j = 0; j < 8; j++) {
const a = Math.random();
Expand All @@ -180,7 +178,7 @@ export default class SvgExplosion extends MotorCortex.HTMLClip {
const offset = triSize * scale;
const circSize = this.textSize * 0.05 * Math.random();

const polyAnimationOp = new Anime.Anime(
const polyAnimationOp = new CSSEffect(
{
animatedAttrs: {
opacity: 1,
Expand All @@ -196,7 +194,7 @@ export default class SvgExplosion extends MotorCortex.HTMLClip {
}
);

const circAnimation = new Anime.Anime(
const circAnimation = new CSSEffect(
{
animatedAttrs: {
transform: {
Expand All @@ -223,7 +221,7 @@ export default class SvgExplosion extends MotorCortex.HTMLClip {
}
);

const polyAnimation = new Anime.Anime(
const polyAnimation = new CSSEffect(
{
animatedAttrs: {
transform: {
Expand Down Expand Up @@ -255,7 +253,7 @@ export default class SvgExplosion extends MotorCortex.HTMLClip {
}
polyPosition += this.textSize / 2;

const textAnimation2 = new Anime.Anime(
const textAnimation2 = new CSSEffect(
{
animatedAttrs: {
transform: {
Expand Down
9 changes: 3 additions & 6 deletions src/SvgLines.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import MotorCortex from "@donkeyclip/motorcortex";
import AnimeDefinition from "@donkeyclip/motorcortex-anime";

const Anime = MotorCortex.loadPlugin(AnimeDefinition);
import {CSSEffect,HTMLClip} from "@donkeyclip/motorcortex";
import { fontFamilyHelper } from "./helpers";

export default class SvgLines extends MotorCortex.HTMLClip {
export default class SvgLines extends HTMLClip {
get fonts() {
const font = [
{
Expand Down Expand Up @@ -91,7 +88,7 @@ export default class SvgLines extends MotorCortex.HTMLClip {
}

buildTree() {
const svgline = new Anime.Anime(
const svgline = new CSSEffect(
{
animatedAttrs: {
strokeDashoffset: "35%",
Expand Down

0 comments on commit 7f58817

Please sign in to comment.