Skip to content

Commit b8d31f2

Browse files
committed
Init
0 parents  commit b8d31f2

File tree

75 files changed

+7804
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+7804
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.idea
2+
.DS_Store
3+
.vscode
4+
node_modules
5+
*.log
6+
**/lib/*
7+
package-lock.json

LICENCE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
MIT License
3+
4+
Copyright (c) 2018-2019 SeinJS (https://github.com/SeinJS)
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# GPUParticleSystem
2+
3+
基于GPU的粒子系统。使用教程可见[seinjs-gpu-particle-system](http://seinjs.com/cn/extension/common-extensions/gpu-particles)
4+
5+
[更多请见API文档。](doc/README.md)

doc/README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
GPUParticleSystem
3+
=================
4+
5+
基于GPU的粒子系统。使用教程可见[seinjs-gpu-particle-system](http://seinjs.com/cn/extension/common-extensions/gpu-particles)
6+
7+
[更多请见API文档。](doc/README.md)
8+
9+
## Index
10+
11+
### Classes
12+
13+
* [Actor](classes/actor.md)
14+
* [CircleEmitter](classes/circleemitter.md)
15+
* [Component](classes/component.md)
16+
* [ConeEmitter](classes/coneemitter.md)
17+
* [EdgeEmitter](classes/edgeemitter.md)
18+
* [Emitter](classes/emitter.md)
19+
* [HemisphericEmitter](classes/hemisphericemitter.md)
20+
* [RectangleEmitter](classes/rectangleemitter.md)
21+
* [SphereEmitter](classes/sphereemitter.md)
22+
* [WindEmitter](classes/windemitter.md)
23+
24+
### Interfaces
25+
26+
* [ICircleEmitterOptions](interfaces/icircleemitteroptions.md)
27+
* [ICircleEmitterUniforms](interfaces/icircleemitteruniforms.md)
28+
* [IComponentState](interfaces/icomponentstate.md)
29+
* [IConeEmitterOptions](interfaces/iconeemitteroptions.md)
30+
* [IConeEmitterUniforms](interfaces/iconeemitteruniforms.md)
31+
* [IEdgeEmitterOptions](interfaces/iedgeemitteroptions.md)
32+
* [IEdgeEmitterUniforms](interfaces/iedgeemitteruniforms.md)
33+
* [IEmitter](interfaces/iemitter.md)
34+
* [IHemisphericEmitterOptions](interfaces/ihemisphericemitteroptions.md)
35+
* [IHemisphericEmitterUniforms](interfaces/ihemisphericemitteruniforms.md)
36+
* [IParticleUniforms](interfaces/iparticleuniforms.md)
37+
* [IRectangleEmitterOptions](interfaces/irectangleemitteroptions.md)
38+
* [IRectangleEmitterUniforms](interfaces/irectangleemitteruniforms.md)
39+
* [ISphereEmitterOptions](interfaces/isphereemitteroptions.md)
40+
* [ISphereEmitterUniforms](interfaces/isphereemitteruniforms.md)
41+
* [IWindEmitterOptions](interfaces/iwindemitteroptions.md)
42+
* [IWindEmitterUniforms](interfaces/iwindemitteruniforms.md)
43+
44+
### Functions
45+
46+
* [isActor](#isactor)
47+
* [isComponent](#iscomponent)
48+
49+
---
50+
51+
## Functions
52+
53+
<a id="isactor"></a>
54+
55+
### isActor
56+
57+
**isActor**(value: *`SObject`*): `boolean`
58+
59+
*Defined in index.ts:75*
60+
61+
判断一个实例是否为`DomHUDActor`
62+
63+
**Parameters:**
64+
65+
| Name | Type |
66+
| ------ | ------ |
67+
| value | `SObject` |
68+
69+
**Returns:** `boolean`
70+
71+
___
72+
<a id="iscomponent"></a>
73+
74+
### isComponent
75+
76+
**isComponent**(value: *`SObject`*): `boolean`
77+
78+
*Defined in index.ts:82*
79+
80+
判断一个实例是否为`DomHUDComponent`
81+
82+
**Parameters:**
83+
84+
| Name | Type |
85+
| ------ | ------ |
86+
| value | `SObject` |
87+
88+
**Returns:** `boolean`
89+
90+
___
91+
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
[seinjs-gpu-particle-system](../README.md) > ["seinjs"](../modules/_seinjs_.md) > [GPUParticleSystem](../modules/_seinjs_.gpuparticlesystem.md) > [Actor](../classes/_seinjs_.gpuparticlesystem.actor.md)
2+
3+
# Class: Actor
4+
5+
## Hierarchy
6+
7+
[Actor](actor.md)
8+
9+
**↳ Actor**
10+
11+
## Implements
12+
13+
* `ISceneActor`<[IComponentState](../interfaces/icomponentstate.md), [Component](component.md)>
14+
15+
## Index
16+
17+
### Properties
18+
19+
* [isGPUParticleSystemActor](_seinjs_.gpuparticlesystem.actor.md#isgpuparticlesystemactor)
20+
21+
### Methods
22+
23+
* [forceModifyMat](_seinjs_.gpuparticlesystem.actor.md#forcemodifymat)
24+
* [getOption](_seinjs_.gpuparticlesystem.actor.md#getoption)
25+
* [onCreateRoot](_seinjs_.gpuparticlesystem.actor.md#oncreateroot)
26+
* [pause](_seinjs_.gpuparticlesystem.actor.md#pause)
27+
* [resume](_seinjs_.gpuparticlesystem.actor.md#resume)
28+
* [setOption](_seinjs_.gpuparticlesystem.actor.md#setoption)
29+
* [start](_seinjs_.gpuparticlesystem.actor.md#start)
30+
* [stop](_seinjs_.gpuparticlesystem.actor.md#stop)
31+
32+
---
33+
34+
## Properties
35+
36+
<a id="isgpuparticlesystemactor"></a>
37+
38+
### isGPUParticleSystemActor
39+
40+
**● isGPUParticleSystemActor**: *`boolean`* = true
41+
42+
*Inherited from [Actor](actor.md).[isGPUParticleSystemActor](actor.md#isgpuparticlesystemactor)*
43+
44+
*Defined in Actor.ts:18*
45+
46+
___
47+
48+
## Methods
49+
50+
<a id="forcemodifymat"></a>
51+
52+
### forceModifyMat
53+
54+
**forceModifyMat**(): `void`
55+
56+
*Inherited from [Actor](actor.md).[forceModifyMat](actor.md#forcemodifymat)*
57+
58+
*Defined in Actor.ts:44*
59+
60+
强制重新生成材质,**谨慎使用!**
61+
62+
**Returns:** `void`
63+
64+
___
65+
<a id="getoption"></a>
66+
67+
### getOption
68+
69+
**getOption**<`Key`>(key: *`Key`*): `IComponentState[Key]`
70+
71+
*Inherited from [Actor](actor.md).[getOption](actor.md#getoption)*
72+
73+
*Defined in Actor.ts:37*
74+
75+
获取某个配置。
76+
77+
**Type parameters:**
78+
79+
#### Key : `keyof IComponentState`
80+
**Parameters:**
81+
82+
| Name | Type |
83+
| ------ | ------ |
84+
| key | `Key` |
85+
86+
**Returns:** `IComponentState[Key]`
87+
88+
___
89+
<a id="oncreateroot"></a>
90+
91+
### onCreateRoot
92+
93+
**onCreateRoot**(initOptions: *[IComponentState](../interfaces/icomponentstate.md)*): [Component](component.md)
94+
95+
*Inherited from [Actor](actor.md).[onCreateRoot](actor.md#oncreateroot)*
96+
97+
*Overrides SceneActor.onCreateRoot*
98+
99+
*Defined in Actor.ts:23*
100+
101+
生成根组件,继承请先`super.onCreateRoot()`
102+
103+
**Parameters:**
104+
105+
| Name | Type |
106+
| ------ | ------ |
107+
| initOptions | [IComponentState](../interfaces/icomponentstate.md) |
108+
109+
**Returns:** [Component](component.md)
110+
111+
___
112+
<a id="pause"></a>
113+
114+
### pause
115+
116+
**pause**(): `void`
117+
118+
*Inherited from [Actor](actor.md).[pause](actor.md#pause)*
119+
120+
*Defined in Actor.ts:65*
121+
122+
暂停生成。
123+
124+
**Returns:** `void`
125+
126+
___
127+
<a id="resume"></a>
128+
129+
### resume
130+
131+
**resume**(): `void`
132+
133+
*Inherited from [Actor](actor.md).[resume](actor.md#resume)*
134+
135+
*Defined in Actor.ts:72*
136+
137+
唤醒生成。
138+
139+
**Returns:** `void`
140+
141+
___
142+
<a id="setoption"></a>
143+
144+
### setOption
145+
146+
**setOption**<`Key`>(key: *`Key`*, value: *`IComponentState[Key]`*): `void`
147+
148+
*Inherited from [Actor](actor.md).[setOption](actor.md#setoption)*
149+
150+
*Defined in Actor.ts:30*
151+
152+
设置某个配置,修改设置后将会根据状况重新生成`Geometry``Material`**谨慎使用!**
153+
154+
**Type parameters:**
155+
156+
#### Key : `keyof IComponentState`
157+
**Parameters:**
158+
159+
| Name | Type |
160+
| ------ | ------ |
161+
| key | `Key` |
162+
| value | `IComponentState[Key]` |
163+
164+
**Returns:** `void`
165+
166+
___
167+
<a id="start"></a>
168+
169+
### start
170+
171+
**start**(): `void`
172+
173+
*Inherited from [Actor](actor.md).[start](actor.md#start)*
174+
175+
*Defined in Actor.ts:51*
176+
177+
开始生成。
178+
179+
**Returns:** `void`
180+
181+
___
182+
<a id="stop"></a>
183+
184+
### stop
185+
186+
**stop**(): `void`
187+
188+
*Inherited from [Actor](actor.md).[stop](actor.md#stop)*
189+
190+
*Defined in Actor.ts:58*
191+
192+
停止生成。
193+
194+
**Returns:** `void`
195+
196+
___
197+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[seinjs-gpu-particle-system](../README.md) > ["seinjs"](../modules/_seinjs_.md) > [GPUParticleSystem](../modules/_seinjs_.gpuparticlesystem.md) > [CircleEmitter](../classes/_seinjs_.gpuparticlesystem.circleemitter.md)
2+
3+
# Class: CircleEmitter
4+
5+
## Hierarchy
6+
7+
[CircleEmitter](circleemitter.md)
8+
9+
**↳ CircleEmitter**
10+
11+
## Implements
12+
13+
* [IEmitter](../interfaces/iemitter.md)<[ICircleEmitterOptions](../interfaces/icircleemitteroptions.md), [ICircleEmitterUniforms](../interfaces/icircleemitteruniforms.md)>
14+
15+
## Index
16+
17+
### Methods
18+
19+
* [getShadersAndModifyUniforms](_seinjs_.gpuparticlesystem.circleemitter.md#getshadersandmodifyuniforms)
20+
21+
---
22+
23+
## Methods
24+
25+
<a id="getshadersandmodifyuniforms"></a>
26+
27+
### getShadersAndModifyUniforms
28+
29+
**getShadersAndModifyUniforms**(options: *[ICircleEmitterOptions](../interfaces/icircleemitteroptions.md)*, uniforms: *[ICircleEmitterUniforms](../interfaces/icircleemitteruniforms.md)*): `object`
30+
31+
*Inherited from [CircleEmitter](circleemitter.md).[getShadersAndModifyUniforms](circleemitter.md#getshadersandmodifyuniforms)*
32+
33+
*Overrides [Emitter](emitter.md).[getShadersAndModifyUniforms](emitter.md#getshadersandmodifyuniforms)*
34+
35+
*Defined in emitter/CircleEmitter.ts:71*
36+
37+
根据参数,添加uniform并获取具体实现的Shader
38+
39+
**Parameters:**
40+
41+
| Name | Type |
42+
| ------ | ------ |
43+
| options | [ICircleEmitterOptions](../interfaces/icircleemitteroptions.md) |
44+
| uniforms | [ICircleEmitterUniforms](../interfaces/icircleemitteruniforms.md) |
45+
46+
**Returns:** `object`
47+
48+
___
49+

0 commit comments

Comments
 (0)