@andresclua/perlindom 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -0
- package/dist/PerlinDOM.es.js +76 -53
- package/dist/PerlinDOM.umd.js +1 -1
- package/docs/examples.html +6 -0
- package/package.json +1 -1
- package/readme.md +269 -189
- package/src/index.html +169 -7
- package/src/js/PerlinDom.js +115 -21
- package/src/examples.html +0 -515
- package/src/js/PerlinSVG.js +0 -190
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.0.3] - 2025-01-07
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Positioning Issue**: Fixed problem where inline styles (`left`, `top`) were conflicting with transform animations, causing double positioning
|
|
12
|
+
- **Transform Initialization**: PerlinDOM now properly initializes transform property if it doesn't exist
|
|
13
|
+
|
|
14
|
+
### Improved
|
|
15
|
+
- **Automatic Position Detection**: PerlinDOM now automatically detects and works from the element's current position (CSS or inline styles)
|
|
16
|
+
- **Cleaner API**: No need for specific inline styles - elements animate from wherever they are positioned
|
|
17
|
+
- **Better Performance**: Improved transform handling for smoother animations
|
|
18
|
+
|
|
19
|
+
### Documentation
|
|
20
|
+
- **README**: Completely restructured with better organization and clearer examples
|
|
21
|
+
- **Examples**: Cleaned up HTML examples, moved positioning from inline styles to CSS classes
|
|
22
|
+
- **Best Practices**: Added section explaining when to use CSS vs inline styles
|
|
23
|
+
- **Troubleshooting**: New section with common issues and solutions
|
|
24
|
+
|
|
25
|
+
### Code Quality
|
|
26
|
+
- **Examples Cleanup**: Removed unnecessary inline styles from demo particles
|
|
27
|
+
- **CSS Organization**: Better separation of positioning and styling concerns
|
|
28
|
+
|
|
29
|
+
## [0.0.2] - 2024-12-XX
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
- **Percentage Support**: Added support for percentage-based movement values (`'-10%'`, `'10%'`)
|
|
33
|
+
- **Responsive Animations**: Animations now adapt to container size changes
|
|
34
|
+
- **Mixed Values**: Support for mixing pixel and percentage values in same animation
|
|
35
|
+
- **Window Resize Handling**: Automatic recalculation when using percentage values
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
- **2D Perlin Noise**: Enhanced noise generation for more natural movement patterns
|
|
39
|
+
- **Smooth Transitions**: Improved lerp-based pause/play functionality
|
|
40
|
+
- **Performance Optimization**: Better requestAnimationFrame usage
|
|
41
|
+
|
|
42
|
+
## [0.0.1] - 2024-11-XX
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
- **Initial Release**: Basic PerlinDOM functionality
|
|
46
|
+
- **Core Animation**: Smooth organic animations using Perlin noise
|
|
47
|
+
- **Basic API**: Constructor with element, x/y ranges, speed, and seed options
|
|
48
|
+
- **Control Methods**: `play()`, `pause()`, `destroy()`, and `init()` methods
|
|
49
|
+
- **Transform-based Movement**: CSS transform animations for better performance
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
- **Perlin Noise Generation**: Custom implementation with seeded random generation
|
|
53
|
+
- **Configurable Ranges**: Separate X and Y movement ranges
|
|
54
|
+
- **Speed Control**: Adjustable animation speed
|
|
55
|
+
- **Seed Support**: Reproducible animations with custom seeds
|
|
56
|
+
- **Element Positioning**: Automatic relative positioning for static elements
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Legend
|
|
61
|
+
|
|
62
|
+
- **Added**: New features
|
|
63
|
+
- **Changed**: Changes in existing functionality
|
|
64
|
+
- **Deprecated**: Soon-to-be removed features
|
|
65
|
+
- **Removed**: Removed features
|
|
66
|
+
- **Fixed**: Bug fixes
|
|
67
|
+
- **Security**: Vulnerability fixes
|
|
68
|
+
- **Improved**: Performance or usability improvements
|
|
69
|
+
- **Documentation**: Documentation changes
|
|
70
|
+
- **Code Quality**: Code organization and cleanup
|
package/dist/PerlinDOM.es.js
CHANGED
|
@@ -1,35 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var q = (c) => {
|
|
3
|
+
throw TypeError(c);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
const
|
|
5
|
+
var j = (c, t, i) => t in c ? $(c, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[t] = i;
|
|
6
|
+
var D = (c, t, i) => j(c, typeof t != "symbol" ? t + "" : t, i), O = (c, t, i) => t.has(c) || q("Cannot " + i);
|
|
7
|
+
var A = (c, t, i) => t.has(c) ? q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(c) : t.set(c, i);
|
|
8
|
+
var a = (c, t, i) => (O(c, t, "access private method"), i);
|
|
9
|
+
var n, W, H, u, X, p, S, T, L;
|
|
10
|
+
const o = class o {
|
|
11
11
|
constructor({
|
|
12
12
|
element: t,
|
|
13
13
|
x: i = null,
|
|
14
|
-
y:
|
|
15
|
-
speed:
|
|
16
|
-
seed:
|
|
14
|
+
y: h = null,
|
|
15
|
+
speed: r = 0.01,
|
|
16
|
+
seed: l = 0,
|
|
17
17
|
lerpSpeed: s = 0.1
|
|
18
18
|
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
A(this, p);
|
|
20
|
+
D(this, "animate", () => {
|
|
21
|
+
var t, i, h, r, l, s, e, g, m, f, R, y;
|
|
22
|
+
if (this.lerpFactor !== this.targetLerpFactor && (this.lerpFactor = a(this, p, T).call(this, this.lerpFactor, this.targetLerpFactor, this.lerpSpeed), Math.abs(this.lerpFactor - this.targetLerpFactor) < 1e-3 && (this.lerpFactor = this.targetLerpFactor)), this.lerpFactor > 0) {
|
|
22
23
|
this.time += this.speed * this.lerpFactor;
|
|
23
|
-
const
|
|
24
|
-
|
|
24
|
+
const P = this.noise.perlin2(this.time, 0), Y = this.noise.perlin2(this.time, 100);
|
|
25
|
+
if (this.el) {
|
|
26
|
+
let d, F, x, v;
|
|
27
|
+
if (this.hasPercentages) {
|
|
28
|
+
const b = this.el.parentElement || document.body, B = b.clientWidth, w = b.clientHeight;
|
|
29
|
+
this.xRange && (d = a(t = o, n, u).call(t, this.xRange.min) ? a(i = o, n, X).call(i, this.xRange.min, B) : this.xRange.min, F = a(h = o, n, u).call(h, this.xRange.max) ? a(r = o, n, X).call(r, this.xRange.max, B) : this.xRange.max), this.yRange && (x = a(l = o, n, u).call(l, this.yRange.min) ? a(s = o, n, X).call(s, this.yRange.min, w) : this.yRange.min, v = a(e = o, n, u).call(e, this.yRange.max) ? a(g = o, n, X).call(g, this.yRange.max, w) : this.yRange.max);
|
|
30
|
+
} else
|
|
31
|
+
d = (m = this.xRange) == null ? void 0 : m.min, F = (f = this.xRange) == null ? void 0 : f.max, x = (R = this.yRange) == null ? void 0 : R.min, v = (y = this.yRange) == null ? void 0 : y.max;
|
|
32
|
+
const M = this.xRange ? a(this, p, L).call(this, P, -1, 1, d, F) : 0, z = this.yRange ? a(this, p, L).call(this, Y, -1, 1, x, v) : 0;
|
|
33
|
+
this.lastX = M, this.lastY = z, this.el.style.left = `${this.initialX + M}px`, this.el.style.top = `${this.initialY + z}px`;
|
|
34
|
+
} else {
|
|
35
|
+
const d = this.xRange ? a(this, p, L).call(this, P, -1, 1, this.xRange.min, this.xRange.max) : 0, F = this.yRange ? a(this, p, L).call(this, Y, -1, 1, this.yRange.min, this.yRange.max) : 0;
|
|
36
|
+
this.lastX = d, this.lastY = F;
|
|
37
|
+
}
|
|
25
38
|
}
|
|
26
39
|
(this.lerpFactor > 0 || this.targetLerpFactor > 0) && (this.raf = requestAnimationFrame(this.animate));
|
|
27
40
|
});
|
|
28
|
-
|
|
41
|
+
var e, g, m, f;
|
|
42
|
+
this.el = t, this.xRange = i, this.yRange = h, this.speed = r, this.time = l, this.isPlaying = !0, this.lerpFactor = 1, this.lerpSpeed = s, this.targetLerpFactor = 1, this.lastX = 0, this.lastY = 0, this.hasPercentages = !1, (i && (a(e = o, n, u).call(e, i.min) || a(g = o, n, u).call(g, i.max)) || h && (a(m = o, n, u).call(m, h.min) || a(f = o, n, u).call(f, h.max))) && (this.hasPercentages = !0), t ? (this.initialX = t.offsetLeft, this.initialY = t.offsetTop, this.hasPercentages && (this.handleResize = this.handleResize.bind(this), window.addEventListener("resize", this.handleResize))) : (this.initialX = 0, this.initialY = 0), this.animate = this.animate.bind(this), this.init(l);
|
|
29
43
|
}
|
|
30
44
|
init(t) {
|
|
31
45
|
var i;
|
|
32
|
-
this.noise =
|
|
46
|
+
this.noise = a(this, p, S).call(this, a(i = o, n, H).call(i, t)), this.isPlaying = !0, this.lerpFactor = 1, this.targetLerpFactor = 1, this.raf = requestAnimationFrame(this.animate), console.log("PerlinDOM initialized");
|
|
47
|
+
}
|
|
48
|
+
// Handle window resize for percentage-based values
|
|
49
|
+
handleResize() {
|
|
50
|
+
this.hasPercentages && this.el && (this.needsRecalculation = !0);
|
|
33
51
|
}
|
|
34
52
|
pause() {
|
|
35
53
|
this.isPlaying && (this.targetLerpFactor = 0, this.isPlaying = !1, console.log("PerlinDOM pausing..."));
|
|
@@ -38,61 +56,66 @@ const u = class u {
|
|
|
38
56
|
this.isPlaying || (this.targetLerpFactor = 1, this.isPlaying = !0, this.lerpFactor === 0 && (this.raf = requestAnimationFrame(this.animate)), console.log("PerlinDOM playing..."));
|
|
39
57
|
}
|
|
40
58
|
destroy() {
|
|
41
|
-
cancelAnimationFrame(this.raf);
|
|
59
|
+
cancelAnimationFrame(this.raf), this.hasPercentages && window.removeEventListener("resize", this.handleResize);
|
|
42
60
|
}
|
|
43
61
|
};
|
|
44
|
-
|
|
62
|
+
n = new WeakSet(), W = function(t) {
|
|
45
63
|
return function() {
|
|
46
64
|
let i = t += 1831565813;
|
|
47
65
|
return i = Math.imul(i ^ i >>> 15, i | 1), i ^= i + Math.imul(i ^ i >>> 7, i | 61), ((i ^ i >>> 14) >>> 0) / 4294967296;
|
|
48
66
|
};
|
|
49
|
-
},
|
|
50
|
-
var
|
|
51
|
-
const i = Array.from({ length: 256 }, (
|
|
52
|
-
for (let
|
|
53
|
-
const s = Math.floor(
|
|
54
|
-
[i[
|
|
67
|
+
}, H = function(t = 0) {
|
|
68
|
+
var r;
|
|
69
|
+
const i = Array.from({ length: 256 }, (l, s) => s), h = a(r = o, n, W).call(r, t);
|
|
70
|
+
for (let l = 255; l > 0; l--) {
|
|
71
|
+
const s = Math.floor(h() * (l + 1));
|
|
72
|
+
[i[l], i[s]] = [i[s], i[l]];
|
|
55
73
|
}
|
|
56
74
|
return i.concat(i);
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
75
|
+
}, u = function(t) {
|
|
76
|
+
return typeof t == "string" && t.endsWith("%");
|
|
77
|
+
}, X = function(t, i) {
|
|
78
|
+
var r;
|
|
79
|
+
return a(r = o, n, u).call(r, t) ? parseFloat(t) / 100 * i : t;
|
|
80
|
+
}, p = new WeakSet(), S = function(t) {
|
|
81
|
+
const i = (s) => s * s * s * (s * (s * 6 - 15) + 10), h = (s, e, g) => e + s * (g - e), r = (s, e, g) => {
|
|
82
|
+
const m = s & 15, f = m < 8 ? e : g, R = m < 4 ? g : m === 12 || m === 14 ? e : 0;
|
|
83
|
+
return (m & 1 ? -f : f) + (m & 2 ? -R : R);
|
|
84
|
+
}, l = (s, e) => s & 1 ? -e : e;
|
|
62
85
|
return {
|
|
63
86
|
// Original 1D Perlin noise function
|
|
64
87
|
perlin1(s) {
|
|
65
88
|
const e = Math.floor(s) & 255;
|
|
66
89
|
s -= Math.floor(s);
|
|
67
|
-
const
|
|
68
|
-
return
|
|
90
|
+
const g = i(s);
|
|
91
|
+
return h(g, l(t[e], s), l(t[e + 1], s - 1));
|
|
69
92
|
},
|
|
70
93
|
// New 2D Perlin noise function
|
|
71
94
|
perlin2(s, e) {
|
|
72
|
-
const
|
|
95
|
+
const g = Math.floor(s) & 255, m = Math.floor(e) & 255;
|
|
73
96
|
s -= Math.floor(s), e -= Math.floor(e);
|
|
74
|
-
const
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
97
|
+
const f = i(s), R = i(e), y = t[g] + m, P = t[g + 1] + m, Y = t[y], d = t[y + 1], F = t[P], x = t[P + 1];
|
|
98
|
+
return h(
|
|
99
|
+
R,
|
|
100
|
+
h(
|
|
101
|
+
f,
|
|
102
|
+
r(t[Y], s, e),
|
|
103
|
+
r(t[F], s - 1, e)
|
|
81
104
|
),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
105
|
+
h(
|
|
106
|
+
f,
|
|
107
|
+
r(t[d], s, e - 1),
|
|
108
|
+
r(t[x], s - 1, e - 1)
|
|
86
109
|
)
|
|
87
110
|
);
|
|
88
111
|
}
|
|
89
112
|
};
|
|
90
|
-
},
|
|
91
|
-
return t +
|
|
92
|
-
},
|
|
93
|
-
return (t - i) * (
|
|
94
|
-
},
|
|
95
|
-
let
|
|
113
|
+
}, T = function(t, i, h) {
|
|
114
|
+
return t + h * (i - t);
|
|
115
|
+
}, L = function(t, i, h, r, l) {
|
|
116
|
+
return (t - i) * (l - r) / (h - i) + r;
|
|
117
|
+
}, A(o, n);
|
|
118
|
+
let E = o;
|
|
96
119
|
export {
|
|
97
|
-
|
|
120
|
+
E as default
|
|
98
121
|
};
|
package/dist/PerlinDOM.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(a,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(a=typeof globalThis<"u"?globalThis:a||self,a.PerlinDOM=t())})(this,function(){"use strict";var O=Object.defineProperty;var T=a=>{throw TypeError(a)};var S=(a,t,p)=>t in a?O(a,t,{enumerable:!0,configurable:!0,writable:!0,value:p}):a[t]=p;var q=(a,t,p)=>S(a,typeof t!="symbol"?t+"":t,p),$=(a,t,p)=>t.has(a)||T("Cannot "+p);var M=(a,t,p)=>t.has(a)?T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,p);var h=(a,t,p)=>($(a,t,"access private method"),p);var t,E,W,d,L,f,j,H,Y;const o=class o{constructor({element:e,x:i=null,y:r=null,speed:l=.01,seed:c=0,lerpSpeed:s=.1}){M(this,f);q(this,"animate",()=>{var e,i,r,l,c,s,n,g,m,u,R,P;if(this.lerpFactor!==this.targetLerpFactor&&(this.lerpFactor=h(this,f,H).call(this,this.lerpFactor,this.targetLerpFactor,this.lerpSpeed),Math.abs(this.lerpFactor-this.targetLerpFactor)<.001&&(this.lerpFactor=this.targetLerpFactor)),this.lerpFactor>0){this.time+=this.speed*this.lerpFactor;const x=this.noise.perlin2(this.time,0),v=this.noise.perlin2(this.time,100);if(this.el){let F,y,X,A;if(this.hasPercentages){const B=this.el.parentElement||document.body,w=B.clientWidth,D=B.clientHeight;this.xRange&&(F=h(e=o,t,d).call(e,this.xRange.min)?h(i=o,t,L).call(i,this.xRange.min,w):this.xRange.min,y=h(r=o,t,d).call(r,this.xRange.max)?h(l=o,t,L).call(l,this.xRange.max,w):this.xRange.max),this.yRange&&(X=h(c=o,t,d).call(c,this.yRange.min)?h(s=o,t,L).call(s,this.yRange.min,D):this.yRange.min,A=h(n=o,t,d).call(n,this.yRange.max)?h(g=o,t,L).call(g,this.yRange.max,D):this.yRange.max)}else F=(m=this.xRange)==null?void 0:m.min,y=(u=this.xRange)==null?void 0:u.max,X=(R=this.yRange)==null?void 0:R.min,A=(P=this.yRange)==null?void 0:P.max;const z=this.xRange?h(this,f,Y).call(this,x,-1,1,F,y):0,b=this.yRange?h(this,f,Y).call(this,v,-1,1,X,A):0;this.lastX=z,this.lastY=b,this.el.style.left=`${this.initialX+z}px`,this.el.style.top=`${this.initialY+b}px`}else{const F=this.xRange?h(this,f,Y).call(this,x,-1,1,this.xRange.min,this.xRange.max):0,y=this.yRange?h(this,f,Y).call(this,v,-1,1,this.yRange.min,this.yRange.max):0;this.lastX=F,this.lastY=y}}(this.lerpFactor>0||this.targetLerpFactor>0)&&(this.raf=requestAnimationFrame(this.animate))});var n,g,m,u;this.el=e,this.xRange=i,this.yRange=r,this.speed=l,this.time=c,this.isPlaying=!0,this.lerpFactor=1,this.lerpSpeed=s,this.targetLerpFactor=1,this.lastX=0,this.lastY=0,this.hasPercentages=!1,(i&&(h(n=o,t,d).call(n,i.min)||h(g=o,t,d).call(g,i.max))||r&&(h(m=o,t,d).call(m,r.min)||h(u=o,t,d).call(u,r.max)))&&(this.hasPercentages=!0),e?(this.initialX=e.offsetLeft,this.initialY=e.offsetTop,this.hasPercentages&&(this.handleResize=this.handleResize.bind(this),window.addEventListener("resize",this.handleResize))):(this.initialX=0,this.initialY=0),this.animate=this.animate.bind(this),this.init(c)}init(e){var i;this.noise=h(this,f,j).call(this,h(i=o,t,W).call(i,e)),this.isPlaying=!0,this.lerpFactor=1,this.targetLerpFactor=1,this.raf=requestAnimationFrame(this.animate),console.log("PerlinDOM initialized")}handleResize(){this.hasPercentages&&this.el&&(this.needsRecalculation=!0)}pause(){this.isPlaying&&(this.targetLerpFactor=0,this.isPlaying=!1,console.log("PerlinDOM pausing..."))}play(){this.isPlaying||(this.targetLerpFactor=1,this.isPlaying=!0,this.lerpFactor===0&&(this.raf=requestAnimationFrame(this.animate)),console.log("PerlinDOM playing..."))}destroy(){cancelAnimationFrame(this.raf),this.hasPercentages&&window.removeEventListener("resize",this.handleResize)}};t=new WeakSet,E=function(e){return function(){let i=e+=1831565813;return i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61),((i^i>>>14)>>>0)/4294967296}},W=function(e=0){var l;const i=Array.from({length:256},(c,s)=>s),r=h(l=o,t,E).call(l,e);for(let c=255;c>0;c--){const s=Math.floor(r()*(c+1));[i[c],i[s]]=[i[s],i[c]]}return i.concat(i)},d=function(e){return typeof e=="string"&&e.endsWith("%")},L=function(e,i){var l;return h(l=o,t,d).call(l,e)?parseFloat(e)/100*i:e},f=new WeakSet,j=function(e){const i=s=>s*s*s*(s*(s*6-15)+10),r=(s,n,g)=>n+s*(g-n),l=(s,n,g)=>{const m=s&15,u=m<8?n:g,R=m<4?g:m===12||m===14?n:0;return(m&1?-u:u)+(m&2?-R:R)},c=(s,n)=>s&1?-n:n;return{perlin1(s){const n=Math.floor(s)&255;s-=Math.floor(s);const g=i(s);return r(g,c(e[n],s),c(e[n+1],s-1))},perlin2(s,n){const g=Math.floor(s)&255,m=Math.floor(n)&255;s-=Math.floor(s),n-=Math.floor(n);const u=i(s),R=i(n),P=e[g]+m,x=e[g+1]+m,v=e[P],F=e[P+1],y=e[x],X=e[x+1];return r(R,r(u,l(e[v],s,n),l(e[y],s-1,n)),r(u,l(e[F],s,n-1),l(e[X],s-1,n-1)))}}},H=function(e,i,r){return e+r*(i-e)},Y=function(e,i,r,l,c){return(e-i)*(c-l)/(r-i)+l},M(o,t);let a=o;return a});
|
package/docs/examples.html
CHANGED
|
@@ -169,6 +169,12 @@
|
|
|
169
169
|
<h1>PerlinDOM Examples</h1>
|
|
170
170
|
<p>This page demonstrates various ways to use the PerlinDOM library for creating smooth, organic animations.</p>
|
|
171
171
|
|
|
172
|
+
<div style="background-color: #e3f2fd; padding: 15px; border-radius: 5px; margin-bottom: 20px; border-left: 5px solid #2196f3;">
|
|
173
|
+
<h3 style="margin-top: 0; color: #0d47a1;">New Feature: Percentage-Based Values</h3>
|
|
174
|
+
<p>PerlinDOM now supports percentage-based values for responsive animations that adapt to container size.</p>
|
|
175
|
+
<p><a href="../src/percentage-example.html" style="color: #1976d2; font-weight: bold;">View Percentage-Based Examples →</a></p>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
172
178
|
<!-- Example 1: Basic Animation -->
|
|
173
179
|
<h2>1. Basic Animation</h2>
|
|
174
180
|
<div class="code-block">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andresclua/perlindom",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "A lightweight JavaScript library for creating smooth, organic animations for DOM elements using Perlin noise",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/perlindom.umd.js",
|