masoneffect 0.1.10 → 0.1.11

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.
Files changed (2) hide show
  1. package/README.md +56 -56
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # MasonEffect
2
2
 
3
- 파티클 모핑 효과를 제공하는 라이브러리입니다. React, Vue, 그리고 바닐라 JavaScript에서 사용할 수 있습니다.
3
+ A library that provides particle morphing effects. It can be used with React, Vue, and vanilla JavaScript.
4
4
 
5
- ## 설치
5
+ ## Installation
6
6
 
7
7
  ```bash
8
8
  npm install masoneffect
9
9
  ```
10
10
 
11
- ## 사용법
11
+ ## Usage
12
12
 
13
- ### 바닐라 JavaScript
13
+ ### Vanilla JavaScript
14
14
 
15
15
  ```javascript
16
16
  import { MasonEffect } from 'masoneffect';
@@ -22,17 +22,17 @@ const effect = new MasonEffect(container, {
22
22
  maxParticles: 2000,
23
23
  });
24
24
 
25
- // 텍스트 변경
25
+ // Change text
26
26
  effect.morph('New Text');
27
27
 
28
- // 텍스트와 함께 다른 속성도 변경
28
+ // Change text along with other properties
29
29
  effect.morph({
30
30
  text: 'New Text',
31
31
  particleColor: '#ff00ff',
32
32
  maxParticles: 3000,
33
33
  });
34
34
 
35
- // 파티클을 초기 위치로 돌아가기
35
+ // Return particles to initial position
36
36
  effect.scatter();
37
37
  ```
38
38
 
@@ -78,7 +78,7 @@ function App() {
78
78
  }
79
79
  ```
80
80
 
81
- **⚠️ 주의**: React 컴포넌트 사용 컨테이너에 명시적인 크기를 지정해야 합니다. 자세한 내용은 [React 문제 해결 가이드](./REACT_TROUBLESHOOTING.md)를 참고하세요.
81
+ **⚠️ Note**: When using the React component, you must specify an explicit size for the container. For more details, see the [React Troubleshooting Guide](./REACT_TROUBLESHOOTING.md).
82
82
 
83
83
  ### Vue 3
84
84
 
@@ -128,37 +128,37 @@ const onReady = (instance) => {
128
128
 
129
129
  ## API
130
130
 
131
- ### 옵션
132
-
133
- | 옵션 | 타입 | 기본값 | 설명 |
134
- |------|------|--------|------|
135
- | `text` | `string` | `'mason effect'` | 표시할 텍스트 |
136
- | `densityStep` | `number` | `2` | 파티클 샘플링 밀도 (작을수록 촘촘함) |
137
- | `maxParticles` | `number` | `3200` | 최대 파티클 |
138
- | `pointSize` | `number` | `0.5` | 파티클 크기 |
139
- | `ease` | `number` | `0.05` | 이동 가속도 |
140
- | `repelRadius` | `number` | `150` | 마우스 반발 범위 |
141
- | `repelStrength` | `number` | `1` | 마우스 반발 세기 |
142
- | `particleColor` | `string` | `'#fff'` | 파티클 색상 |
143
- | `fontFamily` | `string` | `'Inter, system-ui, Arial'` | 폰트 패밀리 |
144
- | `fontSize` | `number \| null` | `null` | 폰트 크기 (null이면 자동) |
145
- | `width` | `number \| null` | `null` | 캔버스 너비 (null이면 컨테이너 크기) |
146
- | `height` | `number \| null` | `null` | 캔버스 높이 (null이면 컨테이너 크기) |
147
- | `devicePixelRatio` | `number \| null` | `null` | 디바이스 픽셀 비율 (null이면 자동) |
148
- | `onReady` | `function` | `null` | 초기화 완료 콜백 |
149
- | `onUpdate` | `function` | `null` | 업데이트 콜백 |
150
-
151
- ### 메서드
131
+ ### Options
132
+
133
+ | Option | Type | Default | Description |
134
+ |--------|------|---------|-------------|
135
+ | `text` | `string` | `'mason effect'` | Text to display |
136
+ | `densityStep` | `number` | `2` | Particle sampling density (smaller = denser) |
137
+ | `maxParticles` | `number` | `3200` | Maximum number of particles |
138
+ | `pointSize` | `number` | `0.5` | Particle point size |
139
+ | `ease` | `number` | `0.05` | Movement acceleration |
140
+ | `repelRadius` | `number` | `150` | Mouse repel radius |
141
+ | `repelStrength` | `number` | `1` | Mouse repel strength |
142
+ | `particleColor` | `string` | `'#fff'` | Particle color |
143
+ | `fontFamily` | `string` | `'Inter, system-ui, Arial'` | Font family |
144
+ | `fontSize` | `number \| null` | `null` | Font size (auto if null) |
145
+ | `width` | `number \| null` | `null` | Canvas width (container size if null) |
146
+ | `height` | `number \| null` | `null` | Canvas height (container size if null) |
147
+ | `devicePixelRatio` | `number \| null` | `null` | Device pixel ratio (auto if null) |
148
+ | `onReady` | `function` | `null` | Initialization complete callback |
149
+ | `onUpdate` | `function` | `null` | Update callback |
150
+
151
+ ### Methods
152
152
 
153
153
  #### `morph(textOrOptions?: string | Partial<MasonEffectOptions>)`
154
- 텍스트 형태로 파티클을 모핑합니다.
154
+ Morphs particles into text form.
155
155
 
156
- **문자열 사용:**
156
+ **Using string:**
157
157
  ```javascript
158
158
  effect.morph('New Text');
159
159
  ```
160
160
 
161
- **객체 사용 (텍스트와 함께 다른 속성도 변경):**
161
+ **Using object (change text along with other properties):**
162
162
  ```javascript
163
163
  effect.morph({
164
164
  text: 'New Text',
@@ -170,51 +170,51 @@ effect.morph({
170
170
  ```
171
171
 
172
172
  #### `scatter()`
173
- 파티클을 초기 위치로 돌아가게 합니다. 파티클이 처음 생성되었을 때의 위치로 복귀합니다.
173
+ Returns particles to their initial position. Each particle returns to the position where it was first created.
174
174
 
175
175
  #### `updateConfig(config: Partial<MasonEffectOptions>)`
176
- 설정을 업데이트합니다.
176
+ Updates the configuration.
177
177
 
178
178
  #### `destroy()`
179
- 인스턴스를 파괴하고 리소스를 정리합니다.
179
+ Destroys the instance and cleans up resources.
180
180
 
181
- ## 특징
181
+ ## Features
182
182
 
183
- - 🎨 텍스트를 파티클로 변환하는 모핑 효과
184
- - 🖱️ 마우스 인터랙션 지원 (반발/흡입)
185
- - 📱 반응형 디자인
186
- - ⚡ 고성능 Canvas 렌더링
187
- - 🔧 React, Vue, 바닐라 JS 모두 지원
188
- - 🎯 TypeScript 타입 정의 포함
189
- - 💾 프로덕션 빌드 자동 난독화 최적화
190
- - 🔄 초기 위치로 복귀하는 scatter 효과
183
+ - 🎨 Morphing effect that converts text into particles
184
+ - 🖱️ Mouse interaction support (repel/attract)
185
+ - 📱 Responsive design
186
+ - ⚡ High-performance Canvas rendering
187
+ - 🔧 Supports React, Vue, and vanilla JS
188
+ - 🎯 Includes TypeScript type definitions
189
+ - 💾 Automatic obfuscation and optimization in production builds
190
+ - 🔄 Scatter effect that returns to initial position
191
191
 
192
- ## 개발
192
+ ## Development
193
193
 
194
194
  ```bash
195
- # 의존성 설치
195
+ # Install dependencies
196
196
  npm install
197
197
 
198
- # 개발 모드 (watch)
198
+ # Development mode (watch)
199
199
  npm run dev
200
200
 
201
- # 빌드 (프로덕션용 min 파일 생성)
201
+ # Build (generate production min files)
202
202
  npm run build
203
203
 
204
- # 예제 테스트 서버
204
+ # Example test server
205
205
  npm run serve
206
206
  ```
207
207
 
208
- ## 빌드 결과물
208
+ ## Build Output
209
209
 
210
- 빌드를 실행하면 다음 파일들이 생성됩니다:
210
+ Running the build will generate the following files:
211
211
 
212
- - **개발용**: `dist/index.js`, `dist/index.esm.js` (소스맵 포함)
213
- - **프로덕션용**: `dist/index.min.js`, `dist/index.esm.min.js` (난독화 최적화)
214
- - **React 컴포넌트**: `dist/react/MasonEffect.min.js` (난독화)
212
+ - **Development**: `dist/index.js`, `dist/index.esm.js` (with source maps)
213
+ - **Production**: `dist/index.min.js`, `dist/index.esm.min.js` (obfuscated and optimized)
214
+ - **React component**: `dist/react/MasonEffect.min.js` (obfuscated)
215
215
 
216
- npm으로 설치하면 자동으로 min 파일이 사용됩니다. 자세한 내용은 [빌드 가이드](./BUILD.md)를 참고하세요.
216
+ When installed via npm, min files are automatically used. For more details, see the [Build Guide](./BUILD.md).
217
217
 
218
- ## 라이선스
218
+ ## License
219
219
 
220
220
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "masoneffect",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "파티클 모핑 효과를 제공하는 라이브러리 - React, Vue, 바닐라 JS 지원",
5
5
  "main": "dist/index.min.js",
6
6
  "module": "dist/index.esm.min.js",