wgpu-kit 0.9.10
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.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/README.zh-CN.md +99 -0
- package/dist/core/buffer.d.ts +21 -0
- package/dist/core/context.d.ts +15 -0
- package/dist/core/errors.d.ts +20 -0
- package/dist/core/kernel.d.ts +52 -0
- package/dist/core/layout.d.ts +32 -0
- package/dist/core/pingpong.d.ts +24 -0
- package/dist/core/raw.d.ts +9 -0
- package/dist/fields.js +585 -0
- package/dist/image.js +318 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +484 -0
- package/dist/interop/three.d.ts +37 -0
- package/dist/life.js +1407 -0
- package/dist/media.d.ts +22 -0
- package/dist/packs/fields/index.d.ts +27 -0
- package/dist/packs/image/index.d.ts +32 -0
- package/dist/packs/life/boids.d.ts +28 -0
- package/dist/packs/life/index.d.ts +9 -0
- package/dist/packs/life/map.d.ts +20 -0
- package/dist/packs/life/physarum.d.ts +28 -0
- package/dist/packs/life/tentacles.d.ts +29 -0
- package/dist/packs/life/turing.d.ts +40 -0
- package/dist/packs/particles/config.d.ts +47 -0
- package/dist/packs/particles/grid.d.ts +25 -0
- package/dist/packs/particles/index.d.ts +51 -0
- package/dist/packs/particles/presets.d.ts +25 -0
- package/dist/packs/particles/render.d.ts +20 -0
- package/dist/packs/particles/wgsl.d.ts +13 -0
- package/dist/particles.js +1245 -0
- package/dist/react/index.d.ts +18 -0
- package/dist/react.js +1289 -0
- package/dist/three.js +33 -0
- package/dist/vite.d.ts +38 -0
- package/dist/vite.js +30 -0
- package/package.json +93 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import type { ParticlesSim } from '../packs/particles/index.ts';
|
|
3
|
+
import type { ParticlesConfig } from '../packs/particles/config.ts';
|
|
4
|
+
/**
|
|
5
|
+
* <ParticleCanvas /> —— particles 包的 React 绑定。
|
|
6
|
+
*
|
|
7
|
+
* <ParticleCanvas count={100_000} forces="cells" style={{ height: 400 }} />
|
|
8
|
+
*
|
|
9
|
+
* 设计约定:config 变化请通过 key 重建(声明式世界,整体替换);
|
|
10
|
+
* 需要命令式操作时用 onReady 拿到 sim 实例(setForces/setParams/录制)。
|
|
11
|
+
*/
|
|
12
|
+
export interface ParticleCanvasProps extends ParticlesConfig {
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
/** sim 就绪(异步初始化完成)后回调;组件卸载后实例已销毁 */
|
|
16
|
+
onReady?: (sim: ParticlesSim) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function ParticleCanvas(props: ParticleCanvasProps): JSX.Element;
|