r3f-vfx 0.1.3 → 0.1.6
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/README.md +0 -1
- package/dist/index.d.ts +18 -8
- package/dist/index.js +1542 -6816
- package/package.json +3 -2
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { RefObject, ReactNode } from 'react';
|
|
3
3
|
import * as THREE from 'three/webgpu';
|
|
4
4
|
import { CurveData, Rotation3DInput, Appearance, Lighting, ParticleData, EmitterShape, CoreState } from 'core-vfx';
|
|
5
|
-
export { Appearance, AttractorConfig, AttractorType, BaseParticleProps, Blending, CollisionConfig, CurveData, CurvePoint, Easing, EmitterShape, FlipbookConfig, FrictionConfig, Lighting, ParticleData, Rotation3DInput, StretchConfig, TurbulenceConfig, bakeCurveToArray, createCombinedCurveTexture } from 'core-vfx';
|
|
5
|
+
export { Appearance, AttractorConfig, AttractorType, BaseParticleProps, Blending, CollisionConfig, CurveChannel, CurveData, CurvePoint, CurveTextureResult, Easing, EmitterShape, FlipbookConfig, FrictionConfig, Lighting, ParticleData, Rotation3DInput, StretchConfig, TurbulenceConfig, bakeCurveToArray, buildCurveTextureBin, createCombinedCurveTexture } from 'core-vfx';
|
|
6
6
|
|
|
7
7
|
type VFXParticlesProps = {
|
|
8
8
|
/** Optional name for registering with useVFXStore (enables VFXEmitter linking) */
|
|
@@ -264,14 +264,24 @@ declare const useVFXStore: typeof useVFXStoreImpl & {
|
|
|
264
264
|
getInitialState: () => CoreState;
|
|
265
265
|
};
|
|
266
266
|
|
|
267
|
+
type CurveTextureHookResult = {
|
|
268
|
+
texture: THREE.DataTexture;
|
|
269
|
+
/** Per-channel enabled state, combining curve props and loaded .bin channels */
|
|
270
|
+
sizeEnabled: boolean;
|
|
271
|
+
opacityEnabled: boolean;
|
|
272
|
+
velocityEnabled: boolean;
|
|
273
|
+
rotationSpeedEnabled: boolean;
|
|
274
|
+
};
|
|
267
275
|
/**
|
|
268
|
-
* Hook for curve texture loading/baking
|
|
269
|
-
*
|
|
276
|
+
* Hook for curve texture loading/baking.
|
|
277
|
+
*
|
|
278
|
+
* If curveTexturePath is provided, loads pre-baked texture from file.
|
|
279
|
+
* The .bin file contains a header with a bitmask of which channels are active.
|
|
280
|
+
* Only those channels override the curve props; the rest use curve props or defaults.
|
|
270
281
|
*
|
|
271
|
-
* If
|
|
272
|
-
* If curves
|
|
273
|
-
* If no curves AND no path, returns default texture (no baking needed)
|
|
282
|
+
* If curves are defined (no path), bakes them synchronously on the main thread.
|
|
283
|
+
* If no curves AND no path, returns default texture (no baking needed).
|
|
274
284
|
*/
|
|
275
|
-
declare const useCurveTextureAsync: (sizeCurve: CurveData | null, opacityCurve: CurveData | null, velocityCurve: CurveData | null, rotationSpeedCurve: CurveData | null, curveTexturePath?: string | null) =>
|
|
285
|
+
declare const useCurveTextureAsync: (sizeCurve: CurveData | null, opacityCurve: CurveData | null, velocityCurve: CurveData | null, rotationSpeedCurve: CurveData | null, curveTexturePath?: string | null) => CurveTextureHookResult;
|
|
276
286
|
|
|
277
|
-
export { VFXEmitter, VFXParticles, useCurveTextureAsync, useVFXEmitter, useVFXStore };
|
|
287
|
+
export { type CurveTextureHookResult, VFXEmitter, VFXParticles, useCurveTextureAsync, useVFXEmitter, useVFXStore };
|