r3f-vfx 0.0.8 → 0.0.9
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/dist/index.d.ts +11 -2
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -246,7 +246,16 @@ declare function useVFXEmitter(name: string): {
|
|
|
246
246
|
} | null;
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
-
declare function
|
|
250
|
-
declare function
|
|
249
|
+
declare function useVFXStoreImpl(): CoreState;
|
|
250
|
+
declare function useVFXStoreImpl<T>(selector: (state: CoreState) => T): T;
|
|
251
|
+
declare const useVFXStore: typeof useVFXStoreImpl & {
|
|
252
|
+
getState: () => CoreState;
|
|
253
|
+
setState: {
|
|
254
|
+
(partial: CoreState | Partial<CoreState> | ((state: CoreState) => CoreState | Partial<CoreState>), replace?: false): void;
|
|
255
|
+
(state: CoreState | ((state: CoreState) => CoreState), replace: true): void;
|
|
256
|
+
};
|
|
257
|
+
subscribe: (listener: (state: CoreState, prevState: CoreState) => void) => () => void;
|
|
258
|
+
getInitialState: () => CoreState;
|
|
259
|
+
};
|
|
251
260
|
|
|
252
261
|
export { VFXEmitter, VFXParticles, useVFXEmitter, useVFXStore };
|
package/dist/index.js
CHANGED
|
@@ -29,12 +29,19 @@ var __export = (target, all) => {
|
|
|
29
29
|
// src/react-store.ts
|
|
30
30
|
import { coreStore } from "core-vfx";
|
|
31
31
|
import { useStore } from "zustand";
|
|
32
|
-
function
|
|
32
|
+
function useVFXStoreImpl(selector) {
|
|
33
33
|
return useStore(coreStore, selector);
|
|
34
34
|
}
|
|
35
|
+
var useVFXStore;
|
|
35
36
|
var init_react_store = __esm({
|
|
36
37
|
"src/react-store.ts"() {
|
|
37
38
|
"use strict";
|
|
39
|
+
useVFXStore = Object.assign(useVFXStoreImpl, {
|
|
40
|
+
getState: coreStore.getState,
|
|
41
|
+
setState: coreStore.setState,
|
|
42
|
+
subscribe: coreStore.subscribe,
|
|
43
|
+
getInitialState: coreStore.getInitialState
|
|
44
|
+
});
|
|
38
45
|
}
|
|
39
46
|
});
|
|
40
47
|
|