@shulya/liquid-glass 0.0.0-stage → 1.0.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/dist/index.cjs ADDED
@@ -0,0 +1,17 @@
1
+ exports.LiquidGlassController = require('./core.cjs').LiquidGlassController;
2
+ exports.createLiquidGlass = require('./core.cjs').createLiquidGlass;
3
+ exports.scheduleStageRedraw = require('./core.cjs').scheduleStageRedraw;
4
+ exports.OPTICAL_DEFAULTS = require('./core.cjs').OPTICAL_DEFAULTS;
5
+ exports.OPTICAL_LIMITS = require('./core.cjs').OPTICAL_LIMITS;
6
+ exports.normalizeOptions = require('./core.cjs').normalizeOptions;
7
+ exports.buildOpticalMapURI = require('./core.cjs').buildOpticalMapURI;
8
+ exports.buildElementLUT = require('./core.cjs').buildElementLUT;
9
+ exports.renderFusedCluster = require('./core.cjs').renderFusedCluster;
10
+ exports.blendSurfaces = require('./core.cjs').blendSurfaces;
11
+ exports.sampleTable = require('./core.cjs').sampleTable;
12
+
13
+ exports._T0 = require('./tables.cjs')._T0;
14
+ exports._T1 = require('./tables.cjs')._T1;
15
+ exports._T2 = require('./tables.cjs')._T2;
16
+ exports._T3 = require('./tables.cjs')._T3;
17
+ exports._T4 = require('./tables.cjs')._T4;
package/dist/index.mjs ADDED
@@ -0,0 +1,15 @@
1
+ export {
2
+ LiquidGlassController,
3
+ createLiquidGlass,
4
+ scheduleStageRedraw,
5
+ OPTICAL_DEFAULTS,
6
+ OPTICAL_LIMITS,
7
+ normalizeOptions,
8
+ buildOpticalMapURI,
9
+ buildElementLUT,
10
+ renderFusedCluster,
11
+ blendSurfaces,
12
+ sampleTable
13
+ } from './core.mjs';
14
+
15
+ export { _T0, _T1, _T2, _T3, _T4 } from './tables.mjs';
package/dist/react.cjs ADDED
@@ -0,0 +1,105 @@
1
+ /**
2
+ * React Adapter for Liquid Glass UI
3
+ */
4
+ const React = require('react');
5
+ const { useEffect, useRef, useCallback, forwardRef } = require('react');
6
+ const { LiquidGlassController, OPTICAL_DEFAULTS } = require('./core.cjs');
7
+
8
+ /**
9
+ * React Hook to turn any ref element into a Liquid Glass block
10
+ */
11
+ exports.useLiquidGlass = function useLiquidGlass(options = {}) {
12
+ const ref = useRef(null);
13
+ const controllerRef = useRef(null);
14
+
15
+ useEffect(() => {
16
+ if (!ref.current) return;
17
+ controllerRef.current = new LiquidGlassController(ref.current, options);
18
+ return () => {
19
+ if (controllerRef.current) {
20
+ controllerRef.current.destroy();
21
+ controllerRef.current = null;
22
+ }
23
+ };
24
+ }, []);
25
+
26
+ useEffect(() => {
27
+ if (controllerRef.current) {
28
+ controllerRef.current.update({
29
+ rim: options.rim,
30
+ ior: options.ior,
31
+ height: options.height,
32
+ frosted: options.frosted,
33
+ fusion: options.fusion,
34
+ enabled: options.enabled
35
+ });
36
+ }
37
+ }, [
38
+ options.rim,
39
+ options.ior,
40
+ options.height,
41
+ options.frosted,
42
+ options.fusion,
43
+ options.enabled
44
+ ]);
45
+
46
+ return ref;
47
+ }
48
+
49
+ /**
50
+ * <LiquidGlass> React Component
51
+ */
52
+ const LiquidGlass = exports.LiquidGlass = forwardRef(function LiquidGlass(
53
+ {
54
+ rim = OPTICAL_DEFAULTS.rim,
55
+ ior = OPTICAL_DEFAULTS.ior,
56
+ height = OPTICAL_DEFAULTS.height,
57
+ frosted = OPTICAL_DEFAULTS.frosted,
58
+ fusion = OPTICAL_DEFAULTS.fusion,
59
+ enabled = true,
60
+ as: Component = 'div',
61
+ style,
62
+ className,
63
+ children,
64
+ ...rest
65
+ },
66
+ externalRef
67
+ ) {
68
+ const internalRef = useLiquidGlass({
69
+ rim,
70
+ ior,
71
+ height,
72
+ frosted,
73
+ fusion,
74
+ enabled
75
+ });
76
+
77
+ const setRefs = useCallback(
78
+ (node) => {
79
+ internalRef.current = node;
80
+ if (typeof externalRef === 'function') {
81
+ externalRef(node);
82
+ } else if (externalRef) {
83
+ externalRef.current = node;
84
+ }
85
+ },
86
+ [externalRef, internalRef]
87
+ );
88
+
89
+ return React.createElement(
90
+ Component,
91
+ {
92
+ ref: setRefs,
93
+ className,
94
+ style,
95
+ ...rest
96
+ },
97
+ children
98
+ );
99
+ });
100
+
101
+ exports.LiquidGlassController = require('./core.cjs').LiquidGlassController;
102
+ exports.OPTICAL_DEFAULTS = require('./core.cjs').OPTICAL_DEFAULTS;
103
+ exports.OPTICAL_LIMITS = require('./core.cjs').OPTICAL_LIMITS;
104
+ exports.scheduleStageRedraw = require('./core.cjs').scheduleStageRedraw;
105
+ exports.default = LiquidGlass;
package/dist/react.mjs ADDED
@@ -0,0 +1,106 @@
1
+ /**
2
+ * React Adapter for Liquid Glass UI
3
+ */
4
+ import React, { useEffect, useRef, useCallback, forwardRef } from 'react';
5
+ import { LiquidGlassController, OPTICAL_DEFAULTS } from './core.mjs';
6
+
7
+ /**
8
+ * React Hook to turn any ref element into a Liquid Glass block
9
+ */
10
+ export function useLiquidGlass(options = {}) {
11
+ const ref = useRef(null);
12
+ const controllerRef = useRef(null);
13
+
14
+ useEffect(() => {
15
+ if (!ref.current) return;
16
+ controllerRef.current = new LiquidGlassController(ref.current, options);
17
+ return () => {
18
+ if (controllerRef.current) {
19
+ controllerRef.current.destroy();
20
+ controllerRef.current = null;
21
+ }
22
+ };
23
+ }, []);
24
+
25
+ useEffect(() => {
26
+ if (controllerRef.current) {
27
+ controllerRef.current.update({
28
+ rim: options.rim,
29
+ ior: options.ior,
30
+ height: options.height,
31
+ frosted: options.frosted,
32
+ fusion: options.fusion,
33
+ enabled: options.enabled
34
+ });
35
+ }
36
+ }, [
37
+ options.rim,
38
+ options.ior,
39
+ options.height,
40
+ options.frosted,
41
+ options.fusion,
42
+ options.enabled
43
+ ]);
44
+
45
+ return ref;
46
+ }
47
+
48
+ /**
49
+ * <LiquidGlass> React Component
50
+ */
51
+ export const LiquidGlass = forwardRef(function LiquidGlass(
52
+ {
53
+ rim = OPTICAL_DEFAULTS.rim,
54
+ ior = OPTICAL_DEFAULTS.ior,
55
+ height = OPTICAL_DEFAULTS.height,
56
+ frosted = OPTICAL_DEFAULTS.frosted,
57
+ fusion = OPTICAL_DEFAULTS.fusion,
58
+ enabled = true,
59
+ as: Component = 'div',
60
+ style,
61
+ className,
62
+ children,
63
+ ...rest
64
+ },
65
+ externalRef
66
+ ) {
67
+ const internalRef = useLiquidGlass({
68
+ rim,
69
+ ior,
70
+ height,
71
+ frosted,
72
+ fusion,
73
+ enabled
74
+ });
75
+
76
+ const setRefs = useCallback(
77
+ (node) => {
78
+ internalRef.current = node;
79
+ if (typeof externalRef === 'function') {
80
+ externalRef(node);
81
+ } else if (externalRef) {
82
+ externalRef.current = node;
83
+ }
84
+ },
85
+ [externalRef, internalRef]
86
+ );
87
+
88
+ return React.createElement(
89
+ Component,
90
+ {
91
+ ref: setRefs,
92
+ className,
93
+ style,
94
+ ...rest
95
+ },
96
+ children
97
+ );
98
+ });
99
+
100
+ export {
101
+ LiquidGlassController,
102
+ OPTICAL_DEFAULTS,
103
+ OPTICAL_LIMITS,
104
+ scheduleStageRedraw
105
+ } from './core.mjs';
106
+ export default LiquidGlass;
package/dist/solid.cjs ADDED
@@ -0,0 +1,82 @@
1
+ /**
2
+ * SolidJS Adapter for Liquid Glass UI (use:liquidGlass Directive + Component)
3
+ */
4
+ const { createEffect, onCleanup } = require('solid-js');
5
+ const { LiquidGlassController, OPTICAL_DEFAULTS, OPTICAL_LIMITS } = require('./core.cjs');
6
+
7
+ /**
8
+ * SolidJS Directive:
9
+ * <div use:liquidGlass={() => ({ rim: rim(), ior: ior(), height: height(), frosted: frosted(), fusion: fusion() })}>...</div>
10
+ *
11
+ * @param {HTMLElement} el
12
+ * @param {() => Object | Object} accessor
13
+ */
14
+ exports.liquidGlass = function liquidGlass(el, accessor) {
15
+ const initialOpts = typeof accessor === 'function' ? accessor() : accessor || {};
16
+ const controller = new LiquidGlassController(el, initialOpts);
17
+
18
+ createEffect(() => {
19
+ const nextOpts = typeof accessor === 'function' ? accessor() : accessor || {};
20
+ controller.update(nextOpts);
21
+ });
22
+
23
+ onCleanup(() => {
24
+ controller.destroy();
25
+ });
26
+
27
+ return controller;
28
+ }
29
+
30
+ /**
31
+ * SolidJS <LiquidGlass> Component
32
+ */
33
+ exports.LiquidGlass = function LiquidGlass(props) {
34
+ let elRef;
35
+ let controller = null;
36
+
37
+ createEffect(() => {
38
+ const opts = {
39
+ rim: props.rim ?? OPTICAL_DEFAULTS.rim,
40
+ ior: props.ior ?? OPTICAL_DEFAULTS.ior,
41
+ height: props.height ?? OPTICAL_DEFAULTS.height,
42
+ frosted: props.frosted ?? OPTICAL_DEFAULTS.frosted,
43
+ fusion: props.fusion ?? OPTICAL_DEFAULTS.fusion,
44
+ borderRadius: props.borderRadius ?? null
45
+ };
46
+
47
+ if (!controller && elRef) {
48
+ controller = new LiquidGlassController(elRef, opts);
49
+ } else if (controller) {
50
+ controller.update(opts);
51
+ }
52
+ });
53
+
54
+ onCleanup(() => {
55
+ if (controller) {
56
+ controller.destroy();
57
+ controller = null;
58
+ }
59
+ });
60
+
61
+ return {
62
+ ref(node) {
63
+ elRef = node;
64
+ if (node && !controller) {
65
+ controller = new LiquidGlassController(node, {
66
+ rim: props.rim ?? OPTICAL_DEFAULTS.rim,
67
+ ior: props.ior ?? OPTICAL_DEFAULTS.ior,
68
+ height: props.height ?? OPTICAL_DEFAULTS.height,
69
+ frosted: props.frosted ?? OPTICAL_DEFAULTS.frosted,
70
+ fusion: props.fusion ?? OPTICAL_DEFAULTS.fusion,
71
+ borderRadius: props.borderRadius ?? null
72
+ });
73
+ }
74
+ if (typeof props.ref === 'function') props.ref(node);
75
+ }
76
+ };
77
+ }
78
+
79
+ exports.LiquidGlassController = LiquidGlassController;
80
+ exports.OPTICAL_DEFAULTS = OPTICAL_DEFAULTS;
81
+ exports.OPTICAL_LIMITS = OPTICAL_LIMITS;
82
+ exports.default = liquidGlass;
package/dist/solid.mjs ADDED
@@ -0,0 +1,80 @@
1
+ /**
2
+ * SolidJS Adapter for Liquid Glass UI (use:liquidGlass Directive + Component)
3
+ */
4
+ import { createEffect, onCleanup } from 'solid-js';
5
+ import { LiquidGlassController, OPTICAL_DEFAULTS, OPTICAL_LIMITS } from './core.mjs';
6
+
7
+ /**
8
+ * SolidJS Directive:
9
+ * <div use:liquidGlass={() => ({ rim: rim(), ior: ior(), height: height(), frosted: frosted(), fusion: fusion() })}>...</div>
10
+ *
11
+ * @param {HTMLElement} el
12
+ * @param {() => Object | Object} accessor
13
+ */
14
+ export function liquidGlass(el, accessor) {
15
+ const initialOpts = typeof accessor === 'function' ? accessor() : accessor || {};
16
+ const controller = new LiquidGlassController(el, initialOpts);
17
+
18
+ createEffect(() => {
19
+ const nextOpts = typeof accessor === 'function' ? accessor() : accessor || {};
20
+ controller.update(nextOpts);
21
+ });
22
+
23
+ onCleanup(() => {
24
+ controller.destroy();
25
+ });
26
+
27
+ return controller;
28
+ }
29
+
30
+ /**
31
+ * SolidJS <LiquidGlass> Component
32
+ */
33
+ export function LiquidGlass(props) {
34
+ let elRef;
35
+ let controller = null;
36
+
37
+ createEffect(() => {
38
+ const opts = {
39
+ rim: props.rim ?? OPTICAL_DEFAULTS.rim,
40
+ ior: props.ior ?? OPTICAL_DEFAULTS.ior,
41
+ height: props.height ?? OPTICAL_DEFAULTS.height,
42
+ frosted: props.frosted ?? OPTICAL_DEFAULTS.frosted,
43
+ fusion: props.fusion ?? OPTICAL_DEFAULTS.fusion,
44
+ borderRadius: props.borderRadius ?? null
45
+ };
46
+
47
+ if (!controller && elRef) {
48
+ controller = new LiquidGlassController(elRef, opts);
49
+ } else if (controller) {
50
+ controller.update(opts);
51
+ }
52
+ });
53
+
54
+ onCleanup(() => {
55
+ if (controller) {
56
+ controller.destroy();
57
+ controller = null;
58
+ }
59
+ });
60
+
61
+ return {
62
+ ref(node) {
63
+ elRef = node;
64
+ if (node && !controller) {
65
+ controller = new LiquidGlassController(node, {
66
+ rim: props.rim ?? OPTICAL_DEFAULTS.rim,
67
+ ior: props.ior ?? OPTICAL_DEFAULTS.ior,
68
+ height: props.height ?? OPTICAL_DEFAULTS.height,
69
+ frosted: props.frosted ?? OPTICAL_DEFAULTS.frosted,
70
+ fusion: props.fusion ?? OPTICAL_DEFAULTS.fusion,
71
+ borderRadius: props.borderRadius ?? null
72
+ });
73
+ }
74
+ if (typeof props.ref === 'function') props.ref(node);
75
+ }
76
+ };
77
+ }
78
+
79
+ export { LiquidGlassController, OPTICAL_DEFAULTS, OPTICAL_LIMITS };
80
+ export default liquidGlass;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Svelte Adapter for Liquid Glass UI (use:liquidGlass Action + Helper)
3
+ */
4
+ const { LiquidGlassController, OPTICAL_DEFAULTS, OPTICAL_LIMITS } = require('./core.cjs');
5
+
6
+ /**
7
+ * Svelte Action:
8
+ * <div use:liquidGlass={{ rim: 16, ior: 1.46, height: 18, frosted: 0, fusion: true }}>...</div>
9
+ *
10
+ * @param {HTMLElement} node
11
+ * @param {Object} options
12
+ */
13
+ exports.liquidGlass = function liquidGlass(node, options = {}) {
14
+ const controller = new LiquidGlassController(node, options);
15
+
16
+ return {
17
+ update(newOptions = {}) {
18
+ controller.update(newOptions);
19
+ },
20
+ destroy() {
21
+ controller.destroy();
22
+ }
23
+ };
24
+ }
25
+
26
+ exports.LiquidGlassController = LiquidGlassController;
27
+ exports.OPTICAL_DEFAULTS = OPTICAL_DEFAULTS;
28
+ exports.OPTICAL_LIMITS = OPTICAL_LIMITS;
29
+ exports.default = liquidGlass;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Svelte Adapter for Liquid Glass UI (use:liquidGlass Action + Helper)
3
+ */
4
+ import { LiquidGlassController, OPTICAL_DEFAULTS, OPTICAL_LIMITS } from './core.mjs';
5
+
6
+ /**
7
+ * Svelte Action:
8
+ * <div use:liquidGlass={{ rim: 16, ior: 1.46, height: 18, frosted: 0, fusion: true }}>...</div>
9
+ *
10
+ * @param {HTMLElement} node
11
+ * @param {Object} options
12
+ */
13
+ export function liquidGlass(node, options = {}) {
14
+ const controller = new LiquidGlassController(node, options);
15
+
16
+ return {
17
+ update(newOptions = {}) {
18
+ controller.update(newOptions);
19
+ },
20
+ destroy() {
21
+ controller.destroy();
22
+ }
23
+ };
24
+ }
25
+
26
+ export { LiquidGlassController, OPTICAL_DEFAULTS, OPTICAL_LIMITS };
27
+ export default liquidGlass;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Pre-computed Empirical Optical Calibration Tables (256-point Float32 LUTs)
3
+ * Exported directly from tables/optical_calibration_matrix.xlsx
4
+ */
5
+
6
+ const _T0 = exports._T0 = /*#__PURE__*/ new Float32Array([2.8, 2.799828, 2.799314, 2.798459, 2.797266, 2.795737, 2.793875, 2.791681, 2.789157, 2.786307, 2.783133, 2.779637, 2.775821, 2.771688, 2.767241, 2.762482, 2.757414, 2.75204, 2.746362, 2.740383, 2.734106, 2.727534, 2.72067, 2.713516, 2.706075, 2.698351, 2.690347, 2.682065, 2.673508, 2.66468, 2.655584, 2.646223, 2.6366, 2.626719, 2.616582, 2.606193, 2.595555, 2.584672, 2.573546, 2.562182, 2.550582, 2.538751, 2.526691, 2.514406, 2.501899, 2.489175, 2.476236, 2.463086, 2.449728, 2.436167, 2.422406, 2.408448, 2.394297, 2.379957, 2.365432, 2.350724, 2.335838, 2.320778, 2.305547, 2.290149, 2.274588, 2.258867, 2.242991, 2.226963, 2.210786, 2.194465, 2.178003, 2.161405, 2.144674, 2.127813, 2.110828, 2.09372, 2.076496, 2.059157, 2.041709, 2.024154, 2.006498, 1.988742, 1.970893, 1.952952, 1.934925, 1.916815, 1.898626, 1.880361, 1.862025, 1.843621, 1.825154, 1.806626, 1.788043, 1.769407, 1.750723, 1.731993, 1.713223, 1.694416, 1.675575, 1.656705, 1.637809, 1.61889, 1.599953, 1.581002, 1.562039, 1.54307, 1.524096, 1.505122, 1.486153, 1.46719, 1.448238, 1.429301, 1.410382, 1.391484, 1.372611, 1.353767, 1.334956, 1.316179, 1.297442, 1.278747, 1.260098, 1.241498, 1.222951, 1.20446, 1.186028, 1.167658, 1.149354, 1.131119, 1.112957, 1.094869, 1.07686, 1.058932, 1.041089, 1.023334, 1.005669, 0.988098, 0.970623, 0.953248, 0.935976, 0.918808, 0.901748, 0.8848, 0.867964, 0.851245, 0.834644, 0.818165, 0.80181, 0.785582, 0.769483, 0.753515, 0.737681, 0.721983, 0.706423, 0.691005, 0.67573, 0.6606, 0.645617, 0.630784, 0.616102, 0.601575, 0.587202, 0.572987, 0.558931, 0.545037, 0.531305, 0.517738, 0.504337, 0.491103, 0.47804, 0.465147, 0.452426, 0.439879, 0.427507, 0.415311, 0.403292, 0.391452, 0.379792, 0.368313, 0.357015, 0.3459, 0.334969, 0.324222, 0.313659, 0.303283, 0.293093, 0.28309, 0.273274, 0.263645, 0.254205, 0.244954, 0.235891, 0.227016, 0.218331, 0.209834, 0.201526, 0.193407, 0.185476, 0.177733, 0.170178, 0.162811, 0.15563, 0.148636, 0.141828, 0.135204, 0.128765, 0.122509, 0.116436, 0.110544, 0.104832, 0.099299, 0.093945, 0.088766, 0.083763, 0.078934, 0.074276, 0.069789, 0.065471, 0.061319, 0.057333, 0.053509, 0.049846, 0.046341, 0.042993, 0.039799, 0.036757, 0.033864, 0.031117, 0.028514, 0.026052, 0.023727, 0.021539, 0.019482, 0.017554, 0.015751, 0.014071, 0.01251, 0.011064, 0.009729, 0.008503, 0.00738, 0.006358, 0.005432, 0.004598, 0.003852, 0.003189, 0.002605, 0.002096, 0.001656, 0.001282, 0.000967, 0.000709, 0.0005, 0.000336, 0.000213, 0.000124, 6.4e-05, 2.7e-05, 8e-06, 1e-06, 0.0]);
7
+
8
+ const _T1 = exports._T1 = /*#__PURE__*/ new Float32Array([155.0, 148.3395, 141.9652, 135.86482, 130.02657, 124.4392, 119.09193, 113.97443, 109.07684, 104.3897, 99.90397, 95.611, 91.5025, 87.57055, 83.80755, 80.20626, 76.75972, 73.46128, 70.30458, 67.28352, 64.39228, 61.62528, 58.97718, 56.44287, 54.01747, 51.69628, 49.47484, 47.34886, 45.31423, 43.36704, 41.50351, 39.72007, 38.01326, 36.37979, 34.81651, 33.32041, 31.8886, 30.51832, 29.20692, 27.95187, 26.75075, 25.60124, 24.50113, 23.44829, 22.4407, 21.4764, 20.55354, 19.67033, 18.82508, 18.01614, 17.24197, 16.50107, 15.792, 15.1134, 14.46397, 13.84243, 13.24761, 12.67835, 12.13355, 11.61216, 11.11317, 10.63563, 10.1786, 9.74122, 9.32263, 8.92203, 8.53864, 8.17172, 7.82058, 7.48452, 7.1629, 6.85511, 6.56054, 6.27862, 6.00882, 5.75062, 5.50351, 5.26702, 5.04069, 4.82409, 4.61679, 4.4184, 4.22854, 4.04683, 3.87294, 3.70651, 3.54724, 3.39481, 3.24893, 3.10932, 2.97571, 2.84784, 2.72547, 2.60835, 2.49627, 2.389, 2.28635, 2.1881, 2.09407, 2.00409, 1.91797, 1.83555, 1.75668, 1.68119, 1.60895, 1.53981, 1.47364, 1.41032, 1.34972, 1.29172, 1.23621, 1.18309, 1.13225, 1.0836, 1.03704, 0.99247, 0.94983, 0.90901, 0.86995, 0.83257, 0.79679, 0.76255, 0.72978, 0.69842, 0.66841, 0.63969, 0.6122, 0.5859, 0.56072, 0.53662, 0.51356, 0.4915, 0.47038, 0.45016, 0.43082, 0.41231, 0.39459, 0.37763, 0.36141, 0.34588, 0.33101, 0.31679, 0.30318, 0.29015, 0.27768, 0.26575, 0.25433, 0.2434, 0.23294, 0.22293, 0.21335, 0.20418, 0.19541, 0.18701, 0.17898, 0.17129, 0.16393, 0.15688, 0.15014, 0.14369, 0.13751, 0.13161, 0.12595, 0.12054, 0.11536, 0.1104, 0.10566, 0.10112, 0.09677, 0.09261, 0.08863, 0.08483, 0.08118, 0.07769, 0.07435, 0.07116, 0.0681, 0.06517, 0.06237, 0.05969, 0.05713, 0.05467, 0.05232, 0.05008, 0.04792, 0.04586, 0.04389, 0.04201, 0.0402, 0.03847, 0.03682, 0.03524, 0.03372, 0.03228, 0.03089, 0.02956, 0.02829, 0.02708, 0.02591, 0.0248, 0.02373, 0.02271, 0.02174, 0.0208, 0.01991, 0.01905, 0.01823, 0.01745, 0.0167, 0.01598, 0.0153, 0.01464, 0.01401, 0.01341, 0.01283, 0.01228, 0.01175, 0.01125, 0.01076, 0.0103, 0.00986, 0.00944, 0.00903, 0.00864, 0.00827, 0.00792, 0.00758, 0.00725, 0.00694, 0.00664, 0.00635, 0.00608, 0.00582, 0.00557, 0.00533, 0.0051, 0.00488, 0.00467, 0.00447, 0.00428, 0.0041, 0.00392, 0.00375, 0.00359, 0.00344, 0.00329, 0.00315, 0.00301, 0.00288, 0.00276, 0.00264, 0.00253, 0.00242, 0.00231, 0.00221, 0.00212]);
9
+
10
+ const _T2 = exports._T2 = /*#__PURE__*/ new Float32Array([32.0, 31.500984, 31.007828, 30.520484, 30.038908, 29.563054, 29.092875, 28.628328, 28.169366, 27.715945, 27.268019, 26.825545, 26.388479, 25.956774, 25.530389, 25.109278, 24.693398, 24.282706, 23.877158, 23.476712, 23.081323, 22.69095, 22.30555, 21.92508, 21.549499, 21.178763, 20.812832, 20.451664, 20.095216, 19.743449, 19.396319, 19.053788, 18.715813, 18.382355, 18.053373, 17.728826, 17.408675, 17.09288, 16.7814, 16.474197, 16.171232, 15.872464, 15.577855, 15.287367, 15.000961, 14.718598, 14.44024, 14.165849, 13.895387, 13.628816, 13.3661, 13.1072, 12.85208, 12.600702, 12.35303, 12.109027, 11.868657, 11.631883, 11.398669, 11.168981, 10.942781, 10.720034, 10.500706, 10.28476, 10.072163, 9.862878, 9.656872, 9.45411, 9.254558, 9.058182, 8.864948, 8.674822, 8.48777, 8.30376, 8.122759, 7.944732, 7.769649, 7.597475, 7.428178, 7.261727, 7.098089, 6.937232, 6.779125, 6.623736, 6.471034, 6.320988, 6.173566, 6.028738, 5.886473, 5.746741, 5.609511, 5.474754, 5.34244, 5.212539, 5.085021, 4.959857, 4.837019, 4.716476, 4.5982, 4.482163, 4.368336, 4.256691, 4.1472, 4.039835, 3.934568, 3.831372, 3.730219, 3.631083, 3.533935, 3.438751, 3.345502, 3.254162, 3.164706, 3.077107, 2.99134, 2.907377, 2.825195, 2.744768, 2.66607, 2.589077, 2.513763, 2.440105, 2.368077, 2.297656, 2.228817, 2.161537, 2.095792, 2.031558, 1.968812, 1.90753, 1.847691, 1.78927, 1.732247, 1.676597, 1.622298, 1.56933, 1.517669, 1.467294, 1.418184, 1.370318, 1.323673, 1.278229, 1.233966, 1.190862, 1.148897, 1.108052, 1.068305, 1.029637, 0.992029, 0.95546, 0.919912, 0.885366, 0.851801, 0.8192, 0.787544, 0.756814, 0.726993, 0.698061, 0.670002, 0.642798, 0.61643, 0.590882, 0.566136, 0.542176, 0.518985, 0.496546, 0.474842, 0.453858, 0.433577, 0.413984, 0.395062, 0.376796, 0.359171, 0.342172, 0.325784, 0.309991, 0.29478, 0.280135, 0.266043, 0.25249, 0.239461, 0.226943, 0.214922, 0.203385, 0.192319, 0.181711, 0.171548, 0.161817, 0.152507, 0.143603, 0.135096, 0.126972, 0.119221, 0.111829, 0.104787, 0.098083, 0.091706, 0.085645, 0.079889, 0.074429, 0.069253, 0.064352, 0.059716, 0.055335, 0.0512, 0.047301, 0.043629, 0.040175, 0.03693, 0.033886, 0.031034, 0.028366, 0.025874, 0.02355, 0.021386, 0.019374, 0.017508, 0.015781, 0.014184, 0.012712, 0.011357, 0.010114, 0.008975, 0.007936, 0.006989, 0.00613, 0.005353, 0.004652, 0.004022, 0.003458, 0.002956, 0.002511, 0.002118, 0.001773, 0.001472, 0.001211, 0.000986, 0.000794, 0.000632, 0.000496, 0.000383, 0.000291, 0.000216, 0.000157, 0.000111, 7.6e-05, 5e-05, 3.1e-05, 1.8e-05, 1e-05, 5e-06, 2e-06, 1e-06, 0.0, 0.0, 0.0]);
11
+
12
+ const _T3 = exports._T3 = /*#__PURE__*/ new Float32Array([0.25, 0.248043, 0.246094, 0.244152, 0.242218, 0.240292, 0.238374, 0.236463, 0.23456, 0.232664, 0.230777, 0.228897, 0.227024, 0.22516, 0.223303, 0.221453, 0.219612, 0.217778, 0.215952, 0.214133, 0.212322, 0.210519, 0.208724, 0.206936, 0.205156, 0.203383, 0.201619, 0.199862, 0.198112, 0.196371, 0.194637, 0.19291, 0.191192, 0.189481, 0.187778, 0.186082, 0.184394, 0.182714, 0.181042, 0.179377, 0.17772, 0.176071, 0.174429, 0.172795, 0.171169, 0.16955, 0.167939, 0.166336, 0.16474, 0.163153, 0.161572, 0.16, 0.158435, 0.156878, 0.155329, 0.153787, 0.152253, 0.150727, 0.149208, 0.147697, 0.146194, 0.144698, 0.14321, 0.14173, 0.140258, 0.138793, 0.137336, 0.135886, 0.134444, 0.13301, 0.131584, 0.130165, 0.128754, 0.127351, 0.125955, 0.124567, 0.123187, 0.121815, 0.12045, 0.119093, 0.117743, 0.116401, 0.115067, 0.113741, 0.112422, 0.111111, 0.109808, 0.108512, 0.107224, 0.105944, 0.104671, 0.103406, 0.102149, 0.1009, 0.099658, 0.098424, 0.097197, 0.095978, 0.094767, 0.093564, 0.092368, 0.09118, 0.09, 0.088827, 0.087662, 0.086505, 0.085356, 0.084214, 0.08308, 0.081953, 0.080834, 0.079723, 0.07862, 0.077524, 0.076436, 0.075356, 0.074283, 0.073218, 0.072161, 0.071111, 0.070069, 0.069035, 0.068008, 0.06699, 0.065978, 0.064975, 0.063979, 0.062991, 0.062011, 0.061038, 0.060073, 0.059116, 0.058166, 0.057224, 0.05629, 0.055363, 0.054444, 0.053533, 0.05263, 0.051734, 0.050846, 0.049965, 0.049093, 0.048228, 0.04737, 0.046521, 0.045679, 0.044844, 0.044018, 0.043199, 0.042388, 0.041584, 0.040788, 0.04, 0.03922, 0.038447, 0.037682, 0.036924, 0.036175, 0.035433, 0.034698, 0.033972, 0.033253, 0.032541, 0.031838, 0.031142, 0.030454, 0.029773, 0.0291, 0.028435, 0.027778, 0.027128, 0.026486, 0.025852, 0.025225, 0.024606, 0.023995, 0.023391, 0.022795, 0.022207, 0.021626, 0.021053, 0.020488, 0.019931, 0.019381, 0.018839, 0.018304, 0.017778, 0.017259, 0.016747, 0.016244, 0.015748, 0.01526, 0.014779, 0.014306, 0.013841, 0.013383, 0.012933, 0.012491, 0.012057, 0.01163, 0.011211, 0.0108, 0.010396, 0.01, 0.009612, 0.009231, 0.008858, 0.008493, 0.008135, 0.007785, 0.007443, 0.007109, 0.006782, 0.006463, 0.006151, 0.005848, 0.005552, 0.005263, 0.004983, 0.00471, 0.004444, 0.004187, 0.003937, 0.003695, 0.00346, 0.003233, 0.003014, 0.002803, 0.002599, 0.002403, 0.002215, 0.002034, 0.001861, 0.001696, 0.001538, 0.001388, 0.001246, 0.001111, 0.000984, 0.000865, 0.000754, 0.00065, 0.000554, 0.000465, 0.000384, 0.000311, 0.000246, 0.000188, 0.000138, 9.6e-05, 6.2e-05, 3.5e-05, 1.5e-05, 4e-06, 0.0]);
13
+
14
+ const _T4 = exports._T4 = /*#__PURE__*/ new Float32Array([0.022, 0.021999, 0.021995, 0.021988, 0.021979, 0.021967, 0.021952, 0.021935, 0.021915, 0.021892, 0.021867, 0.02184, 0.02181, 0.021778, 0.021743, 0.021705, 0.021665, 0.021623, 0.021579, 0.021532, 0.021482, 0.021431, 0.021377, 0.02132, 0.021262, 0.021201, 0.021138, 0.021073, 0.021006, 0.020937, 0.020865, 0.020792, 0.020716, 0.020639, 0.020559, 0.020477, 0.020394, 0.020308, 0.020221, 0.020131, 0.02004, 0.019947, 0.019853, 0.019756, 0.019658, 0.019558, 0.019456, 0.019353, 0.019248, 0.019141, 0.019033, 0.018924, 0.018812, 0.0187, 0.018586, 0.01847, 0.018353, 0.018235, 0.018115, 0.017994, 0.017872, 0.017748, 0.017624, 0.017498, 0.01737, 0.017242, 0.017113, 0.016982, 0.016851, 0.016719, 0.016585, 0.016451, 0.016315, 0.016179, 0.016042, 0.015904, 0.015765, 0.015626, 0.015486, 0.015345, 0.015203, 0.015061, 0.014918, 0.014774, 0.01463, 0.014486, 0.01434, 0.014195, 0.014049, 0.013902, 0.013756, 0.013609, 0.013461, 0.013313, 0.013165, 0.013017, 0.012868, 0.01272, 0.012571, 0.012422, 0.012273, 0.012124, 0.011975, 0.011826, 0.011677, 0.011528, 0.011379, 0.01123, 0.011082, 0.010933, 0.010785, 0.010637, 0.010489, 0.010341, 0.010194, 0.010047, 0.009901, 0.009755, 0.009609, 0.009464, 0.009319, 0.009174, 0.009031, 0.008887, 0.008745, 0.008603, 0.008461, 0.00832, 0.00818, 0.00804, 0.007902, 0.007764, 0.007626, 0.00749, 0.007354, 0.007219, 0.007085, 0.006952, 0.00682, 0.006688, 0.006558, 0.006428, 0.0063, 0.006172, 0.006046, 0.00592, 0.005796, 0.005673, 0.00555, 0.005429, 0.005309, 0.00519, 0.005073, 0.004956, 0.004841, 0.004727, 0.004614, 0.004502, 0.004392, 0.004282, 0.004175, 0.004068, 0.003963, 0.003859, 0.003756, 0.003655, 0.003555, 0.003456, 0.003359, 0.003263, 0.003169, 0.003076, 0.002984, 0.002894, 0.002805, 0.002718, 0.002632, 0.002547, 0.002464, 0.002383, 0.002303, 0.002224, 0.002147, 0.002072, 0.001997, 0.001925, 0.001853, 0.001784, 0.001715, 0.001649, 0.001583, 0.00152, 0.001457, 0.001396, 0.001337, 0.001279, 0.001223, 0.001168, 0.001114, 0.001062, 0.001012, 0.000963, 0.000915, 0.000869, 0.000824, 0.00078, 0.000738, 0.000697, 0.000658, 0.00062, 0.000584, 0.000548, 0.000514, 0.000482, 0.00045, 0.00042, 0.000392, 0.000364, 0.000338, 0.000313, 0.000289, 0.000266, 0.000244, 0.000224, 0.000205, 0.000186, 0.000169, 0.000153, 0.000138, 0.000124, 0.000111, 9.8e-05, 8.7e-05, 7.6e-05, 6.7e-05, 5.8e-05, 5e-05, 4.3e-05, 3.6e-05, 3e-05, 2.5e-05, 2e-05, 1.6e-05, 1.3e-05, 1e-05, 8e-06, 6e-06, 4e-06, 3e-06, 2e-06, 1e-06, 1e-06, 0.0, 0.0, 0.0, 0.0]);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Pre-computed Empirical Optical Calibration Tables (256-point Float32 LUTs)
3
+ * Exported directly from tables/optical_calibration_matrix.xlsx
4
+ */
5
+
6
+ export const _T0 = /*#__PURE__*/ new Float32Array([2.8, 2.799828, 2.799314, 2.798459, 2.797266, 2.795737, 2.793875, 2.791681, 2.789157, 2.786307, 2.783133, 2.779637, 2.775821, 2.771688, 2.767241, 2.762482, 2.757414, 2.75204, 2.746362, 2.740383, 2.734106, 2.727534, 2.72067, 2.713516, 2.706075, 2.698351, 2.690347, 2.682065, 2.673508, 2.66468, 2.655584, 2.646223, 2.6366, 2.626719, 2.616582, 2.606193, 2.595555, 2.584672, 2.573546, 2.562182, 2.550582, 2.538751, 2.526691, 2.514406, 2.501899, 2.489175, 2.476236, 2.463086, 2.449728, 2.436167, 2.422406, 2.408448, 2.394297, 2.379957, 2.365432, 2.350724, 2.335838, 2.320778, 2.305547, 2.290149, 2.274588, 2.258867, 2.242991, 2.226963, 2.210786, 2.194465, 2.178003, 2.161405, 2.144674, 2.127813, 2.110828, 2.09372, 2.076496, 2.059157, 2.041709, 2.024154, 2.006498, 1.988742, 1.970893, 1.952952, 1.934925, 1.916815, 1.898626, 1.880361, 1.862025, 1.843621, 1.825154, 1.806626, 1.788043, 1.769407, 1.750723, 1.731993, 1.713223, 1.694416, 1.675575, 1.656705, 1.637809, 1.61889, 1.599953, 1.581002, 1.562039, 1.54307, 1.524096, 1.505122, 1.486153, 1.46719, 1.448238, 1.429301, 1.410382, 1.391484, 1.372611, 1.353767, 1.334956, 1.316179, 1.297442, 1.278747, 1.260098, 1.241498, 1.222951, 1.20446, 1.186028, 1.167658, 1.149354, 1.131119, 1.112957, 1.094869, 1.07686, 1.058932, 1.041089, 1.023334, 1.005669, 0.988098, 0.970623, 0.953248, 0.935976, 0.918808, 0.901748, 0.8848, 0.867964, 0.851245, 0.834644, 0.818165, 0.80181, 0.785582, 0.769483, 0.753515, 0.737681, 0.721983, 0.706423, 0.691005, 0.67573, 0.6606, 0.645617, 0.630784, 0.616102, 0.601575, 0.587202, 0.572987, 0.558931, 0.545037, 0.531305, 0.517738, 0.504337, 0.491103, 0.47804, 0.465147, 0.452426, 0.439879, 0.427507, 0.415311, 0.403292, 0.391452, 0.379792, 0.368313, 0.357015, 0.3459, 0.334969, 0.324222, 0.313659, 0.303283, 0.293093, 0.28309, 0.273274, 0.263645, 0.254205, 0.244954, 0.235891, 0.227016, 0.218331, 0.209834, 0.201526, 0.193407, 0.185476, 0.177733, 0.170178, 0.162811, 0.15563, 0.148636, 0.141828, 0.135204, 0.128765, 0.122509, 0.116436, 0.110544, 0.104832, 0.099299, 0.093945, 0.088766, 0.083763, 0.078934, 0.074276, 0.069789, 0.065471, 0.061319, 0.057333, 0.053509, 0.049846, 0.046341, 0.042993, 0.039799, 0.036757, 0.033864, 0.031117, 0.028514, 0.026052, 0.023727, 0.021539, 0.019482, 0.017554, 0.015751, 0.014071, 0.01251, 0.011064, 0.009729, 0.008503, 0.00738, 0.006358, 0.005432, 0.004598, 0.003852, 0.003189, 0.002605, 0.002096, 0.001656, 0.001282, 0.000967, 0.000709, 0.0005, 0.000336, 0.000213, 0.000124, 6.4e-05, 2.7e-05, 8e-06, 1e-06, 0.0]);
7
+
8
+ export const _T1 = /*#__PURE__*/ new Float32Array([155.0, 148.3395, 141.9652, 135.86482, 130.02657, 124.4392, 119.09193, 113.97443, 109.07684, 104.3897, 99.90397, 95.611, 91.5025, 87.57055, 83.80755, 80.20626, 76.75972, 73.46128, 70.30458, 67.28352, 64.39228, 61.62528, 58.97718, 56.44287, 54.01747, 51.69628, 49.47484, 47.34886, 45.31423, 43.36704, 41.50351, 39.72007, 38.01326, 36.37979, 34.81651, 33.32041, 31.8886, 30.51832, 29.20692, 27.95187, 26.75075, 25.60124, 24.50113, 23.44829, 22.4407, 21.4764, 20.55354, 19.67033, 18.82508, 18.01614, 17.24197, 16.50107, 15.792, 15.1134, 14.46397, 13.84243, 13.24761, 12.67835, 12.13355, 11.61216, 11.11317, 10.63563, 10.1786, 9.74122, 9.32263, 8.92203, 8.53864, 8.17172, 7.82058, 7.48452, 7.1629, 6.85511, 6.56054, 6.27862, 6.00882, 5.75062, 5.50351, 5.26702, 5.04069, 4.82409, 4.61679, 4.4184, 4.22854, 4.04683, 3.87294, 3.70651, 3.54724, 3.39481, 3.24893, 3.10932, 2.97571, 2.84784, 2.72547, 2.60835, 2.49627, 2.389, 2.28635, 2.1881, 2.09407, 2.00409, 1.91797, 1.83555, 1.75668, 1.68119, 1.60895, 1.53981, 1.47364, 1.41032, 1.34972, 1.29172, 1.23621, 1.18309, 1.13225, 1.0836, 1.03704, 0.99247, 0.94983, 0.90901, 0.86995, 0.83257, 0.79679, 0.76255, 0.72978, 0.69842, 0.66841, 0.63969, 0.6122, 0.5859, 0.56072, 0.53662, 0.51356, 0.4915, 0.47038, 0.45016, 0.43082, 0.41231, 0.39459, 0.37763, 0.36141, 0.34588, 0.33101, 0.31679, 0.30318, 0.29015, 0.27768, 0.26575, 0.25433, 0.2434, 0.23294, 0.22293, 0.21335, 0.20418, 0.19541, 0.18701, 0.17898, 0.17129, 0.16393, 0.15688, 0.15014, 0.14369, 0.13751, 0.13161, 0.12595, 0.12054, 0.11536, 0.1104, 0.10566, 0.10112, 0.09677, 0.09261, 0.08863, 0.08483, 0.08118, 0.07769, 0.07435, 0.07116, 0.0681, 0.06517, 0.06237, 0.05969, 0.05713, 0.05467, 0.05232, 0.05008, 0.04792, 0.04586, 0.04389, 0.04201, 0.0402, 0.03847, 0.03682, 0.03524, 0.03372, 0.03228, 0.03089, 0.02956, 0.02829, 0.02708, 0.02591, 0.0248, 0.02373, 0.02271, 0.02174, 0.0208, 0.01991, 0.01905, 0.01823, 0.01745, 0.0167, 0.01598, 0.0153, 0.01464, 0.01401, 0.01341, 0.01283, 0.01228, 0.01175, 0.01125, 0.01076, 0.0103, 0.00986, 0.00944, 0.00903, 0.00864, 0.00827, 0.00792, 0.00758, 0.00725, 0.00694, 0.00664, 0.00635, 0.00608, 0.00582, 0.00557, 0.00533, 0.0051, 0.00488, 0.00467, 0.00447, 0.00428, 0.0041, 0.00392, 0.00375, 0.00359, 0.00344, 0.00329, 0.00315, 0.00301, 0.00288, 0.00276, 0.00264, 0.00253, 0.00242, 0.00231, 0.00221, 0.00212]);
9
+
10
+ export const _T2 = /*#__PURE__*/ new Float32Array([32.0, 31.500984, 31.007828, 30.520484, 30.038908, 29.563054, 29.092875, 28.628328, 28.169366, 27.715945, 27.268019, 26.825545, 26.388479, 25.956774, 25.530389, 25.109278, 24.693398, 24.282706, 23.877158, 23.476712, 23.081323, 22.69095, 22.30555, 21.92508, 21.549499, 21.178763, 20.812832, 20.451664, 20.095216, 19.743449, 19.396319, 19.053788, 18.715813, 18.382355, 18.053373, 17.728826, 17.408675, 17.09288, 16.7814, 16.474197, 16.171232, 15.872464, 15.577855, 15.287367, 15.000961, 14.718598, 14.44024, 14.165849, 13.895387, 13.628816, 13.3661, 13.1072, 12.85208, 12.600702, 12.35303, 12.109027, 11.868657, 11.631883, 11.398669, 11.168981, 10.942781, 10.720034, 10.500706, 10.28476, 10.072163, 9.862878, 9.656872, 9.45411, 9.254558, 9.058182, 8.864948, 8.674822, 8.48777, 8.30376, 8.122759, 7.944732, 7.769649, 7.597475, 7.428178, 7.261727, 7.098089, 6.937232, 6.779125, 6.623736, 6.471034, 6.320988, 6.173566, 6.028738, 5.886473, 5.746741, 5.609511, 5.474754, 5.34244, 5.212539, 5.085021, 4.959857, 4.837019, 4.716476, 4.5982, 4.482163, 4.368336, 4.256691, 4.1472, 4.039835, 3.934568, 3.831372, 3.730219, 3.631083, 3.533935, 3.438751, 3.345502, 3.254162, 3.164706, 3.077107, 2.99134, 2.907377, 2.825195, 2.744768, 2.66607, 2.589077, 2.513763, 2.440105, 2.368077, 2.297656, 2.228817, 2.161537, 2.095792, 2.031558, 1.968812, 1.90753, 1.847691, 1.78927, 1.732247, 1.676597, 1.622298, 1.56933, 1.517669, 1.467294, 1.418184, 1.370318, 1.323673, 1.278229, 1.233966, 1.190862, 1.148897, 1.108052, 1.068305, 1.029637, 0.992029, 0.95546, 0.919912, 0.885366, 0.851801, 0.8192, 0.787544, 0.756814, 0.726993, 0.698061, 0.670002, 0.642798, 0.61643, 0.590882, 0.566136, 0.542176, 0.518985, 0.496546, 0.474842, 0.453858, 0.433577, 0.413984, 0.395062, 0.376796, 0.359171, 0.342172, 0.325784, 0.309991, 0.29478, 0.280135, 0.266043, 0.25249, 0.239461, 0.226943, 0.214922, 0.203385, 0.192319, 0.181711, 0.171548, 0.161817, 0.152507, 0.143603, 0.135096, 0.126972, 0.119221, 0.111829, 0.104787, 0.098083, 0.091706, 0.085645, 0.079889, 0.074429, 0.069253, 0.064352, 0.059716, 0.055335, 0.0512, 0.047301, 0.043629, 0.040175, 0.03693, 0.033886, 0.031034, 0.028366, 0.025874, 0.02355, 0.021386, 0.019374, 0.017508, 0.015781, 0.014184, 0.012712, 0.011357, 0.010114, 0.008975, 0.007936, 0.006989, 0.00613, 0.005353, 0.004652, 0.004022, 0.003458, 0.002956, 0.002511, 0.002118, 0.001773, 0.001472, 0.001211, 0.000986, 0.000794, 0.000632, 0.000496, 0.000383, 0.000291, 0.000216, 0.000157, 0.000111, 7.6e-05, 5e-05, 3.1e-05, 1.8e-05, 1e-05, 5e-06, 2e-06, 1e-06, 0.0, 0.0, 0.0]);
11
+
12
+ export const _T3 = /*#__PURE__*/ new Float32Array([0.25, 0.248043, 0.246094, 0.244152, 0.242218, 0.240292, 0.238374, 0.236463, 0.23456, 0.232664, 0.230777, 0.228897, 0.227024, 0.22516, 0.223303, 0.221453, 0.219612, 0.217778, 0.215952, 0.214133, 0.212322, 0.210519, 0.208724, 0.206936, 0.205156, 0.203383, 0.201619, 0.199862, 0.198112, 0.196371, 0.194637, 0.19291, 0.191192, 0.189481, 0.187778, 0.186082, 0.184394, 0.182714, 0.181042, 0.179377, 0.17772, 0.176071, 0.174429, 0.172795, 0.171169, 0.16955, 0.167939, 0.166336, 0.16474, 0.163153, 0.161572, 0.16, 0.158435, 0.156878, 0.155329, 0.153787, 0.152253, 0.150727, 0.149208, 0.147697, 0.146194, 0.144698, 0.14321, 0.14173, 0.140258, 0.138793, 0.137336, 0.135886, 0.134444, 0.13301, 0.131584, 0.130165, 0.128754, 0.127351, 0.125955, 0.124567, 0.123187, 0.121815, 0.12045, 0.119093, 0.117743, 0.116401, 0.115067, 0.113741, 0.112422, 0.111111, 0.109808, 0.108512, 0.107224, 0.105944, 0.104671, 0.103406, 0.102149, 0.1009, 0.099658, 0.098424, 0.097197, 0.095978, 0.094767, 0.093564, 0.092368, 0.09118, 0.09, 0.088827, 0.087662, 0.086505, 0.085356, 0.084214, 0.08308, 0.081953, 0.080834, 0.079723, 0.07862, 0.077524, 0.076436, 0.075356, 0.074283, 0.073218, 0.072161, 0.071111, 0.070069, 0.069035, 0.068008, 0.06699, 0.065978, 0.064975, 0.063979, 0.062991, 0.062011, 0.061038, 0.060073, 0.059116, 0.058166, 0.057224, 0.05629, 0.055363, 0.054444, 0.053533, 0.05263, 0.051734, 0.050846, 0.049965, 0.049093, 0.048228, 0.04737, 0.046521, 0.045679, 0.044844, 0.044018, 0.043199, 0.042388, 0.041584, 0.040788, 0.04, 0.03922, 0.038447, 0.037682, 0.036924, 0.036175, 0.035433, 0.034698, 0.033972, 0.033253, 0.032541, 0.031838, 0.031142, 0.030454, 0.029773, 0.0291, 0.028435, 0.027778, 0.027128, 0.026486, 0.025852, 0.025225, 0.024606, 0.023995, 0.023391, 0.022795, 0.022207, 0.021626, 0.021053, 0.020488, 0.019931, 0.019381, 0.018839, 0.018304, 0.017778, 0.017259, 0.016747, 0.016244, 0.015748, 0.01526, 0.014779, 0.014306, 0.013841, 0.013383, 0.012933, 0.012491, 0.012057, 0.01163, 0.011211, 0.0108, 0.010396, 0.01, 0.009612, 0.009231, 0.008858, 0.008493, 0.008135, 0.007785, 0.007443, 0.007109, 0.006782, 0.006463, 0.006151, 0.005848, 0.005552, 0.005263, 0.004983, 0.00471, 0.004444, 0.004187, 0.003937, 0.003695, 0.00346, 0.003233, 0.003014, 0.002803, 0.002599, 0.002403, 0.002215, 0.002034, 0.001861, 0.001696, 0.001538, 0.001388, 0.001246, 0.001111, 0.000984, 0.000865, 0.000754, 0.00065, 0.000554, 0.000465, 0.000384, 0.000311, 0.000246, 0.000188, 0.000138, 9.6e-05, 6.2e-05, 3.5e-05, 1.5e-05, 4e-06, 0.0]);
13
+
14
+ export const _T4 = /*#__PURE__*/ new Float32Array([0.022, 0.021999, 0.021995, 0.021988, 0.021979, 0.021967, 0.021952, 0.021935, 0.021915, 0.021892, 0.021867, 0.02184, 0.02181, 0.021778, 0.021743, 0.021705, 0.021665, 0.021623, 0.021579, 0.021532, 0.021482, 0.021431, 0.021377, 0.02132, 0.021262, 0.021201, 0.021138, 0.021073, 0.021006, 0.020937, 0.020865, 0.020792, 0.020716, 0.020639, 0.020559, 0.020477, 0.020394, 0.020308, 0.020221, 0.020131, 0.02004, 0.019947, 0.019853, 0.019756, 0.019658, 0.019558, 0.019456, 0.019353, 0.019248, 0.019141, 0.019033, 0.018924, 0.018812, 0.0187, 0.018586, 0.01847, 0.018353, 0.018235, 0.018115, 0.017994, 0.017872, 0.017748, 0.017624, 0.017498, 0.01737, 0.017242, 0.017113, 0.016982, 0.016851, 0.016719, 0.016585, 0.016451, 0.016315, 0.016179, 0.016042, 0.015904, 0.015765, 0.015626, 0.015486, 0.015345, 0.015203, 0.015061, 0.014918, 0.014774, 0.01463, 0.014486, 0.01434, 0.014195, 0.014049, 0.013902, 0.013756, 0.013609, 0.013461, 0.013313, 0.013165, 0.013017, 0.012868, 0.01272, 0.012571, 0.012422, 0.012273, 0.012124, 0.011975, 0.011826, 0.011677, 0.011528, 0.011379, 0.01123, 0.011082, 0.010933, 0.010785, 0.010637, 0.010489, 0.010341, 0.010194, 0.010047, 0.009901, 0.009755, 0.009609, 0.009464, 0.009319, 0.009174, 0.009031, 0.008887, 0.008745, 0.008603, 0.008461, 0.00832, 0.00818, 0.00804, 0.007902, 0.007764, 0.007626, 0.00749, 0.007354, 0.007219, 0.007085, 0.006952, 0.00682, 0.006688, 0.006558, 0.006428, 0.0063, 0.006172, 0.006046, 0.00592, 0.005796, 0.005673, 0.00555, 0.005429, 0.005309, 0.00519, 0.005073, 0.004956, 0.004841, 0.004727, 0.004614, 0.004502, 0.004392, 0.004282, 0.004175, 0.004068, 0.003963, 0.003859, 0.003756, 0.003655, 0.003555, 0.003456, 0.003359, 0.003263, 0.003169, 0.003076, 0.002984, 0.002894, 0.002805, 0.002718, 0.002632, 0.002547, 0.002464, 0.002383, 0.002303, 0.002224, 0.002147, 0.002072, 0.001997, 0.001925, 0.001853, 0.001784, 0.001715, 0.001649, 0.001583, 0.00152, 0.001457, 0.001396, 0.001337, 0.001279, 0.001223, 0.001168, 0.001114, 0.001062, 0.001012, 0.000963, 0.000915, 0.000869, 0.000824, 0.00078, 0.000738, 0.000697, 0.000658, 0.00062, 0.000584, 0.000548, 0.000514, 0.000482, 0.00045, 0.00042, 0.000392, 0.000364, 0.000338, 0.000313, 0.000289, 0.000266, 0.000244, 0.000224, 0.000205, 0.000186, 0.000169, 0.000153, 0.000138, 0.000124, 0.000111, 9.8e-05, 8.7e-05, 7.6e-05, 6.7e-05, 5.8e-05, 5e-05, 4.3e-05, 3.6e-05, 3e-05, 2.5e-05, 2e-05, 1.6e-05, 1.3e-05, 1e-05, 8e-06, 6e-06, 4e-06, 3e-06, 2e-06, 1e-06, 1e-06, 0.0, 0.0, 0.0, 0.0]);
package/dist/vue.cjs ADDED
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Vue 3 Adapter for Liquid Glass UI (Component + v-liquid-glass Directive)
3
+ */
4
+ const { defineComponent, h, ref, onMounted, onBeforeUnmount, watch } = require('vue');
5
+ const { LiquidGlassController, OPTICAL_DEFAULTS } = require('./core.cjs');
6
+
7
+ /**
8
+ * Vue Directive: v-liquid-glass="{ rim: 16, ior: 1.46, height: 18, frosted: 0, fusion: true }"
9
+ */
10
+ const vLiquidGlass = exports.vLiquidGlass = {
11
+ mounted(el, binding) {
12
+ el.__liquidGlass = new LiquidGlassController(el, binding.value || {});
13
+ },
14
+ updated(el, binding) {
15
+ if (el.__liquidGlass) {
16
+ el.__liquidGlass.update(binding.value || {});
17
+ }
18
+ },
19
+ unmounted(el) {
20
+ if (el.__liquidGlass) {
21
+ el.__liquidGlass.destroy();
22
+ delete el.__liquidGlass;
23
+ }
24
+ }
25
+ };
26
+
27
+ /**
28
+ * <LiquidGlass> Vue 3 Component
29
+ */
30
+ const LiquidGlass = exports.LiquidGlass = defineComponent({
31
+ name: 'LiquidGlass',
32
+ props: {
33
+ rim: { type: Number, default: OPTICAL_DEFAULTS.rim },
34
+ ior: { type: Number, default: OPTICAL_DEFAULTS.ior },
35
+ height: { type: Number, default: OPTICAL_DEFAULTS.height },
36
+ frosted: { type: Number, default: OPTICAL_DEFAULTS.frosted },
37
+ fusion: { type: Boolean, default: OPTICAL_DEFAULTS.fusion },
38
+ tag: { type: String, default: 'div' }
39
+ },
40
+ setup(props, { slots, attrs }) {
41
+ const rootRef = ref(null);
42
+ let controller = null;
43
+
44
+ onMounted(() => {
45
+ if (rootRef.value) {
46
+ controller = new LiquidGlassController(rootRef.value, {
47
+ rim: props.rim,
48
+ ior: props.ior,
49
+ height: props.height,
50
+ frosted: props.frosted,
51
+ fusion: props.fusion
52
+ });
53
+ }
54
+ });
55
+
56
+ watch(
57
+ () => [props.rim, props.ior, props.height, props.frosted, props.fusion],
58
+ ([rim, ior, height, frosted, fusion]) => {
59
+ if (controller) {
60
+ controller.update({ rim, ior, height, frosted, fusion });
61
+ }
62
+ }
63
+ );
64
+
65
+ onBeforeUnmount(() => {
66
+ if (controller) {
67
+ controller.destroy();
68
+ controller = null;
69
+ }
70
+ });
71
+
72
+ return () =>
73
+ h(
74
+ props.tag,
75
+ {
76
+ ref: rootRef,
77
+ ...attrs
78
+ },
79
+ slots.default ? slots.default() : null
80
+ );
81
+ }
82
+ });
83
+
84
+ const LiquidGlassPlugin = exports.LiquidGlassPlugin = {
85
+ install(app) {
86
+ app.component('LiquidGlass', LiquidGlass);
87
+ app.directive('liquid-glass', vLiquidGlass);
88
+ }
89
+ };
90
+
91
+ exports.LiquidGlassController = require('./core.cjs').LiquidGlassController;
92
+ exports.OPTICAL_DEFAULTS = require('./core.cjs').OPTICAL_DEFAULTS;
93
+ exports.OPTICAL_LIMITS = require('./core.cjs').OPTICAL_LIMITS;
94
+ exports.default = LiquidGlass;