3d-shape-particle-text 1.0.0 → 1.0.1
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/README.md +15 -0
- package/dist/3d-shape-particle-text.es.js +499 -491
- package/dist/3d-shape-particle-text.umd.js +10 -10
- package/index.d.ts +30 -0
- package/package.json +7 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(oe,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("react"),require("three")):typeof define=="function"&&define.amd?define(["exports","react","three"],H):(oe=typeof globalThis<"u"?globalThis:oe||self,H(oe["3dShapeParticleText"]={},oe.React,oe.THREE))})(this,function(oe,H,ut){"use strict";function ft(W){const S=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(W){for(const N in W)if(N!=="default"){const G=Object.getOwnPropertyDescriptor(W,N);Object.defineProperty(S,N,G.get?G:{enumerable:!0,get:()=>W[N]})}}return S.default=W,Object.freeze(S)}const l=ft(ut);var Ke={exports:{}},ke={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ot;function dt(){if(ot)return ke;ot=1;var W=H,S=Symbol.for("react.element"),N=Symbol.for("react.fragment"),G=Object.prototype.hasOwnProperty,fe=W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xe={key:!0,ref:!0,__self:!0,__source:!0};function de(X,E,q){var x,M={},$=null,he=null;q!==void 0&&($=""+q),E.key!==void 0&&($=""+E.key),E.ref!==void 0&&(he=E.ref);for(x in E)G.call(E,x)&&!xe.hasOwnProperty(x)&&(M[x]=E[x]);if(X&&X.defaultProps)for(x in E=X.defaultProps,E)M[x]===void 0&&(M[x]=E[x]);return{$$typeof:S,type:X,key:$,ref:he,props:M,_owner:fe.current}}return ke.Fragment=N,ke.jsx=de,ke.jsxs=de,ke}var Ae={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var st;function ht(){return st||(st=1,process.env.NODE_ENV!=="production"&&function(){var W=H,S=Symbol.for("react.element"),N=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),fe=Symbol.for("react.strict_mode"),xe=Symbol.for("react.profiler"),de=Symbol.for("react.provider"),X=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),he=Symbol.for("react.offscreen"),Fe=Symbol.iterator,Be="@@iterator";function Q(e){if(e===null||typeof e!="object")return null;var t=Fe&&e[Fe]||e[Be];return typeof t=="function"?t:null}var ee=W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(e){{for(var t=arguments.length,a=new Array(t>1?t-1:0),s=1;s<t;s++)a[s-1]=arguments[s];Ze("error",e,a)}}function Ze(e,t,a){{var s=ee.ReactDebugCurrentFrame,f=s.getStackAddendum();f!==""&&(t+="%s",a=a.concat([f]));var h=a.map(function(u){return String(u)});h.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,h)}}var Qe=!1,Ve=!1,Re=!1,R=!1,pe=!1,Ee;Ee=Symbol.for("react.module.reference");function lt(e){return!!(typeof e=="string"||typeof e=="function"||e===G||e===xe||pe||e===fe||e===q||e===x||R||e===he||Qe||Ve||Re||typeof e=="object"&&e!==null&&(e.$$typeof===$||e.$$typeof===M||e.$$typeof===de||e.$$typeof===X||e.$$typeof===E||e.$$typeof===Ee||e.getModuleId!==void 0))}function se(e,t,a){var s=e.displayName;if(s)return s;var f=t.displayName||t.name||"";return f!==""?a+"("+f+")":a}function te(e){return e.displayName||"Context"}function y(e){if(e==null)return null;if(typeof e.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case N:return"Portal";case xe:return"Profiler";case fe:return"StrictMode";case q:return"Suspense";case x:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case X:var t=e;return te(t)+".Consumer";case de:var a=e;return te(a._context)+".Provider";case E:return se(e,e.render,"ForwardRef");case M:var s=e.displayName||null;return s!==null?s:y(e.type)||"Memo";case $:{var f=e,h=f._payload,u=f._init;try{return y(u(h))}catch{return null}}}return null}var J=Object.assign,C=0,I,ce,K,ve,D,De,Pe;function _e(){}_e.__reactDisabledLog=!0;function Y(){{if(C===0){I=console.log,ce=console.info,K=console.warn,ve=console.error,D=console.group,De=console.groupCollapsed,Pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}C++}}function j(){{if(C--,C===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},e,{value:I}),info:J({},e,{value:ce}),warn:J({},e,{value:K}),error:J({},e,{value:ve}),group:J({},e,{value:D}),groupCollapsed:J({},e,{value:De}),groupEnd:J({},e,{value:Pe})})}C<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var p=ee.ReactCurrentDispatcher,Ue;function O(e,t,a){{if(Ue===void 0)try{throw Error()}catch(f){var s=f.stack.trim().match(/\n( *(at )?)/);Ue=s&&s[1]||""}return`
|
|
18
|
+
`+Ue+e}}var Le=!1,Me;{var et=typeof WeakMap=="function"?WeakMap:Map;Me=new et}function Z(e,t){if(!e||Le)return"";{var a=Me.get(e);if(a!==void 0)return a}var s;Le=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var h;h=p.current,p.current=null,Y();try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(F){s=F}Reflect.construct(e,[],u)}else{try{u.call()}catch(F){s=F}e.call(u.prototype)}}else{try{throw Error()}catch(F){s=F}e()}}catch(F){if(F&&s&&typeof F.stack=="string"){for(var d=F.stack.split(`
|
|
19
|
+
`),w=s.stack.split(`
|
|
20
|
+
`),m=d.length-1,b=w.length-1;m>=1&&b>=0&&d[m]!==w[b];)b--;for(;m>=1&&b>=0;m--,b--)if(d[m]!==w[b]){if(m!==1||b!==1)do if(m--,b--,b<0||d[m]!==w[b]){var U=`
|
|
21
|
+
`+d[m].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),typeof e=="function"&&Me.set(e,U),U}while(m>=1&&b>=0);break}}}finally{Le=!1,p.current=h,j(),Error.prepareStackTrace=f}var je=e?e.displayName||e.name:"",we=je?O(je):"";return typeof e=="function"&&Me.set(e,we),we}function tt(e,t,a){return Z(e,!1)}function rt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Te(e,t,a){if(e==null)return"";if(typeof e=="function")return Z(e,rt(e));if(typeof e=="string")return O(e);switch(e){case q:return O("Suspense");case x:return O("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case E:return tt(e.render);case M:return Te(e.type,t,a);case $:{var s=e,f=s._payload,h=s._init;try{return Te(h(f),t,a)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,We={},Ge=ee.ReactDebugCurrentFrame;function ge(e){if(e){var t=e._owner,a=Te(e.type,e._source,t?t.type:null);Ge.setExtraStackFrame(a)}else Ge.setExtraStackFrame(null)}function Se(e,t,a,s,f){{var h=Function.call.bind(me);for(var u in e)if(h(e,u)){var d=void 0;try{if(typeof e[u]!="function"){var w=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}d=e[u](t,u,s,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){d=m}d&&!(d instanceof Error)&&(ge(f),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",a,u,typeof d),ge(null)),d instanceof Error&&!(d.message in We)&&(We[d.message]=!0,ge(f),P("Failed %s type: %s",a,d.message),ge(null))}}}var re=Array.isArray;function ye(e){return re(e)}function nt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,a=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function Ne(e){try{return $e(e),!1}catch{return!0}}function $e(e){return""+e}function He(e){if(Ne(e))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nt(e)),$e(e)}var be=ee.ReactCurrentOwner,Oe={key:!0,ref:!0,__self:!0,__source:!0},ne,Ie;function le(e){if(me.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function at(e){if(me.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function ae(e,t){typeof e.ref=="string"&&be.current}function Xe(e,t){{var a=function(){ne||(ne=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function qe(e,t){{var a=function(){Ie||(Ie=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var Ye=function(e,t,a,s,f,h,u){var d={$$typeof:S,type:e,key:t,ref:a,props:u,_owner:h};return d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(d,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(d,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d};function Je(e,t,a,s,f){{var h,u={},d=null,w=null;a!==void 0&&(He(a),d=""+a),at(t)&&(He(t.key),d=""+t.key),le(t)&&(w=t.ref,ae(t,f));for(h in t)me.call(t,h)&&!Oe.hasOwnProperty(h)&&(u[h]=t[h]);if(e&&e.defaultProps){var m=e.defaultProps;for(h in m)u[h]===void 0&&(u[h]=m[h])}if(d||w){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;d&&Xe(u,b),w&&qe(u,b)}return Ye(e,d,w,f,s,be.current,u)}}var Ce=ee.ReactCurrentOwner,ze=ee.ReactDebugCurrentFrame;function ie(e){if(e){var t=e._owner,a=Te(e.type,e._source,t?t.type:null);ze.setExtraStackFrame(a)}else ze.setExtraStackFrame(null)}var r;r=!1;function n(e){return typeof e=="object"&&e!==null&&e.$$typeof===S}function o(){{if(Ce.current){var e=y(Ce.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function c(e){return""}var i={};function g(e){{var t=o();if(!t){var a=typeof e=="string"?e:e.displayName||e.name;a&&(t=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+a+">.")}return t}}function T(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=g(t);if(i[a])return;i[a]=!0;var s="";e&&e._owner&&e._owner!==Ce.current&&(s=" It was passed a child from "+y(e._owner.type)+"."),ie(e),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,s),ie(null)}}function v(e,t){{if(typeof e!="object")return;if(ye(e))for(var a=0;a<e.length;a++){var s=e[a];n(s)&&T(s,t)}else if(n(e))e._store&&(e._store.validated=!0);else if(e){var f=Q(e);if(typeof f=="function"&&f!==e.entries)for(var h=f.call(e),u;!(u=h.next()).done;)n(u.value)&&T(u.value,t)}}}function k(e){{var t=e.type;if(t==null||typeof t=="string")return;var a;if(typeof t=="function")a=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===E||t.$$typeof===M))a=t.propTypes;else return;if(a){var s=y(t);Se(a,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!r){r=!0;var f=y(t);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _(e){{for(var t=Object.keys(e.props),a=0;a<t.length;a++){var s=t[a];if(s!=="children"&&s!=="key"){ie(e),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),ie(null);break}}e.ref!==null&&(ie(e),P("Invalid attribute `ref` supplied to `React.Fragment`."),ie(null))}}var z={};function L(e,t,a,s,f,h){{var u=lt(e);if(!u){var d="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(d+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=c();w?d+=w:d+=o();var m;e===null?m="null":ye(e)?m="array":e!==void 0&&e.$$typeof===S?(m="<"+(y(e.type)||"Unknown")+" />",d=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,d)}var b=Je(e,t,a,f,h);if(b==null)return b;if(u){var U=t.children;if(U!==void 0)if(s)if(ye(U)){for(var je=0;je<U.length;je++)v(U[je],e);Object.freeze&&Object.freeze(U)}else P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(U,e)}if(me.call(t,"key")){var we=y(e),F=Object.keys(t).filter(function(mt){return mt!=="key"}),it=F.length>0?"{key: someKey, "+F.join(": ..., ")+": ...}":"{key: someKey}";if(!z[we+it]){var vt=F.length>0?"{"+F.join(": ..., ")+": ...}":"{}";P(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,at,ge,vt,ge),j[ge+at]=!0}}return e===y?le(x):V(x),x}}function U(e,t,r){return Y(e,t,r,!0)}function Xe(e,t,r){return Y(e,t,r,!1)}var qe=Xe,Je=U;Se.Fragment=y,Se.jsx=qe,Se.jsxs=Je}()),Se}process.env.NODE_ENV==="production"?Ke.exports=dt():Ke.exports=ht();var st=Ke.exports;const pt=({text:z="AI",particleCount:T=24e3,particleSize:$=.01,primaryColor:y={r:.396,g:.239,b:.82},secondaryColor:k={r:.537,g:.239,b:.82},backgroundColor:be="#000000",transparent:ue=!1,morphDuration:J=2.5,rotationSpeed:P=.4,hoverIntensity:K=.05,lightningIntensity:w=1,lightningColor:M=null,zapSpread:H=.7,zapWidth:fe=.02,cameraDistance:Oe=5.5,globeOpacity:Le=.08,globeColor:ee=null,showGlobe:te=!0,glowEffect:_=!0,className:Ze="",style:Qe={}})=>{const We=q.useRef(null),ye=q.useRef(null);return q.useRef([]),q.useEffect(()=>{const E=We.current;if(!E){console.error("ShapeParticleText: Canvas element not found");return}let de=!0;const xe=[];return(()=>{var $e,He;if(!de)return;const ie=new u.Scene,re=new u.PerspectiveCamera(50,E.offsetWidth/E.offsetHeight,.1,1e3);let g;try{const n={alpha:!0,antialias:!0,powerPreference:"default"},a=E.getContext("webgl2",n)||E.getContext("webgl",n)||E.getContext("experimental-webgl",n);if(!a){console.error("ShapeParticleText: WebGL not supported in this environment");return}const o=(c,i)=>{const m=Object.getOwnPropertyDescriptor(c,i);return m&&!m.writable&&!m.configurable};if(!a.getShaderPrecisionFormat._isPatched){const c=a.getShaderPrecisionFormat,i=function(...m){return{rangeMin:127,rangeMax:127,precision:23}};i._isPatched=!0,Object.defineProperty(a,"getShaderPrecisionFormat",{value:i,configurable:!0})}if(!a.getParameter._isPatched){const c=a.getParameter,i=function(...m){let O=null;try{O=c.apply(a,m)}catch{}const v=m[0];return O??(v===7938?"WebGL 1.0 (Three.js Mock)":v===35724?"WebGL GLSL ES 1.0 (Three.js Mock)":v===7936?"Three.js Mock Vendor":v===7937?"Three.js Mock Renderer":v===34921||v===34930||v===35657||v===35658?16:"")};i._isPatched=!0,Object.defineProperty(a,"getParameter",{value:i,configurable:!0})}if(!a.getExtension._isPatched){const c=a.getExtension,i=function(...m){let O=null;try{O=c.apply(a,m)}catch{}return O===null&&m[0]==="WEBGL_debug_renderer_info"?null:O};i._isPatched=!0,Object.defineProperty(a,"getExtension",{value:i,configurable:!0})}g=new u.WebGLRenderer({canvas:E,context:a,precision:"mediump",...n}),g.capabilities&&(g.capabilities.isWebGL2||(g.capabilities.isWebGL2=!0),g.capabilities.precision||(g.capabilities.precision="mediump"))}catch(n){console.warn("ShapeParticleText: Failed to initialize custom context renderer, attempting hard fallback...",n);try{g=new u.WebGLRenderer({canvas:E})}catch(a){console.error("ShapeParticleText: Fatal error initializing WebGL renderer:",a);return}}g.setSize(E.offsetWidth,E.offsetHeight),g.setPixelRatio(Math.min(window.devicePixelRatio,2)),g.setClearColor(0,0);let D=null;if(te){const n=new u.SphereGeometry(2,48,48);let a;ee?a=typeof ee=="string"?new u.Color(ee):new u.Color(ee.r,ee.g,ee.b):a=new u.Color(y.r,y.g,y.b);const o=new u.MeshBasicMaterial({color:a,wireframe:!0,transparent:!0,opacity:Le});D=new u.Mesh(n,o),ie.add(D)}const L=new u.Group,he=new Float32Array(T*3),W=new Float32Array(T*3),je=new Float32Array(T),we=[],Ee=[],G=[],S=[];let p=0;for(let n=0;n<T;n++){const a=n<T/2?-1:1,o=Math.random()*Math.PI,c=Math.random()*Math.PI*2,i=1.4+Math.random()*.3,m=1.2+Math.random()*.2,O=1+Math.random()*.2;let v=i*Math.sin(o)*Math.cos(c),A=m*Math.sin(o)*Math.sin(c),R=O*Math.cos(o);v=v*.85+a*.35;const B=(Math.sin(o*8)*Math.cos(c*6)+Math.sin(o*12)*Math.sin(c*8))*.12,V=Math.sqrt(v*v+A*A+R*R);V>.1&&(v+=B*(v/V),A+=B*(A/V),R+=B*(R/V));const le=Math.sqrt(v*v+A*A+R*R);if(le<1||le>2||a===-1&&v>-.15||a===1&&v<.15)continue;const j=new u.Vector3(v,A,R);j.x<0?we.push(j.clone()):Ee.push(j.clone()),he[p*3]=j.x,he[p*3+1]=j.y,he[p*3+2]=j.z,G.push(j.x,j.y,j.z);const Y=(A+m)/(m*2);if(Y<.3)W[p*3]=y.r*.5+Y*.4,W[p*3+1]=y.g*1+Y*.05,W[p*3+2]=y.b*1+Y*.05;else if(Y<.6){const U=(Y-.3)/.3;W[p*3]=(y.r*(1-U)+k.r*U)*1.1,W[p*3+1]=(y.g*(1-U)+k.g*U)*1.1,W[p*3+2]=(y.b*(1-U)+k.b*U)*1.1}else W[p*3]=k.r*1,W[p*3+1]=k.g*1,W[p*3+2]=k.b*1;je[p]=Math.random()*1.5+.8,p++}const I=((n,a=1.5)=>{const o=n&&n.trim().length>0?n:"AI",c=document.createElement("canvas"),i=c.getContext("2d");c.width=1024,c.height=512,i.fillStyle="white",i.textAlign="center",i.textBaseline="middle";let m=350;i.font=`bold ${m}px Arial`;const O=c.width*.85;let v=i.measureText(o);for(;(v.width>O||m>c.height*.7)&&m>20;)m-=10,i.font=`bold ${m}px Arial`,v=i.measureText(o);i.fillText(o,c.width/2,c.height/2);const A=i.getImageData(0,0,c.width,c.height),R=[],B=3,V=220;let le=1/0,j=-1/0,Y=1/0,U=-1/0;for(let r=0;r<c.height;r+=B)for(let s=0;s<c.width;s+=B){const h=(Math.floor(r)*c.width+Math.floor(s))*4;if(A.data[h+3]>160){const d=(s-c.width/2)/V*a,l=-(r-c.height/2)/V*a,f=(Math.random()-.5)*.25;R.push({x:d,y:l,z:f}),d<le&&(le=d),d>j&&(j=d),l<Y&&(Y=l),l>U&&(U=l)}}const Xe=j-le,qe=U-Y,Je=3.2,e=2.5;let t=1;return Xe>Je&&(t=Je/Xe),qe*t>e&&(t=e/qe),t<1&&R.forEach(r=>{r.x*=t,r.y*=t,r.z*=t}),R})(z,1.8);if(I.length>0)if(I.length>p){const n=I.length/p;for(let a=0;a<p;a++){const o=Math.floor(a*n),c=I[Math.min(o,I.length-1)];S.push(c.x,c.y,c.z)}}else for(let n=0;n<p;n++)if(n<I.length)S.push(I[n].x,I[n].y,I[n].z);else{const a=I[Math.floor(Math.random()*I.length)];S.push(a.x+(Math.random()-.5)*.5,a.y+(Math.random()-.5)*.5,a.z+(Math.random()-.5)*.3)}else for(let n=0;n<p;n++)S.push(0,0,0);const ke=he.slice(0,p*3),Ae=W.slice(0,p*3),Re=je.slice(0,p),X=new u.BufferGeometry;X.setAttribute("position",new u.BufferAttribute(ke,3)),X.setAttribute("color",new u.BufferAttribute(Ae,3)),X.setAttribute("size",new u.BufferAttribute(Re,1)),X.setDrawRange(0,p);const Pe=new u.PointsMaterial({size:$,vertexColors:!0,transparent:!0,opacity:1,blending:_?u.AdditiveBlending:u.NormalBlending,sizeAttenuation:!0}),et=new u.Points(X,Pe);L.add(et),ie.add(L);const Ge=new u.Color(k.r,k.g,k.b),tt=new u.LineBasicMaterial({color:Ge,transparent:!0,opacity:.2}),Ie=new u.Group,pe=we.length,oe=Ee.length;if(pe>0&&oe>0)for(let n=0;n<80;n++){const a=($e=we[Math.floor(Math.random()*pe)])==null?void 0:$e.clone(),o=(He=Ee[Math.floor(Math.random()*oe)])==null?void 0:He.clone();if(!a||!o)continue;const c=new u.BufferGeometry().setFromPoints([a,o]),i=new u.Line(c,tt);Ie.add(i)}L.add(Ie);const ve=new u.Group;L.add(ve);const Z=[];let se=0;const rt=6,Ye=n=>new u.Vector3((Math.random()-.5)*n,(Math.random()-.5)*n,(Math.random()-.5)*n),Ce=()=>{if(!de||!p)return;const n=Math.floor(Math.random()*p),a=Math.floor(Math.random()*p),o=X.attributes.position.array,c=new u.Vector3(o[n*3],o[n*3+1],o[n*3+2]),i=new u.Vector3(o[a*3],o[a*3+1],o[a*3+2]);if(c.lengthSq()<.1||i.lengthSq()<.1||c.distanceToSquared(i)<.5)return;const m=c.clone().lerp(i,.3).add(Ye(H)),O=c.clone().lerp(i,.7).add(Ye(H)),v=new u.CatmullRomCurve3([c,m,O,i]),A=new u.TubeGeometry(v,12,fe,4,!1);let R;M?M.r!==void 0?R=new u.Color(M.r,M.g,M.b):R=new u.Color(M):R=new u.Color().setHSL(.7+Math.random()*.08,1,.7+Math.random()*.15);const B=new u.MeshBasicMaterial({color:R,transparent:!0,opacity:.85,blending:u.AdditiveBlending}),V=new u.Mesh(A,B);ve.add(V),Z.push({line:V,material:B,life:0,maxLife:.5+Math.random()*.9,flickerSpeed:18+Math.random()*20,phase:Math.random()*Math.PI*2})},nt=new u.Clock;re.position.set(0,0,Oe);const _e={x:0,y:0},me={x:0,y:0},ne={x:0,y:0},Fe=n=>{if(!E)return;const a=E.getBoundingClientRect();_e.x=(n.clientX-a.left)/a.width*2-1,_e.y=-((n.clientY-a.top)/a.height)*2+1,me.y=_e.x*.3*(K/.05),me.x=_e.y*.2*(K/.05)};E.addEventListener("mousemove",Fe),xe.push(()=>{E.removeEventListener("mousemove",Fe)});let ce=0;const ze=.08;let Q=0,Be=1;const Ve=3;let De=Ve;function Ue(){if(!de)return;ye.current=requestAnimationFrame(Ue);const n=nt.getDelta();if(ce+=n,ne.x+=(me.x-ne.x)*.05,ne.y+=(me.y-ne.y)*.05,D&&(D.rotation.y+=n*.1,D.rotation.x=Math.sin(ce*.3)*.03),L.rotation.y=Math.sin(ce*.4)*P+ne.y,L.rotation.x=Math.sin(ce*.25)*ze+ne.x,L.rotation.z=Math.cos(ce*.15)*.015,De-=n,De<=0){Q+=n/J,Q>=1&&(Q=0,Be*=-1,De=Ve);const a=Q<.5?2*Q*Q:1-Math.pow(-2*Q+2,2)/2,o=X.attributes.position;for(let c=0;c<p;c++){const i=c*3;Be===1?(o.array[i]=G[i]+(S[i]-G[i])*a,o.array[i+1]=G[i+1]+(S[i+1]-G[i+1])*a,o.array[i+2]=G[i+2]+(S[i+2]-G[i+2])*a):(o.array[i]=S[i]+(G[i]-S[i])*a,o.array[i+1]=S[i+1]+(G[i+1]-S[i+1])*a,o.array[i+2]=S[i+2]+(G[i+2]-S[i+2])*a)}o.needsUpdate=!0}se-=n,w>0&&se<=0&&Z.length<rt*w&&(Ce(),se=(.12+Math.random()*.25)/Math.max(.1,w));for(let a=Z.length-1;a>=0;a--){const o=Z[a];if(!o||!o.material)continue;o.life+=n;const c=o.life/o.maxLife,i=Math.pow(Math.max(0,1-c),1.5),m=.6+Math.sin(ce*o.flickerSpeed+o.phase)*.4;o.material.opacity=Math.max(0,i*m*Math.min(1,w)),o.life>=o.maxLife&&(ve.remove(o.line),o.line.geometry&&o.line.geometry.dispose(),o.material&&o.material.dispose(),Z.splice(a,1))}g.render(ie,re)}Ue();const Ne=()=>{if(!de||!E)return;const n=E.offsetWidth,a=E.offsetHeight;n===0||a===0||(re.aspect=n/a,re.updateProjectionMatrix(),g.setSize(n,a),g.setPixelRatio(Math.min(window.devicePixelRatio*1.5,3)))};window.addEventListener("resize",Ne),xe.push(()=>{window.removeEventListener("resize",Ne),Z.forEach(n=>{n.line&&(ve.remove(n.line),n.line.geometry&&n.line.geometry.dispose(),n.material&&n.material.dispose())}),Z.length=0,ie.traverse(n=>{n.geometry&&n.geometry.dispose(),n.material&&(Array.isArray(n.material)?n.material.forEach(a=>a.dispose()):n.material.dispose())}),g.dispose()})})(),()=>{de=!1,ye.current&&(cancelAnimationFrame(ye.current),ye.current=null),xe.forEach(ie=>{try{ie()}catch(re){console.error("Cleanup error:",re)}})}},[z,T,$,y,k,J,P,K,w,M,H,fe,Oe,Le,ee,te,_]),st.jsx("div",{className:Ze,style:{position:"relative",width:"100%",height:"100%",backgroundColor:ue?"transparent":be,...Qe},children:st.jsx("canvas",{ref:We,style:{display:"block",width:"100%",height:"100%",outline:"none"}})})};ae.ShapeParticleText=pt,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});
|
|
30
|
+
<%s key={someKey} {...props} />`,it,we,vt,we),z[we+it]=!0}}return e===G?_(b):k(b),b}}function ue(e,t,a){return L(e,t,a,!0)}function A(e,t,a){return L(e,t,a,!1)}var B=A,V=ue;Ae.Fragment=G,Ae.jsx=B,Ae.jsxs=V}()),Ae}process.env.NODE_ENV==="production"?Ke.exports=dt():Ke.exports=ht();var ct=Ke.exports;const pt=({text:W="AI",particleCount:S=24e3,particleSize:N=.01,primaryColor:G={r:.396,g:.239,b:.82},secondaryColor:fe={r:.537,g:.239,b:.82},backgroundColor:xe="#000000",transparent:de=!1,morphDuration:X=2.5,rotationSpeed:E=.4,hoverIntensity:q=.05,lightningIntensity:x=1,lightningColor:M=null,zapSpread:$=.7,zapWidth:he=.02,cameraDistance:Fe=5.5,globeOpacity:Be=.08,globeColor:Q=null,showGlobe:ee=!0,glowEffect:P=!0,className:Ze="",style:Qe={}})=>{const Ve=H.useRef(null),Re=H.useRef(null);return H.useRef([]),H.useEffect(()=>{const R=Ve.current;if(!R){console.error("ShapeParticleText: Canvas element not found");return}let pe=!0;const Ee=[];return(()=>{var ze,ie;if(!pe)return;const se=new l.Scene,te=new l.PerspectiveCamera(50,R.offsetWidth/R.offsetHeight,.1,1e3);let y;try{const r={alpha:!0,antialias:!0,powerPreference:"default"},n=R.getContext("webgl2",r)||R.getContext("webgl",r)||R.getContext("experimental-webgl",r);if(!n){console.error("ShapeParticleText: WebGL not supported in this environment");return}const o=(c,i)=>{const g=Object.getOwnPropertyDescriptor(c,i);return g&&!g.writable&&!g.configurable};if(!n.getShaderPrecisionFormat._isPatched){const c=n.getShaderPrecisionFormat,i=function(...g){return{rangeMin:127,rangeMax:127,precision:23}};i._isPatched=!0,Object.defineProperty(n,"getShaderPrecisionFormat",{value:i,configurable:!0})}if(!n.getParameter._isPatched){const c=n.getParameter,i=function(...g){let T=null;try{T=c.apply(n,g)}catch{}const v=g[0];return T??(v===7938?"WebGL 1.0 (Three.js Mock)":v===35724?"WebGL GLSL ES 1.0 (Three.js Mock)":v===7936?"Three.js Mock Vendor":v===7937?"Three.js Mock Renderer":v===34921||v===34930||v===35657||v===35658?16:"")};i._isPatched=!0,Object.defineProperty(n,"getParameter",{value:i,configurable:!0})}if(!n.getExtension._isPatched){const c=n.getExtension,i=function(...g){let T=null;try{T=c.apply(n,g)}catch{}return T===null&&g[0]==="WEBGL_debug_renderer_info"?null:T};i._isPatched=!0,Object.defineProperty(n,"getExtension",{value:i,configurable:!0})}y=new l.WebGLRenderer({canvas:R,context:n,precision:"mediump",...r}),y.capabilities&&(y.capabilities.isWebGL2||(y.capabilities.isWebGL2=!0),y.capabilities.precision||(y.capabilities.precision="mediump"))}catch(r){console.warn("ShapeParticleText: Failed to initialize custom context renderer, attempting hard fallback...",r);try{y=new l.WebGLRenderer({canvas:R})}catch(n){console.error("ShapeParticleText: Fatal error initializing WebGL renderer:",n);return}}y.setSize(R.offsetWidth,R.offsetHeight),y.setPixelRatio(Math.min(window.devicePixelRatio,2)),y.setClearColor(0,0);const J=(r,n)=>{if(!r)return n;if(typeof r=="string"){const o=new l.Color(r);return{r:o.r,g:o.g,b:o.b}}return typeof r=="object"&&typeof r.r=="number"?r:n},C=J(G,{r:.396,g:.239,b:.82}),I=J(fe,{r:.537,g:.239,b:.82});let ce=null;if(ee){const r=new l.SphereGeometry(2,48,48);let n;Q?n=typeof Q=="string"?new l.Color(Q):new l.Color(Q.r,Q.g,Q.b):n=new l.Color(C.r,C.g,C.b);const o=new l.MeshBasicMaterial({color:n,wireframe:!0,transparent:!0,opacity:Be});ce=new l.Mesh(r,o),se.add(ce)}const K=new l.Group,ve=new Float32Array(S*3),D=new Float32Array(S*3),De=new Float32Array(S),Pe=[],_e=[],Y=[],j=[];let p=0;for(let r=0;r<S;r++){const n=r<S/2?-1:1,o=Math.random()*Math.PI,c=Math.random()*Math.PI*2,i=1.4+Math.random()*.3,g=1.2+Math.random()*.2,T=1+Math.random()*.2;let v=i*Math.sin(o)*Math.cos(c),k=g*Math.sin(o)*Math.sin(c),_=T*Math.cos(o);v=v*.85+n*.35;const z=(Math.sin(o*8)*Math.cos(c*6)+Math.sin(o*12)*Math.sin(c*8))*.12,L=Math.sqrt(v*v+k*k+_*_);L>.1&&(v+=z*(v/L),k+=z*(k/L),_+=z*(_/L));const ue=Math.sqrt(v*v+k*k+_*_);if(ue<1||ue>2||n===-1&&v>-.15||n===1&&v<.15)continue;const A=new l.Vector3(v,k,_);A.x<0?Pe.push(A.clone()):_e.push(A.clone()),ve[p*3]=A.x,ve[p*3+1]=A.y,ve[p*3+2]=A.z,Y.push(A.x,A.y,A.z);const B=(k+g)/(g*2);if(B<.3)D[p*3]=C.r*.5+B*.4,D[p*3+1]=C.g*1+B*.05,D[p*3+2]=C.b*1+B*.05;else if(B<.6){const V=(B-.3)/.3;D[p*3]=(C.r*(1-V)+I.r*V)*1.1,D[p*3+1]=(C.g*(1-V)+I.g*V)*1.1,D[p*3+2]=(C.b*(1-V)+I.b*V)*1.1}else D[p*3]=I.r*1,D[p*3+1]=I.g*1,D[p*3+2]=I.b*1;De[p]=Math.random()*1.5+.8,p++}const O=((r,n=1.5)=>{const o=r&&r.trim().length>0?r:"AI",c=document.createElement("canvas"),i=c.getContext("2d");c.width=1024,c.height=512,i.fillStyle="white",i.textAlign="center",i.textBaseline="middle";let g=350;i.font=`bold ${g}px Arial`;const T=c.width*.85;let v=i.measureText(o);for(;(v.width>T||g>c.height*.7)&&g>20;)g-=10,i.font=`bold ${g}px Arial`,v=i.measureText(o);i.fillText(o,c.width/2,c.height/2);const k=i.getImageData(0,0,c.width,c.height),_=[],z=3,L=220;let ue=1/0,A=-1/0,B=1/0,V=-1/0;for(let h=0;h<c.height;h+=z)for(let u=0;u<c.width;u+=z){const d=(Math.floor(h)*c.width+Math.floor(u))*4;if(k.data[d+3]>160){const w=(u-c.width/2)/L*n,m=-(h-c.height/2)/L*n,b=(Math.random()-.5)*.25;_.push({x:w,y:m,z:b}),w<ue&&(ue=w),w>A&&(A=w),m<B&&(B=m),m>V&&(V=m)}}const e=A-ue,t=V-B,a=3.2,s=2.5;let f=1;return e>a&&(f=a/e),t*f>s&&(f=s/t),f<1&&_.forEach(h=>{h.x*=f,h.y*=f,h.z*=f}),_})(W,1.8);if(O.length>0)if(O.length>p){const r=O.length/p;for(let n=0;n<p;n++){const o=Math.floor(n*r),c=O[Math.min(o,O.length-1)];j.push(c.x,c.y,c.z)}}else for(let r=0;r<p;r++)if(r<O.length)j.push(O[r].x,O[r].y,O[r].z);else{const n=O[Math.floor(Math.random()*O.length)];j.push(n.x+(Math.random()-.5)*.5,n.y+(Math.random()-.5)*.5,n.z+(Math.random()-.5)*.3)}else for(let r=0;r<p;r++)j.push(0,0,0);const Le=ve.slice(0,p*3),Me=D.slice(0,p*3),et=De.slice(0,p),Z=new l.BufferGeometry;Z.setAttribute("position",new l.BufferAttribute(Le,3)),Z.setAttribute("color",new l.BufferAttribute(Me,3)),Z.setAttribute("size",new l.BufferAttribute(et,1)),Z.setDrawRange(0,p);const tt=new l.PointsMaterial({size:N,vertexColors:!0,transparent:!0,opacity:1,blending:P?l.AdditiveBlending:l.NormalBlending,sizeAttenuation:!0}),rt=new l.Points(Z,tt);K.add(rt),se.add(K);const Te=new l.Color(I.r,I.g,I.b),me=new l.LineBasicMaterial({color:Te,transparent:!0,opacity:.2}),We=new l.Group,Ge=Pe.length,ge=_e.length;if(Ge>0&&ge>0)for(let r=0;r<80;r++){const n=(ze=Pe[Math.floor(Math.random()*Ge)])==null?void 0:ze.clone(),o=(ie=_e[Math.floor(Math.random()*ge)])==null?void 0:ie.clone();if(!n||!o)continue;const c=new l.BufferGeometry().setFromPoints([n,o]),i=new l.Line(c,me);We.add(i)}K.add(We);const Se=new l.Group;K.add(Se);const re=[];let ye=0;const nt=6,Ne=r=>new l.Vector3((Math.random()-.5)*r,(Math.random()-.5)*r,(Math.random()-.5)*r),$e=()=>{if(!pe||!p)return;const r=Math.floor(Math.random()*p),n=Math.floor(Math.random()*p),o=Z.attributes.position.array,c=new l.Vector3(o[r*3],o[r*3+1],o[r*3+2]),i=new l.Vector3(o[n*3],o[n*3+1],o[n*3+2]);if(c.lengthSq()<.1||i.lengthSq()<.1||c.distanceToSquared(i)<.5)return;const g=c.clone().lerp(i,.3).add(Ne($)),T=c.clone().lerp(i,.7).add(Ne($)),v=new l.CatmullRomCurve3([c,g,T,i]),k=new l.TubeGeometry(v,12,he,4,!1);let _;M?M.r!==void 0?_=new l.Color(M.r,M.g,M.b):_=new l.Color(M):_=new l.Color().setHSL(.7+Math.random()*.08,1,.7+Math.random()*.15);const z=new l.MeshBasicMaterial({color:_,transparent:!0,opacity:.85,blending:l.AdditiveBlending}),L=new l.Mesh(k,z);Se.add(L),re.push({line:L,material:z,life:0,maxLife:.5+Math.random()*.9,flickerSpeed:18+Math.random()*20,phase:Math.random()*Math.PI*2})},He=new l.Clock;te.position.set(0,0,Fe);const be={x:0,y:0},Oe={x:0,y:0},ne={x:0,y:0},Ie=r=>{if(!R)return;const n=R.getBoundingClientRect();be.x=(r.clientX-n.left)/n.width*2-1,be.y=-((r.clientY-n.top)/n.height)*2+1,Oe.y=be.x*.3*(q/.05),Oe.x=be.y*.2*(q/.05)};R.addEventListener("mousemove",Ie),Ee.push(()=>{R.removeEventListener("mousemove",Ie)});let le=0;const at=.08;let ae=0,Xe=1;const qe=3;let Ye=qe;function Je(){if(!pe)return;Re.current=requestAnimationFrame(Je);const r=He.getDelta();if(le+=r,ne.x+=(Oe.x-ne.x)*.05,ne.y+=(Oe.y-ne.y)*.05,ce&&(ce.rotation.y+=r*.1,ce.rotation.x=Math.sin(le*.3)*.03),K.rotation.y=Math.sin(le*.4)*E+ne.y,K.rotation.x=Math.sin(le*.25)*at+ne.x,K.rotation.z=Math.cos(le*.15)*.015,Ye-=r,Ye<=0){ae+=r/X,ae>=1&&(ae=0,Xe*=-1,Ye=qe);const n=ae<.5?2*ae*ae:1-Math.pow(-2*ae+2,2)/2,o=Z.attributes.position;for(let c=0;c<p;c++){const i=c*3;Xe===1?(o.array[i]=Y[i]+(j[i]-Y[i])*n,o.array[i+1]=Y[i+1]+(j[i+1]-Y[i+1])*n,o.array[i+2]=Y[i+2]+(j[i+2]-Y[i+2])*n):(o.array[i]=j[i]+(Y[i]-j[i])*n,o.array[i+1]=j[i+1]+(Y[i+1]-j[i+1])*n,o.array[i+2]=j[i+2]+(Y[i+2]-j[i+2])*n)}o.needsUpdate=!0}ye-=r,x>0&&ye<=0&&re.length<nt*x&&($e(),ye=(.12+Math.random()*.25)/Math.max(.1,x));for(let n=re.length-1;n>=0;n--){const o=re[n];if(!o||!o.material)continue;o.life+=r;const c=o.life/o.maxLife,i=Math.pow(Math.max(0,1-c),1.5),g=.6+Math.sin(le*o.flickerSpeed+o.phase)*.4;o.material.opacity=Math.max(0,i*g*Math.min(1,x)),o.life>=o.maxLife&&(Se.remove(o.line),o.line.geometry&&o.line.geometry.dispose(),o.material&&o.material.dispose(),re.splice(n,1))}y.render(se,te)}Je();const Ce=()=>{if(!pe||!R)return;const r=R.offsetWidth,n=R.offsetHeight;r===0||n===0||(te.aspect=r/n,te.updateProjectionMatrix(),y.setSize(r,n),y.setPixelRatio(Math.min(window.devicePixelRatio*1.5,3)))};window.addEventListener("resize",Ce),Ee.push(()=>{window.removeEventListener("resize",Ce),re.forEach(r=>{r.line&&(Se.remove(r.line),r.line.geometry&&r.line.geometry.dispose(),r.material&&r.material.dispose())}),re.length=0,se.traverse(r=>{r.geometry&&r.geometry.dispose(),r.material&&(Array.isArray(r.material)?r.material.forEach(n=>n.dispose()):r.material.dispose())}),y.dispose()})})(),()=>{pe=!1,Re.current&&(cancelAnimationFrame(Re.current),Re.current=null),Ee.forEach(se=>{try{se()}catch(te){console.error("Cleanup error:",te)}})}},[W,S,N,G,fe,X,E,q,x,M,$,he,Fe,Be,Q,ee,P]),ct.jsx("div",{className:Ze,style:{position:"relative",width:"100%",height:"100%",backgroundColor:de?"transparent":xe,...Qe},children:ct.jsx("canvas",{ref:Ve,style:{display:"block",width:"100%",height:"100%",outline:"none"}})})};oe.ShapeParticleText=pt,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
|
|
3
|
+
export type RGBColor = { r: number; g: number; b: number }
|
|
4
|
+
|
|
5
|
+
export type Color = string | RGBColor
|
|
6
|
+
|
|
7
|
+
export interface ShapeParticleTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
text?: string
|
|
9
|
+
particleCount?: number
|
|
10
|
+
particleSize?: number
|
|
11
|
+
primaryColor?: Color
|
|
12
|
+
secondaryColor?: Color
|
|
13
|
+
backgroundColor?: string
|
|
14
|
+
transparent?: boolean
|
|
15
|
+
morphDuration?: number
|
|
16
|
+
rotationSpeed?: number
|
|
17
|
+
hoverIntensity?: number
|
|
18
|
+
lightningIntensity?: number
|
|
19
|
+
lightningColor?: Color | null
|
|
20
|
+
zapSpread?: number
|
|
21
|
+
zapWidth?: number
|
|
22
|
+
cameraDistance?: number
|
|
23
|
+
globeOpacity?: number
|
|
24
|
+
globeColor?: Color | null
|
|
25
|
+
showGlobe?: boolean
|
|
26
|
+
glowEffect?: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const ShapeParticleText: React.FC<ShapeParticleTextProps>
|
|
30
|
+
|
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "3d-shape-particle-text",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Interactive 3D particle system morphing between brain shape and text, with lightning effects and full customization.",
|
|
5
5
|
"main": "dist/3d-shape-particle-text.umd.js",
|
|
6
6
|
"module": "dist/3d-shape-particle-text.es.js",
|
|
7
|
+
"types": "index.d.ts",
|
|
7
8
|
"files": [
|
|
8
9
|
"dist",
|
|
10
|
+
"index.d.ts",
|
|
9
11
|
"README.md",
|
|
10
12
|
"LICENSE"
|
|
11
13
|
],
|
|
12
14
|
"exports": {
|
|
13
15
|
".": {
|
|
16
|
+
"types": "./index.d.ts",
|
|
14
17
|
"import": "./dist/3d-shape-particle-text.es.js",
|
|
15
18
|
"require": "./dist/3d-shape-particle-text.umd.js"
|
|
16
19
|
}
|
|
@@ -41,15 +44,15 @@
|
|
|
41
44
|
"license": "MIT",
|
|
42
45
|
"repository": {
|
|
43
46
|
"type": "git",
|
|
44
|
-
"url": "https://github.com/mukes555/3d-shape-particle-text"
|
|
47
|
+
"url": "git+https://github.com/mukes555/3d-shape-particle-text.git"
|
|
45
48
|
},
|
|
46
49
|
"bugs": {
|
|
47
50
|
"url": "https://github.com/mukes555/3d-shape-particle-text/issues"
|
|
48
51
|
},
|
|
49
52
|
"homepage": "https://github.com/mukes555/3d-shape-particle-text#readme",
|
|
50
53
|
"peerDependencies": {
|
|
51
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
52
|
-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
54
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
55
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
56
|
"three": "^0.128.0 || ^0.130.0 || ^0.140.0 || ^0.150.0 || ^0.160.0"
|
|
54
57
|
},
|
|
55
58
|
"devDependencies": {
|