anime-cursor 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +36 -24
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # AnimeCursor
2
2
 
3
3
  <div align="center">
4
- <img src="title.gif" width="60%" alt="AnimeCursor"/>
4
+ <img src="https://cdn.jsdelivr.net/gh/shuninyu/anime-cursor@main/title.gif" width="60%" alt="AnimeCursor"/>
5
5
  </div>
6
6
 
7
- [[简体中文]](#SChinese)
7
+ [[简体中文]](#animecursorsc)
8
8
 
9
9
  AnimeCursor is a lightweight animated cursor JS library that enables dynamic mouse pointers for websites.
10
10
 
@@ -21,18 +21,30 @@ AnimeCursor has no dependencies on any frameworks, making it suitable for person
21
21
  * Prepare PNG sprite sheets in the correct format, and AnimeCursor will automatically generate cursor animations based on your settings
22
22
  * Built with native JavaScript, no third-party dependencies
23
23
 
24
- ---
25
-
26
24
  ## 📦 Installation
27
25
 
26
+ ### jsDeliver
27
+
28
+ ```html
29
+ <script src="https://cdn.jsdelivr.net/npm/anime-cursor/dist/anime-cursor.umd.min.js"></script>
30
+ ```
31
+
32
+ ### npm
33
+
34
+ ```bash
35
+ npm i anime-cursor
36
+ ```
37
+ ```js
38
+ import AnimeCursor from 'anime-cursor';
39
+ new AnimeCursor({...});
40
+ ```
41
+
28
42
  ### Local storage
29
43
 
30
44
  ```html
31
45
  <script src="anime-cursor.umd.min.js"></script>
32
46
  ```
33
47
 
34
- ---
35
-
36
48
  ## 🚀 Basic Usage
37
49
 
38
50
  Here is an example of how to use AnimeCursor:
@@ -61,8 +73,6 @@ new AnimeCursor({
61
73
  </script>
62
74
  ```
63
75
 
64
- ---
65
-
66
76
  ## ⚙️ Configuration Options
67
77
 
68
78
  ### `cursors` (Required)
@@ -101,8 +111,6 @@ Enables animated cursors on mobile touch devices.
101
111
  AnimeCursor automatically detects mobile touch devices (e.g., phones, tablets) and disables animated cursors on them by default.
102
112
  If you want animated cursors to be displayed on these devices, add `enableTouch: true`.
103
113
 
104
- ---
105
-
106
114
  ## 📝 Notes
107
115
 
108
116
  ### 📁 Files
@@ -145,8 +153,6 @@ If `duration` is not set, the cursor will be treated as a **static cursor**, eve
145
153
  * GIFs do not use `frames`, `duration`, or `pingpong`
146
154
  * Animation is controlled by the GIF file itself
147
155
 
148
- ---
149
-
150
156
  ## ❌ Error Handling
151
157
 
152
158
  * Missing required configuration parameters will directly terminate initialization.
@@ -154,10 +160,10 @@ If `duration` is not set, the cursor will be treated as a **static cursor**, eve
154
160
  * All errors are prefixed with `[AnimeCursor]` when logged to the console.
155
161
 
156
162
  ---
157
- <h1 id="SChinese">AnimeCursor</h1>
163
+ # AnimeCursor(SC)
158
164
 
159
165
  <div align="center">
160
- <img src="title.gif" width="60%" alt="AnimeCursor"/>
166
+ <img src="https://cdn.jsdelivr.net/gh/shuninyu/anime-cursor@main/title.gif" width="60%" alt="AnimeCursor"/>
161
167
  </div>
162
168
 
163
169
  AnimeCursor 是一个轻量级动画光标JS,能够让网站拥有动态的鼠标指针。
@@ -175,9 +181,23 @@ AnimeCursor 无需依赖任何框架,适合个人网站、创意作品集以
175
181
  * 按照格式准备好 PNG 精灵图表,AnimeCursor 将基于你的设置自动生成光标动画
176
182
  * 基于原生JavaScript,无任何第三方依赖
177
183
 
178
- ---
184
+ ## 📦 部署方法
185
+
186
+ ### jsDeliver
179
187
 
180
- ## 📦 引入方式
188
+ ```html
189
+ <script src="https://cdn.jsdelivr.net/npm/anime-cursor/dist/anime-cursor.umd.min.js"></script>
190
+ ```
191
+
192
+ ### npm
193
+
194
+ ```bash
195
+ npm i anime-cursor
196
+ ```
197
+ ```js
198
+ import AnimeCursor from 'anime-cursor';
199
+ new AnimeCursor({...});
200
+ ```
181
201
 
182
202
  ### 本地部署
183
203
 
@@ -185,8 +205,6 @@ AnimeCursor 无需依赖任何框架,适合个人网站、创意作品集以
185
205
  <script src="anime-cursor.umd.min.js"></script>
186
206
  ```
187
207
 
188
- ---
189
-
190
208
  ## 🚀 基础用法
191
209
 
192
210
  下面是一个 AnimeCursor 使用示例:
@@ -214,8 +232,6 @@ new AnimeCursor({
214
232
  </script>
215
233
  ```
216
234
 
217
- ---
218
-
219
235
  ## ⚙️ 配置项说明
220
236
 
221
237
  ### `cursors`(必填)
@@ -254,8 +270,6 @@ debug覆盖会显示鼠标的真实位置以及当前光标类型,以帮助纠
254
270
  AnimeCursor 会自动识别移动触屏设备(比如手机、平板电脑)并默认屏蔽这些设备上的动画光标。
255
271
  如果你想在这些设备上显示动画光标,可以添加 `enableTouch: true` 。
256
272
 
257
- ---
258
-
259
273
  ## 📝 注意事项
260
274
 
261
275
  ### 📁 文件
@@ -298,8 +312,6 @@ AnimeCursor 会根据配置自动为页面元素添加 `data-cursor`:
298
312
  * GIF 不使用 `frames`、`duration` 或 `pingpong`
299
313
  * 动画由 GIF 自身控制
300
314
 
301
- ---
302
-
303
315
  ## ❌ 错误处理
304
316
 
305
317
  * 缺少必填配置会直接终止初始化
package/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "anime-cursor",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A lightweight JS for website animated cursors",
5
5
  "main": "dist/anime-cursor.umd.js",
6
6
  "module": "dist/anime-cursor.esm.js",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
- "keywords": ["cursor", "animation", "ui", "javascript"],
10
+ "keywords": [
11
+ "cursor",
12
+ "animation",
13
+ "ui",
14
+ "javascript"
15
+ ],
11
16
  "scripts": {
12
17
  "build": "rollup -c"
13
18
  },