You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.en.md
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ Add Live2D widget to web page. Compatible with PJAX.
20
20
You can also check out example web pages:
21
21
22
22
- Check the effect in the lower left corner of [Mimi's Blog](https://zhangshuqiao.org)
23
-
-[demo.html](https://stevenjoezhang.github.io/live2d-widget/demo/demo.html) to demonstrate basic functionality
24
-
-[login.html](https://stevenjoezhang.github.io/live2d-widget/demo/login.html) to imitate the login interface of NPM
23
+
-[demo/demo.html](https://live2d-widget.pages.dev/demo/demo) to demonstrate basic functionality
24
+
-[demo/login.html](https://live2d-widget.pages.dev/demo/login) to imitate the login interface of NPM
25
25
26
26
## Usage
27
27
@@ -37,7 +37,7 @@ If you are interested in customizing the widget, please refer to the detailed in
37
37
38
38
## Configuration
39
39
40
-
You can refer to the source code of `autoload.js` to see the available configuration options. `autoload.js` will automatically load three files: `waifu.css`, `live2d.min.js`, and `waifu-tips.js`. `waifu-tips.js` creates the `initWidget` function, which is the main function for loading the widget. The `initWidget` function accepts an object-type parameter as the configuration for the widget. The following are the available options:
40
+
You can refer to the source code of `dist/autoload.js` to see the available configuration options. `autoload.js` will automatically load three files: `waifu.css`, `live2d.min.js`, and `waifu-tips.js`. `waifu-tips.js` creates the `initWidget` function, which is the main function for loading the widget. The `initWidget` function accepts an object-type parameter as the configuration for the widget. The following are the available options:
41
41
42
42
| Option | Type | Default Value | Description |
43
43
| ------ | ---- | ------------- | ----------- |
@@ -52,10 +52,13 @@ Among them, the parameters `apiPath` and `cdnPath` only need to set one of them.
52
52
53
53
If the options provided in the "Configuration" section above are not enough to meet your needs, you can make modifications yourself. The directory structure of this repository is as follows:
54
54
55
-
-`src/waifu-tips.js` contains the logic for the button and dialog box.
56
-
-`waifu-tips.js` is automatically generated by `src/waifu-tips.js` and it is not recommended to modify it directly.
57
-
-`waifu-tips.json` defines the triggering conditions (`selector`, CSS selector) and the displayed text when triggered (`text`).
58
-
-`waifu.css` is the style sheet for the virtual assistant.
55
+
-`src/` directory contains the code for each component, e.g. the button and dialog box.
56
+
-`build/` directory contains the files built by TypeScript.
57
+
-`dist/` directory contains the files that can be directly used on web pages after packaging, including:
58
+
-`autoload.js` is used to automatically load other resources such as style sheets.
59
+
-`waifu-tips.js` is automatically generated by `build/waifu-tips.js` and it is not recommended to modify it directly.
60
+
-`waifu-tips.json` defines the triggering conditions (`selector`, CSS selector) and the displayed text when triggered (`text`).
61
+
-`waifu.css` is the style sheet for the virtual assistant.
59
62
60
63
By default, the CSS selector rules in `waifu-tips.json` are effective for the Hexo [NexT theme](http://github.com/next-theme/hexo-theme-next), but you may need to modify or add new content to make it suitable for your own website.
61
64
**Warning: The content in `waifu-tips.json` may not be suitable for all age groups or appropriate to access during work. Please ensure their suitability when using them.**
0 commit comments