Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @scenejs/effects with all npm packages installed. Try it out:

var effects = require("@scenejs/effects")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@scenejs/effects v1.0.1

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

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 "@egjs/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
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free