@occluze/umber 0.2.0 → 0.3.0
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.md +21 -0
- package/README.md +78 -48
- package/dist/chunks/badge.js +2 -0
- package/dist/chunks/basis.js +2 -0
- package/dist/chunks/basis_transcoder.js +2 -0
- package/dist/chunks/basis_transcoder.wasm +0 -0
- package/dist/chunks/capture.js +2 -2
- package/dist/chunks/covers.js +2 -2
- package/dist/chunks/curves.js +2 -0
- package/dist/chunks/flip.js +2 -2
- package/dist/chunks/fx.js +2 -102
- package/dist/chunks/gl.js +2 -180
- package/dist/chunks/glsl.js +2 -239
- package/dist/chunks/inspect.js +2 -6
- package/dist/chunks/instances.js +2 -93
- package/dist/chunks/layers.js +2 -21
- package/dist/chunks/licence.js +2 -2
- package/dist/chunks/morph.js +2 -2
- package/dist/chunks/patch.js +2 -0
- package/dist/chunks/prepared.js +2 -0
- package/dist/chunks/profiler.js +2 -0
- package/dist/chunks/restore.js +2 -2
- package/dist/chunks/shapes.js +2 -2
- package/dist/chunks/sim.js +2 -22
- package/dist/chunks/text.js +2 -52
- package/dist/chunks/video.js +2 -2
- package/dist/chunks/views.js +2 -2
- package/dist/chunks/vocabulary.js +2 -0
- package/dist/chunks/warm.js +2 -2
- package/dist/frameworks/astro.mjs +2 -0
- package/dist/frameworks/react.mjs +2 -0
- package/dist/frameworks/svelte.mjs +2 -0
- package/dist/frameworks/vue.mjs +2 -0
- package/dist/modules/debug.js +2 -36
- package/dist/modules/debug.mjs +2 -36
- package/dist/modules/handoff.js +2 -2
- package/dist/modules/handoff.mjs +2 -2
- package/dist/modules/input.js +2 -2
- package/dist/modules/input.mjs +2 -2
- package/dist/modules/router-swap.js +2 -13
- package/dist/modules/router.js +2 -2
- package/dist/modules/router.mjs +2 -2
- package/dist/modules/scroll-more.js +2 -0
- package/dist/modules/scroll-touch.js +2 -0
- package/dist/modules/scroll.js +2 -2
- package/dist/modules/scroll.mjs +2 -2
- package/dist/modules/scrollfx.js +2 -0
- package/dist/modules/scrollfx.mjs +2 -0
- package/dist/modules/scrub.js +2 -8
- package/dist/modules/scrub.mjs +2 -8
- package/dist/modules/three.js +2 -0
- package/dist/modules/three.mjs +2 -0
- package/dist/node/assets.mjs +9 -0
- package/dist/node/astro.mjs +47 -0
- package/dist/node/cli.mjs +109 -0
- package/dist/node/shared-3Q24RNIF.mjs +602 -0
- package/dist/node/shared-4FIU6DYP.mjs +200 -0
- package/dist/node/vite.mjs +10 -0
- package/dist/umber.css +2 -2
- package/dist/umber.js +2 -2
- package/dist/umber.mjs +2 -2
- package/docs/AI-quick.md +240 -0
- package/docs/AI.md +3130 -0
- package/docs/npm.md +37 -26
- package/package.json +183 -12
- package/types/assets.d.ts +87 -0
- package/types/astro.d.ts +43 -0
- package/types/debug.d.ts +17 -16
- package/types/esm.d.ts +12 -12
- package/types/global.d.ts +17 -0
- package/types/handoff.d.ts +26 -25
- package/types/input.d.ts +63 -55
- package/types/loop.d.ts +75 -0
- package/types/module.d.ts +108 -0
- package/types/react.d.ts +15 -0
- package/types/router.d.ts +87 -45
- package/types/scroll.d.ts +96 -38
- package/types/scrollfx.d.ts +80 -0
- package/types/scrub.d.ts +33 -32
- package/types/svelte.d.ts +16 -0
- package/types/three.d.ts +226 -0
- package/types/umber.d.ts +633 -357
- package/types/vite.d.ts +33 -0
- package/types/vue.d.ts +14 -0
package/types/vite.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@occluze/umber/vite`: prepares the pictures Umber draws after `vite build` (see
|
|
3
|
+
* `@occluze/umber/assets`), and puts Umber's chunks in the built site, so they load from its own
|
|
4
|
+
* origin. `vite dev` is left alone.
|
|
5
|
+
*
|
|
6
|
+
* import umberAssets from "@occluze/umber/vite";
|
|
7
|
+
* export default { plugins: [umberAssets()] };
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { SiteOptions } from "./assets";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* prepareSite()'s options (the folder and base URL come from Vite's config), whether to minify the
|
|
14
|
+
* site's own shaders (true), and whether to put Umber's chunks in the site (true; `false` loads them
|
|
15
|
+
* from umber.occluze.com).
|
|
16
|
+
*/
|
|
17
|
+
export type UmberAssetsOptions = Omit<SiteOptions, "dir" | "baseUrl" | "log"> & { shaders?: boolean; chunks?: boolean };
|
|
18
|
+
|
|
19
|
+
/** A Vite plugin (build only). */
|
|
20
|
+
export interface UmberVitePlugin {
|
|
21
|
+
name: string;
|
|
22
|
+
apply: "build";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The plugins: one prepares the pictures (and fonts) after the build, one minifies the GLSL
|
|
27
|
+
* of the site's effects (their `fragment` and `vertex` parts, and literals marked
|
|
28
|
+
* `/* glsl *\/`) while it bundles, and one writes Umber's chunks into the site
|
|
29
|
+
* (`<assets>/umber@<version>/chunks/`) and points the bundled engine at them, so the built site
|
|
30
|
+
* loads nothing from umber.occluze.com but the licence check. `shaders: false` leaves the second
|
|
31
|
+
* out, `chunks: false` the third. createUmber({ base }) and window.UmberConfig.base still win.
|
|
32
|
+
*/
|
|
33
|
+
export default function umberAssets(options?: UmberAssetsOptions): UmberVitePlugin[];
|
package/types/vue.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for @occluze/umber/vue: useScroll(), Lenis's useLenis() for Umber's umber.scroll.
|
|
3
|
+
*
|
|
4
|
+
* import { useScroll } from "@occluze/umber/vue";
|
|
5
|
+
* const scroll = useScroll((s) => (progress.value = s.progress));
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ScrollApi } from "./scroll.js";
|
|
9
|
+
|
|
10
|
+
/** A ref (Vue's shallowRef) to umber.scroll (null until mounted, or without the scroll module); `callback` hears its "scroll" while mounted. The engine: the one on the page, or `gl`. */
|
|
11
|
+
export declare function useScroll(
|
|
12
|
+
callback?: (scroll: ScrollApi) => void,
|
|
13
|
+
gl?: { readonly scroll?: ScrollApi } | null,
|
|
14
|
+
): { value: ScrollApi | null };
|