MERECALM
Documentation

Everything You Need To
Integrate MereCalm Animations

Learn how to use JSON, .lottie, SVG and MP4 animations with easy copy-paste examples and best practices.

Getting Started

Install In Less Than 2 Minutes

Every MereCalm animation package follows the same simple workflow.

1

Download

Download your animation package from Gumroad.

2

Extract

Open the ZIP file and view all included assets.

3

Choose Format

Select JSON, .lottie, SVG or MP4 depending on your project.

4

Start Building

Copy the example code and your animation is ready.

Package

What's Included In Every Package

Every MereCalm animation package is carefully organized with everything you need to start building immediately.

JSON

Compatible with Lottie Web, React, Vue, Angular and many other frameworks.

.lottie

Optimized animation package with smaller file size and faster loading.

SVG

Static vector illustration for websites, presentations and UI mockups.

MP4 Preview

Ready-made preview videos for presentations, social media and client showcases.

Examples

Ready-to-use HTML examples for Lottie Web and DotLottie Player.

README

Step-by-step instructions explaining every included file.

License

Commercial license with clear usage permissions and restrictions.

Support

Need help? Documentation and contact support are always included.

📦 Sleeping-Cat.zip
│
├── animation.json
├── animation.lottie
├── animation.svg
├── preview.mp4
├── README.md
├── LICENSE.txt
└── examples/
    ├── lottie-web/
    └── dotlottie-player/
JSON

Using JSON With Lottie Web

The JSON format works perfectly with lottie-web and most modern JavaScript frameworks.

<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js"></script>
<div id="animation-json"></div>

<script>
// json animation without hover
lottie.loadAnimation({
    container: document.getElementById("animation-json"),
    renderer: "svg",
    loop: true,
    autoplay: true,
    path: "JPG/sleepingcat-idle.json"
});
</script>
JSON on hover

Using JSON With Lottie Web

The JSON format works perfectly with lottie-web and most modern JavaScript frameworks.

<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js"></script>
<div id="lottie-container">
    
    <div id="cat1-target"></div>
    <div id="cat2-target"></div>
</div>
<script>
const container = document.getElementById("lottie-container");
const cat1Target = document.getElementById("cat1-target");
const cat2Target = document.getElementById("cat2-target");

// Load Cat 1 (Looping Idle)
const anim1 = lottie.loadAnimation({
    container: cat1Target,
    renderer: "svg",
    loop: true,
    autoplay: false,
    path: "sleepingcat-idle.json"
});

// Load Cat 2 (Hover Action)
const anim2 = lottie.loadAnimation({
    container: cat2Target,
    renderer: "svg",
    loop: false,
    autoplay: false,
    path: "sleepingcat-hover.json"
});

let isHoverPlaying = false;

// Wait until Cat 1 loads, then immediately loop it
anim1.addEventListener("DOMLoaded", () => {
    cat2Target.style.display = "none"; // Hide hover asset initially
    anim1.play();
});

// When Hover animation completes, switch back to Idle loop
anim2.addEventListener("complete", () => {
    if (isHoverPlaying) {
        isHoverPlaying = false;
    }
    
    cat2Target.style.display = "none";  // Hide hover layer
    cat1Target.style.display = "block"; // Show loop layer
    anim1.goToAndPlay(0, true);         // Restart loop smoothly
});

// Trigger animation swap on mouse enter
container.addEventListener("mouseenter", () => {
    if (isHoverPlaying) return;

    isHoverPlaying = true;

    anim1.stop();                       // Pause idle loop
    cat1Target.style.display = "none";  // Hide loop layer
    cat2Target.style.display = "block"; // Show hover layer
    
    anim2.goToAndPlay(0, true);         // Play hover action once from start
});
</script>
Lottie

Using Lottie With dotLottie player

The Lottie format works perfectly with lottie-web and most modern JavaScript frameworks.

<script type="module" src="https://unpkg.com/@lottiefiles/dotlottie-wc@0.6.2/dist/dotlottie-wc.js"></script>

<dotlottie-wc src="JPG/sleepingcat-idle.lottie" autoplay loop style="width:300px;height:300px;"></dotlottie-wc>
Lottie on hover

Using Lottie With dotLottie player

The Lottie format works perfectly with lottie-web and most modern JavaScript frameworks.

<script src="https://unpkg.com/@lottiefiles/dotlottie-wc@0.6.2/dist/dotlottie-wc.js" type="module"></script>

<div class="animation-container" id="hoverArea">
    
    <dotlottie-wc id="myLottiePlayer" src="sleepingcat-full.lottie" speed="1" style="width: 100%; height: 100%"
        segment="[0,120]" autoplay loop></dotlottie-wc>
</div>

<script>
    // -----------------------------
    // Animation Frame Ranges
    // -----------------------------

    const IDLE_START = 0;
    const IDLE_END = 119;

    const HOVER_START = 120;
    const HOVER_END = 479;

    const player = document.getElementById('myLottiePlayer');
    const hoverArea = document.getElementById('hoverArea');
    let isHovered = false;

    // Function to safely jump back to the idle looping animation
    function resetToIdleLoop() {
        if (!player.dotLottie) return;

        // Turn looping back on for Idle
        player.dotLottie.setLoop(true);
        player.dotLottie.setSegment(
            IDLE_START,
            IDLE_END
        );

        // Force the playhead to the beginning of the idle segment
        player.dotLottie.stop();
        player.dotLottie.play();
    }

    // 1. Hover In State: Plays Frames 181 to 432 EXACTLY once
    hoverArea.addEventListener('mouseenter', () => {
        if (!player.dotLottie) return;
        isHovered = true;

        // Remove any lingering complete handlers to avoid duplicate fires
        player.dotLottie.removeEventListener('complete', onHoverFinished);

        // Turn loop OFF so hover plays exactly once
        player.dotLottie.setLoop(false);
        player.dotLottie.setSegment(
            HOVER_START,
            HOVER_END
        );

        // Force playhead to drop to the absolute start of the hover frame (181)
        player.dotLottie.stop();
        player.dotLottie.play();

        // Listen for the exact moment the hover animation completes its timeline
        player.dotLottie.addEventListener('complete', onHoverFinished);
    });

    // Callback handler when the hover animation finishes its sequence
    function onHoverFinished() {
        player.dotLottie.removeEventListener('complete', onHoverFinished);

        // Go right back to the looping idle sequence automatically
        resetToIdleLoop();
    }

    // 2. Hover Out State: Safety net in case mouse leaves BEFORE hover finishes
    hoverArea.addEventListener('mouseleave', () => {
        isHovered = false;

        // Optional: If you want it to drop back to idle instantly when the mouse leaves, 
        // uncomment the line below. Otherwise, it will finish its current hover cycle.
        // resetToIdleLoop();
    });
</script>
Customization

Customize Your Animation

Every MereCalm animation is designed to be flexible and easy to adapt to your project.

🎨
Change Colors

Edit colors directly inside Lottie Editor, After Effects, or compatible animation tools.

⚡
Adjust Speed

Slow down or speed up animations using playback controls in your player.

🔁
Loop Control

Enable infinite loops or play the animation only once.

🖱️
Interactive Events

Trigger animations using hover, click, scroll or JavaScript events.

📏
Resizable

Scale animations to any size without losing quality.

📱
Responsive

Looks great on desktop, tablet and mobile devices.

💻
Developer Friendly

Works perfectly with JavaScript, React, Vue, Angular and modern frameworks.

🚀
Production Ready

Optimized for websites, mobile apps, dashboards and digital products.

Help Center

Frequently Asked Questions

Everything you need to know before using your MereCalm animations.

Yes. Every package includes a commercial license unless stated otherwise. You can use the animations in client work, websites, mobile apps, SaaS products and commercial UI projects.

Yes. Colors, speed, size, playback, looping and triggers can all be customized. Advanced users can also modify the original animation.

Animations work with plain HTML, JavaScript, React, Vue, Angular, Next.js, Webflow, Framer and most modern frameworks.

Every package contains JSON, .lottie, SVG, MP4 previews, documentation, examples and license information.

Yes. Any improvements, fixes or additional files added to the package will be available for future downloads.

You can always reach me through the contact page or email. I'm happy to help with setup or integration.