mandarjs
Version:
A package to apply interactive effects on images using Three.js
55 lines (40 loc) • 1.13 kB
Markdown
# MandarJS
MandarJS is a lightweight JavaScript library that applies interactive visual effects to images using Three.js and custom GLSL shaders.
## 🚀 Installation
You can install MandarJS via npm:
```sh
npm install mandarjs
```
## 🔧 Usage
### 1️⃣ **Import the Library**
```js
import applyImageEffects from 'mandarjs';
```
### 2️⃣ **Call the Function with a Selector**
```js
applyImageEffects('img'); // Applies effects to all <img> elements
```
## 📌 Example
```html
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<canvas id="canvas" ></canvas>
<img src="lion.jpg" alt="">
<script type="module" src="/src/main.js"></script>
</body>
</html>
```
## 🎨 Features
- Uses Three.js for WebGL-based rendering
- Custom shaders for smooth interactive effects
- Easy-to-use API with a simple selector-based approach
## ✨ Author
Developed by **Mandar007**.