@scenejs/effects
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Scene.js Effects

npm version

🎬 Effect collection library where you can add effects with Scene.js

About Scene.js  /  API  /  Features  /  Examples


️Installation

npm

$ npm install @scenejs/effects

script

<script src="//daybrush.com/scenejs/release/latest/dist/scene.min.js"></script>
<script src="//daybrush.com/scenejs-effects/release/latest/dist/effects.min.js"></script>

🛠️ How to use

import { shake, flip, fadeIn, wipeIn } from "@scenejs/effects";

Scene
    .shake()
    .setDuration(1)
    .setSelector(".className")
    .play();

Effects

  • kineticFrame: Create a frame that moves the origin in the opposite direction as it moves through the transform. (CodePen)
                        

  • typing: Make a typing effect that is typed one character at a time like a typewriter. (CodePen)

  • keyframer: Make the CSS Keyframes Playable Animator(SceneItem). (CodePen)

<style>
@keyframes keyframes {
    0%, 7.69% {
      border-width:35px;
      transform: translate(-50%, -50%) scale(0);
    }
    84.61% {
      border-width: 0px;
      transform: translate(-50%, -50%) scale(1);
    }
    100% {
      border-width: 0px;
      transform: translate(-50%, -50%) scale(1);
    }
}
</style>
import { keyframer } from "@scenejs/effects";

keyframer("keyframes", {
    duration: 1,
    iterationCount: "infinite",
    selector: ".rect",
}).play();

👏 Contributing

If you have any questions or requests or want to contribute to scenejs or other packages, please write the issue or give me a Pull Request freely.

🐞 Bug Report

If you find a bug, please report to us opening a new Issues on GitHub.

📝 License

MIT License

Copyright (c) 2019 Daybrush

Dependencies (3)

Dev Dependencies (9)

Package Sidebar

Install

npm i @scenejs/effects

Weekly Downloads

81

Version

1.0.2

License

MIT

Unpacked Size

272 kB

Total Files

25

Last publish

Collaborators

  • younkue