Skip to content

Commit

Permalink
chore: build
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Mar 21, 2024
1 parent 2b524ae commit 1e60444
Show file tree
Hide file tree
Showing 25 changed files with 206 additions and 16 deletions.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/css/chunk-7c8bf244.70184247.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/css/chunk-e29377ce.5ff67de5.css

This file was deleted.

55 changes: 52 additions & 3 deletions docs/i18n/cn/pages/examples/particle.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,51 @@ new JParticles.Particle('#demo', {

```javascript
new JParticles.Particle('#demo', {
num: 100,
num: 50,
maxR: 30,
minR: 30,
range: 0,
color: ['#fff888', '#f9cd76', '#f7b26e', '#d5d02c'],
// 配置形状
shape: [
'triangle', 'star', 'star:4:0.5', 'star:30:0.9',
'https://raw.githubusercontent.com/Barrior/assets/main/bubble-colorful.png',
'triangle', 'star', 'star:4:0.1', 'star:4:0.5', 'star:4:0.8', 'star:30:0.9',
'https://raw.githubusercontent.com/Barrior/assets/main/smiling-face.gif',
'https://raw.githubusercontent.com/Barrior/assets/main/bubble.png'
],
})
```

### 自旋效果

<div class="instance i5">
<div class="demo"></div>
<div class="handlebar">
<div class="btn btn-default open">开启</div>
<div class="btn btn-default pause">暂停</div>
</div>
</div>

源代码:

```javascript
new JParticles.Particle('#demo', {
num: 50,
maxR: 30,
minR: 30,
range: 0,
color: ['#fff888', '#f9cd76', '#f7b26e', '#d5d02c'],
shape: [
'triangle', 'star', 'star:4:0.1', 'star:4:0.5', 'star:4:0.8', 'star:30:0.9',
'https://raw.githubusercontent.com/Barrior/assets/main/smiling-face.gif',
'https://raw.githubusercontent.com/Barrior/assets/main/bubble.png'
],
// 开启自旋
spin: true,
spinMaxSpeed: 10,
spinMinSpeed: 1,
})
```

### 参数及描述

<table class="table table-bordered-inner table-striped">
Expand Down Expand Up @@ -209,5 +240,23 @@ new JParticles.Particle('#demo', {
<td>number</td>
<td>视差强度,值越小视差效果越强烈 `(0, +∞)`。</td>
</tr>
<tr>
<td>spin<sup>v3.5.0</sup></td>
<td>false</td>
<td>boolean</td>
<td>粒子是否自旋</td>
</tr>
<tr>
<td>spinMaxSpeed<sup>v3.5.0</sup></td>
<td>5</td>
<td>number</td>
<td>粒子自旋最大运动速度,`(0, 360)`。</td>
</tr>
<tr>
<td>spinMixSpeed<sup>v3.5.0</sup></td>
<td>1</td>
<td>number</td>
<td>粒子自旋最小运动速度,`(0, 360)`。</td>
</tr>
</tbody>
</table>
48 changes: 47 additions & 1 deletion docs/i18n/cn/pages/examples/snow.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,37 @@ new JParticles.Snow('#demo', {
})
```

### 微信聊天撒花动画
### 自旋

<div class="instance i3">
<div class="demo"></div>
<div class="handlebar">
<div class="btn btn-default open">开启</div>
<div class="btn btn-default pause">暂停</div>
</div>
</div>

源代码:

```javascript
new JParticles.Snow('#demo', {
maxR: 20,
minR: 10,
maxSpeed: 0.3,
minSpeed: 0.1,
shape: [
'star',
'https://raw.githubusercontent.com/Barrior/assets/main/gift.png',
'https://raw.githubusercontent.com/Barrior/assets/main/smiling-face.gif',
],
// 开启自旋
spin: true,
})
```

### 微信聊天撒花动画

<div class="instance i4">
<div class="demo"></div>
<div class="handlebar">
<div class="btn btn-default fall-again">再次演示</div>
Expand Down Expand Up @@ -152,6 +180,24 @@ document.querySelector('.fall-again').addEventListener('click', () => {
<td>number</td>
<td>变换方向的概率(达到时间间隔后),取值范围 `[0, 1]`。</td>
</tr>
<tr>
<td>spin<sup>v3.5.0</sup></td>
<td>false</td>
<td>boolean</td>
<td>粒子是否自旋</td>
</tr>
<tr>
<td>spinMaxSpeed<sup>v3.5.0</sup></td>
<td>5</td>
<td>number</td>
<td>粒子自旋最大运动速度,`(0, 360)`。</td>
</tr>
<tr>
<td>spinMixSpeed<sup>v3.5.0</sup></td>
<td>1</td>
<td>number</td>
<td>粒子自旋最小运动速度,`(0, 360)`。</td>
</tr>
</tbody>
</table>

Expand Down
53 changes: 51 additions & 2 deletions docs/i18n/en/pages/examples/particle.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,44 @@ new JParticles.Particle('#demo', {
color: ['#fff888', '#f9cd76', '#f7b26e', '#d5d02c'],
// custom shapes
shape: [
'triangle', 'star', 'star:4:0.5', 'star:30:0.9',
'https://raw.githubusercontent.com/Barrior/assets/main/bubble-colorful.png',
'triangle', 'star', 'star:4:0.1', 'star:4:0.5', 'star:4:0.8', 'star:30:0.9',
'https://raw.githubusercontent.com/Barrior/assets/main/smiling-face.gif',
'https://raw.githubusercontent.com/Barrior/assets/main/bubble.png'
],
})
```

### Spin Animation

<div class="instance i5">
<div class="demo"></div>
<div class="handlebar">
<div class="btn btn-default open">open</div>
<div class="btn btn-default pause">pause</div>
</div>
</div>

Source:

```javascript
new JParticles.Particle('#demo', {
num: 50,
maxR: 30,
minR: 30,
range: 0,
color: ['#fff888', '#f9cd76', '#f7b26e', '#d5d02c'],
shape: [
'triangle', 'star', 'star:4:0.1', 'star:4:0.5', 'star:4:0.8', 'star:30:0.9',
'https://raw.githubusercontent.com/Barrior/assets/main/smiling-face.gif',
'https://raw.githubusercontent.com/Barrior/assets/main/bubble.png'
],
// open spin animation
spin: true,
spinMaxSpeed: 10,
spinMinSpeed: 1,
})
```

### Parameters

<table class="table table-bordered-inner table-striped">
Expand Down Expand Up @@ -218,5 +249,23 @@ new JParticles.Particle('#demo', {
<td>number</td>
<td>The smaller the value, the strength the effect. `(0, +∞)`</td>
</tr>
<tr>
<td>spin<sup>v3.5.0</sup></td>
<td>false</td>
<td>boolean</td>
<td>Whether the particle spins.</td>
</tr>
<tr>
<td>spinMaxSpeed<sup>v3.5.0</sup></td>
<td>5</td>
<td>number</td>
<td>The maximum speed of particle spin. `(0, 360)`</td>
</tr>
<tr>
<td>spinMixSpeed<sup>v3.5.0</sup></td>
<td>1</td>
<td>number</td>
<td>The minimum speed of particle spin. `(0, 360)`</td>
</tr>
</tbody>
</table>
48 changes: 47 additions & 1 deletion docs/i18n/en/pages/examples/snow.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,37 @@ new JParticles.Snow('#demo', {
})
```

### Animation of WeChat chat page
### Spin Animation

<div class="instance i3">
<div class="demo"></div>
<div class="handlebar">
<div class="btn btn-default open">open</div>
<div class="btn btn-default pause">pause</div>
</div>
</div>

Source:

```javascript
new JParticles.Snow('#demo', {
maxR: 20,
minR: 10,
maxSpeed: 0.3,
minSpeed: 0.1,
shape: [
'star',
'https://raw.githubusercontent.com/Barrior/assets/main/gift.png',
'https://raw.githubusercontent.com/Barrior/assets/main/smiling-face.gif',
],
// open spin animation
spin: true,
})
```

### Animation of WeChat chat page

<div class="instance i4">
<div class="demo"></div>
<div class="handlebar">
<div class="btn btn-default fall-again">Fall Again</div>
Expand Down Expand Up @@ -152,6 +180,24 @@ document.querySelector('.fall-again').addEventListener('click', () => {
<td>number</td>
<td>The probability of changing direction (after reaching the time interval), the value range is `[0, 1]`.</td>
</tr>
<tr>
<td>spin<sup>v3.5.0</sup></td>
<td>false</td>
<td>boolean</td>
<td>Whether the particle spins.</td>
</tr>
<tr>
<td>spinMaxSpeed<sup>v3.5.0</sup></td>
<td>5</td>
<td>number</td>
<td>The maximum speed of particle spin. `(0, 360)`</td>
</tr>
<tr>
<td>spinMixSpeed<sup>v3.5.0</sup></td>
<td>1</td>
<td>number</td>
<td>The minimum speed of particle spin. `(0, 360)`</td>
</tr>
</tbody>
</table>

Expand Down
Binary file added docs/img/smiling-face.84846503.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
}
.overflow-hidden {
overflow: hidden;
}</style><link href=https://unpkg.com/[email protected]/browser/jparticles.base.js rel=preload as=script><link href=https://unpkg.com/[email protected]/browser/wave-loading.js rel=preload as=script><link href=/js/loading.24896226.js rel=preload as=script><link href=/css/chunk-0af597de.30da7445.css rel=prefetch><link href=/css/chunk-380a34ac.2a6f16c2.css rel=prefetch><link href=/css/chunk-3dd2668b.4e472a5f.css rel=prefetch><link href=/css/chunk-5825c338.a89c9f1e.css rel=prefetch><link href=/css/chunk-59de38b6.2b0a7f6e.css rel=prefetch><link href=/css/chunk-5f9c23c6.a12418d9.css rel=prefetch><link href=/css/chunk-63aa0638.b48a0bb2.css rel=prefetch><link href=/css/chunk-e29377ce.5ff67de5.css rel=prefetch><link href=/css/gitalk.2af8b370.css rel=prefetch><link href=/css/utils.cb815871.css rel=prefetch><link href=/js/apisauce.193ab5b2.js rel=prefetch><link href=/js/chunk-0af597de.ad717982.js rel=prefetch><link href=/js/chunk-2d226729.93a627e9.js rel=prefetch><link href=/js/chunk-380a34ac.b139f907.js rel=prefetch><link href=/js/chunk-3dd2668b.69ec23fa.js rel=prefetch><link href=/js/chunk-5825c338.86c32643.js rel=prefetch><link href=/js/chunk-59de38b6.c3d30c1b.js rel=prefetch><link href=/js/chunk-5f9c23c6.ff8a648e.js rel=prefetch><link href=/js/chunk-63aa0638.adeccd1f.js rel=prefetch><link href=/js/chunk-e29377ce.f086c2c3.js rel=prefetch><link href=/js/gitalk.00901483.js rel=prefetch><link href=/js/utils.a47be96b.js rel=prefetch><link href=/css/app.9bfb9307.css rel=preload as=style><link href=/js/app.3e0a9cd7.js rel=preload as=script><link href=/js/chunk-vendors.b8ac408b.js rel=preload as=script><link href=/js/jparticles.258f3600.js rel=preload as=script><link href=/js/runtime.e8084739.js rel=preload as=script><link href=/js/vue.8408406c.js rel=preload as=script><link href=/css/app.9bfb9307.css rel=stylesheet></head><body class=overflow-hidden><div id=app></div><div id=loading-layer><div id=loading-container></div></div><script src=https://unpkg.com/[email protected]/browser/jparticles.base.js></script><script src=https://unpkg.com/[email protected]/browser/wave-loading.js></script><script src=/js/loading.24896226.js></script><script src=/js/runtime.e8084739.js></script><script src=/js/jparticles.258f3600.js></script><script src=/js/vue.8408406c.js></script><script src=/js/chunk-vendors.b8ac408b.js></script><script src=/js/app.3e0a9cd7.js></script></body></html>
}</style><link href=https://unpkg.com/[email protected]/browser/jparticles.base.js rel=preload as=script><link href=https://unpkg.com/[email protected]/browser/wave-loading.js rel=preload as=script><link href=/js/loading.24896226.js rel=preload as=script><link href=/css/chunk-0af597de.30da7445.css rel=prefetch><link href=/css/chunk-25b28650.a89c9f1e.css rel=prefetch><link href=/css/chunk-380a34ac.2a6f16c2.css rel=prefetch><link href=/css/chunk-3dd2668b.4e472a5f.css rel=prefetch><link href=/css/chunk-5f9c23c6.a12418d9.css rel=prefetch><link href=/css/chunk-61299654.b0b238eb.css rel=prefetch><link href=/css/chunk-63aa0638.b48a0bb2.css rel=prefetch><link href=/css/chunk-7c8bf244.70184247.css rel=prefetch><link href=/css/gitalk.2af8b370.css rel=prefetch><link href=/css/utils.cb815871.css rel=prefetch><link href=/js/apisauce.193ab5b2.js rel=prefetch><link href=/js/chunk-0af597de.beced599.js rel=prefetch><link href=/js/chunk-25b28650.c3c22fad.js rel=prefetch><link href=/js/chunk-2d226729.a09bc73e.js rel=prefetch><link href=/js/chunk-380a34ac.ce18f7ad.js rel=prefetch><link href=/js/chunk-3dd2668b.a916327d.js rel=prefetch><link href=/js/chunk-5f9c23c6.be129902.js rel=prefetch><link href=/js/chunk-61299654.b1e9d3cc.js rel=prefetch><link href=/js/chunk-63aa0638.c2413a8b.js rel=prefetch><link href=/js/chunk-7c8bf244.d61688f0.js rel=prefetch><link href=/js/gitalk.00901483.js rel=prefetch><link href=/js/utils.a47be96b.js rel=prefetch><link href=/css/app.9bfb9307.css rel=preload as=style><link href=/js/app.b5623991.js rel=preload as=script><link href=/js/chunk-vendors.b8ac408b.js rel=preload as=script><link href=/js/jparticles.b05e05ad.js rel=preload as=script><link href=/js/runtime.6149a86a.js rel=preload as=script><link href=/js/vue.8408406c.js rel=preload as=script><link href=/css/app.9bfb9307.css rel=stylesheet></head><body class=overflow-hidden><div id=app></div><div id=loading-layer><div id=loading-container></div></div><script src=https://unpkg.com/[email protected]/browser/jparticles.base.js></script><script src=https://unpkg.com/[email protected]/browser/wave-loading.js></script><script src=/js/loading.24896226.js></script><script src=/js/runtime.6149a86a.js></script><script src=/js/jparticles.b05e05ad.js></script><script src=/js/vue.8408406c.js></script><script src=/js/chunk-vendors.b8ac408b.js></script><script src=/js/app.b5623991.js></script></body></html>
2 changes: 1 addition & 1 deletion docs/js/app.3e0a9cd7.js → docs/js/app.b5623991.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions docs/js/chunk-25b28650.c3c22fad.js

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion docs/js/chunk-5825c338.86c32643.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/chunk-59de38b6.c3d30c1b.js

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions docs/js/chunk-61299654.b1e9d3cc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
1 change: 1 addition & 0 deletions docs/js/chunk-7c8bf244.d61688f0.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1e60444

Please sign in to comment.