@relu-interactives/spatial-ecs 0.8.0 → 0.9.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/{XRHandPose-G0Dl-F0w.d.ts → XRHandPose-CWSrsnYN.d.ts} +144 -1
- package/dist/{XRHandPose-VQMT1WXj.d.cts → XRHandPose-Dn2yiALk.d.cts} +144 -1
- package/dist/{chunk-G4XJ53LS.js → chunk-JEPUCLZX.js} +3 -3
- package/dist/{chunk-G4XJ53LS.js.map → chunk-JEPUCLZX.js.map} +1 -1
- package/dist/{chunk-NNDUOQ7O.js → chunk-JNYPJB55.js} +250 -3
- package/dist/chunk-JNYPJB55.js.map +1 -0
- package/dist/{chunk-SGF73YTF.js → chunk-NXASMBDS.js} +4 -4
- package/dist/{chunk-SGF73YTF.js.map → chunk-NXASMBDS.js.map} +1 -1
- package/dist/{chunk-JIJQFW6P.js → chunk-VYIWOXAY.js} +1377 -480
- package/dist/chunk-VYIWOXAY.js.map +1 -0
- package/dist/{chunk-U727NTWQ.js → chunk-WWP46AEF.js} +26 -4
- package/dist/chunk-WWP46AEF.js.map +1 -0
- package/dist/components/index.cjs +151 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/docs/guide/spatial-ui.md +83 -7
- package/dist/factories/index.cjs +151 -0
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +1 -1
- package/dist/factories/index.d.ts +1 -1
- package/dist/factories/index.js +3 -3
- package/dist/{index-D9DjrUn3.d.cts → index-CAZHrh0q.d.cts} +5 -2
- package/dist/{index-DppafVu4.d.ts → index-CLtSMf2M.d.ts} +5 -2
- package/dist/{index-C61n65PE.d.ts → index-D5MmJNyj.d.ts} +26 -1
- package/dist/{index-C70N4BYG.d.cts → index-DiIjV2lm.d.cts} +26 -1
- package/dist/index.cjs +1787 -621
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +10 -10
- package/dist/network/index.cjs +177 -4
- package/dist/network/index.cjs.map +1 -1
- package/dist/network/index.js +3 -3
- package/dist/systems/index.cjs +1689 -523
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +1 -1
- package/dist/systems/index.d.ts +1 -1
- package/dist/systems/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-JIJQFW6P.js.map +0 -1
- package/dist/chunk-NNDUOQ7O.js.map +0 -1
- package/dist/chunk-U727NTWQ.js.map +0 -1
|
@@ -1663,6 +1663,80 @@ declare class BoneAttachmentComponent extends Component {
|
|
|
1663
1663
|
constructor(options?: BoneAttachmentOptions);
|
|
1664
1664
|
}
|
|
1665
1665
|
|
|
1666
|
+
/**
|
|
1667
|
+
* The style model for spatial UI.
|
|
1668
|
+
*
|
|
1669
|
+
* Every field here is optional and stays ABSENT until authored. A defaulted
|
|
1670
|
+
* field would show up as a change on every instance of a prefab saved before
|
|
1671
|
+
* it existed, pinning those instances against later prefab edits. Old flat
|
|
1672
|
+
* fields (`backgroundColor`, `cornerRadius`…) stay as the fallback, so a scene
|
|
1673
|
+
* saved before this model renders the same.
|
|
1674
|
+
*
|
|
1675
|
+
* Units are metres. Any colour or file string may be a token, `$name`, which
|
|
1676
|
+
* resolves through `tokens` on the nearest panel above the widget. A theme
|
|
1677
|
+
* therefore travels with a prefab, and editing one panel restyles a menu.
|
|
1678
|
+
*
|
|
1679
|
+
* Pure and free of three.js and the DOM.
|
|
1680
|
+
*/
|
|
1681
|
+
type UiColorStop = {
|
|
1682
|
+
at: number;
|
|
1683
|
+
color: string;
|
|
1684
|
+
};
|
|
1685
|
+
type UiPaint = {
|
|
1686
|
+
kind: "solid";
|
|
1687
|
+
color: string;
|
|
1688
|
+
}
|
|
1689
|
+
/** `angle` is in degrees and reads like CSS: 0 points up, 90 points right. */
|
|
1690
|
+
| {
|
|
1691
|
+
kind: "linear";
|
|
1692
|
+
angle: number;
|
|
1693
|
+
stops: UiColorStop[];
|
|
1694
|
+
} | {
|
|
1695
|
+
kind: "radial";
|
|
1696
|
+
stops: UiColorStop[];
|
|
1697
|
+
} | {
|
|
1698
|
+
kind: "image";
|
|
1699
|
+
src: string;
|
|
1700
|
+
fit: "cover" | "contain" | "fill";
|
|
1701
|
+
tint?: string;
|
|
1702
|
+
};
|
|
1703
|
+
type UiShadow = {
|
|
1704
|
+
x: number;
|
|
1705
|
+
y: number;
|
|
1706
|
+
blur: number;
|
|
1707
|
+
color: string;
|
|
1708
|
+
};
|
|
1709
|
+
type UiTextStyle = {
|
|
1710
|
+
/** A font file in the project, such as one `add_font` bundled. */
|
|
1711
|
+
font?: string;
|
|
1712
|
+
weight?: number;
|
|
1713
|
+
/** Letter spacing in metres. */
|
|
1714
|
+
tracking?: number;
|
|
1715
|
+
transform?: "upper" | "lower";
|
|
1716
|
+
paint?: UiPaint;
|
|
1717
|
+
maxLines?: number;
|
|
1718
|
+
shadow?: UiShadow;
|
|
1719
|
+
};
|
|
1720
|
+
type UiStyle = {
|
|
1721
|
+
fill?: UiPaint;
|
|
1722
|
+
border?: {
|
|
1723
|
+
width: number;
|
|
1724
|
+
paint: UiPaint;
|
|
1725
|
+
};
|
|
1726
|
+
/** One radius, or top-left, top-right, bottom-right, bottom-left. */
|
|
1727
|
+
radius?: number | [number, number, number, number];
|
|
1728
|
+
shadows?: UiShadow[];
|
|
1729
|
+
/** A thin highlight along the top inner edge. */
|
|
1730
|
+
edge?: {
|
|
1731
|
+
width: number;
|
|
1732
|
+
color: string;
|
|
1733
|
+
};
|
|
1734
|
+
/** 0–1. Multiplies down the widget tree, so fading a panel fades its menu. */
|
|
1735
|
+
opacity?: number;
|
|
1736
|
+
text?: UiTextStyle;
|
|
1737
|
+
};
|
|
1738
|
+
type UiTokens = Record<string, string>;
|
|
1739
|
+
|
|
1666
1740
|
/** How a panel orients itself while the experience runs. */
|
|
1667
1741
|
type UiFollowMode = "world" | "billboard";
|
|
1668
1742
|
/** Optional initializer for {@link UIPanelComponent}. */
|
|
@@ -1676,6 +1750,8 @@ type UIPanelOptions = {
|
|
|
1676
1750
|
borderColor?: string;
|
|
1677
1751
|
pixelDensity?: number;
|
|
1678
1752
|
follow?: UiFollowMode;
|
|
1753
|
+
style?: UiStyle;
|
|
1754
|
+
tokens?: UiTokens;
|
|
1679
1755
|
};
|
|
1680
1756
|
/**
|
|
1681
1757
|
* A flat UI surface in the world — the backdrop menus and HUDs are built on.
|
|
@@ -1707,6 +1783,13 @@ declare class UIPanelComponent extends Component {
|
|
|
1707
1783
|
/** Texture density in px/metre, clamped 256–2048 at render time. */
|
|
1708
1784
|
pixelDensity: number;
|
|
1709
1785
|
follow: UiFollowMode;
|
|
1786
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1787
|
+
style?: UiStyle;
|
|
1788
|
+
/**
|
|
1789
|
+
* Named values widgets under this panel use as `$name`. The nearest panel
|
|
1790
|
+
* wins, so a theme travels with the panel and one edit restyles the menu.
|
|
1791
|
+
*/
|
|
1792
|
+
tokens?: UiTokens;
|
|
1710
1793
|
constructor(options?: UIPanelOptions);
|
|
1711
1794
|
}
|
|
1712
1795
|
|
|
@@ -1724,6 +1807,8 @@ type UITextOptions = {
|
|
|
1724
1807
|
valign?: UiTextVAlign;
|
|
1725
1808
|
lineHeight?: number;
|
|
1726
1809
|
padding?: number;
|
|
1810
|
+
pixelDensity?: number;
|
|
1811
|
+
style?: UiStyle;
|
|
1727
1812
|
};
|
|
1728
1813
|
/**
|
|
1729
1814
|
* A block of text drawn onto a transparent canvas quad.
|
|
@@ -1752,9 +1837,18 @@ declare class UITextComponent extends Component {
|
|
|
1752
1837
|
lineHeight: number;
|
|
1753
1838
|
/** Inner padding in metres. */
|
|
1754
1839
|
padding: number;
|
|
1840
|
+
/**
|
|
1841
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
1842
|
+
* the default: a defaulted field would count as a change on every instance
|
|
1843
|
+
* of a prefab saved before it existed.
|
|
1844
|
+
*/
|
|
1845
|
+
pixelDensity?: number;
|
|
1846
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1847
|
+
style?: UiStyle;
|
|
1755
1848
|
constructor(options?: UITextOptions);
|
|
1756
1849
|
}
|
|
1757
1850
|
|
|
1851
|
+
type UiIconPosition = "left" | "right";
|
|
1758
1852
|
/** Optional initializer for {@link UIButtonComponent}. */
|
|
1759
1853
|
type UIButtonOptions = {
|
|
1760
1854
|
label?: string;
|
|
@@ -1769,6 +1863,10 @@ type UIButtonOptions = {
|
|
|
1769
1863
|
cornerRadius?: number;
|
|
1770
1864
|
borderWidth?: number;
|
|
1771
1865
|
borderColor?: string;
|
|
1866
|
+
pixelDensity?: number;
|
|
1867
|
+
style?: UiStyle;
|
|
1868
|
+
icon?: string;
|
|
1869
|
+
iconPosition?: UiIconPosition;
|
|
1772
1870
|
};
|
|
1773
1871
|
/**
|
|
1774
1872
|
* A pressable control.
|
|
@@ -1799,9 +1897,21 @@ declare class UIButtonComponent extends Component {
|
|
|
1799
1897
|
cornerRadius: number;
|
|
1800
1898
|
borderWidth: number;
|
|
1801
1899
|
borderColor: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
1902
|
+
* the default: a defaulted field would count as a change on every instance
|
|
1903
|
+
* of a prefab saved before it existed.
|
|
1904
|
+
*/
|
|
1905
|
+
pixelDensity?: number;
|
|
1906
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1907
|
+
style?: UiStyle;
|
|
1908
|
+
/** An image or SVG file drawn beside the label, tinted to the text colour. */
|
|
1909
|
+
icon?: string;
|
|
1910
|
+
iconPosition?: UiIconPosition;
|
|
1802
1911
|
constructor(options?: UIButtonOptions);
|
|
1803
1912
|
}
|
|
1804
1913
|
|
|
1914
|
+
type UiToggleVariant = "switch" | "checkbox" | "radio";
|
|
1805
1915
|
/** Optional initializer for {@link UIToggleComponent}. */
|
|
1806
1916
|
type UIToggleOptions = {
|
|
1807
1917
|
value?: boolean;
|
|
@@ -1811,6 +1921,9 @@ type UIToggleOptions = {
|
|
|
1811
1921
|
trackColor?: string;
|
|
1812
1922
|
accentColor?: string;
|
|
1813
1923
|
knobColor?: string;
|
|
1924
|
+
pixelDensity?: number;
|
|
1925
|
+
style?: UiStyle;
|
|
1926
|
+
variant?: UiToggleVariant;
|
|
1814
1927
|
};
|
|
1815
1928
|
/**
|
|
1816
1929
|
* An on/off switch.
|
|
@@ -1835,9 +1948,20 @@ declare class UIToggleComponent extends Component {
|
|
|
1835
1948
|
/** Track colour while ON. */
|
|
1836
1949
|
accentColor: string;
|
|
1837
1950
|
knobColor: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
1953
|
+
* the default: a defaulted field would count as a change on every instance
|
|
1954
|
+
* of a prefab saved before it existed.
|
|
1955
|
+
*/
|
|
1956
|
+
pixelDensity?: number;
|
|
1957
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1958
|
+
style?: UiStyle;
|
|
1959
|
+
/** How the control is drawn. Absent means `switch`. */
|
|
1960
|
+
variant?: UiToggleVariant;
|
|
1838
1961
|
constructor(options?: UIToggleOptions);
|
|
1839
1962
|
}
|
|
1840
1963
|
|
|
1964
|
+
type UiSliderVariant = "slider" | "progress" | "ring";
|
|
1841
1965
|
/** Optional initializer for {@link UISliderComponent}. */
|
|
1842
1966
|
type UISliderOptions = {
|
|
1843
1967
|
value?: number;
|
|
@@ -1849,6 +1973,11 @@ type UISliderOptions = {
|
|
|
1849
1973
|
trackColor?: string;
|
|
1850
1974
|
accentColor?: string;
|
|
1851
1975
|
knobColor?: string;
|
|
1976
|
+
pixelDensity?: number;
|
|
1977
|
+
style?: UiStyle;
|
|
1978
|
+
variant?: UiSliderVariant;
|
|
1979
|
+
step?: number;
|
|
1980
|
+
readOnly?: boolean;
|
|
1852
1981
|
};
|
|
1853
1982
|
/**
|
|
1854
1983
|
* A draggable value control.
|
|
@@ -1876,6 +2005,20 @@ declare class UISliderComponent extends Component {
|
|
|
1876
2005
|
/** Fill colour between min and the current value. */
|
|
1877
2006
|
accentColor: string;
|
|
1878
2007
|
knobColor: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
2010
|
+
* the default: a defaulted field would count as a change on every instance
|
|
2011
|
+
* of a prefab saved before it existed.
|
|
2012
|
+
*/
|
|
2013
|
+
pixelDensity?: number;
|
|
2014
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
2015
|
+
style?: UiStyle;
|
|
2016
|
+
/** How the value is drawn. `progress` and `ring` are read-only. */
|
|
2017
|
+
variant?: UiSliderVariant;
|
|
2018
|
+
/** Snap to multiples of this, measured from `min`. */
|
|
2019
|
+
step?: number;
|
|
2020
|
+
/** Shows the value but takes no input. */
|
|
2021
|
+
readOnly?: boolean;
|
|
1879
2022
|
constructor(options?: UISliderOptions);
|
|
1880
2023
|
}
|
|
1881
2024
|
|
|
@@ -2043,4 +2186,4 @@ declare class XRHandPoseComponent extends Component {
|
|
|
2043
2186
|
constructor(options?: XRHandPoseOptions);
|
|
2044
2187
|
}
|
|
2045
2188
|
|
|
2046
|
-
export { ScriptComponent as $, AnimationComponent as A, BoneAttachmentComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type LightValueState as F, MaterialComponent as G, type MaterialTypeValue as H, ImageComponent as I, type MaterialValueState as J, MeshComponent as K, LightComponent as L, MODEL_NO_PATH_MESSAGE as M, MeshGeometryComponent as N, type MeshGeometryParameters as O, type MeshGeometryParametersByKind as P, ModelComponent as Q, type ModelLoadState as R, Name as S, Object3DRef as T, PhysicsComponent as U, type PhysicsState as V, type PlaneMeshParameters as W, type RadiusHeightMeshParameters as X, type RadiusMeshParameters as Y, type RigidbodyState as Z, type RigidbodyType as _, type AnimationComponentOptions as a, type ScriptEntry as a0, ScriptObjectComponent as a1, type ScriptObjectComponentInput as a2, type ScriptObjectRuntimeState as a3, Selectable as a4, SelectionTransformState as a5, SpriteComponent as a6, type TextureFilteringValue as a7, type TransformModeValue as a8, type TransformSpaceValue as a9,
|
|
2189
|
+
export { ScriptComponent as $, AnimationComponent as A, BoneAttachmentComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type LightValueState as F, MaterialComponent as G, type MaterialTypeValue as H, ImageComponent as I, type MaterialValueState as J, MeshComponent as K, LightComponent as L, MODEL_NO_PATH_MESSAGE as M, MeshGeometryComponent as N, type MeshGeometryParameters as O, type MeshGeometryParametersByKind as P, ModelComponent as Q, type ModelLoadState as R, Name as S, Object3DRef as T, PhysicsComponent as U, type PhysicsState as V, type PlaneMeshParameters as W, type RadiusHeightMeshParameters as X, type RadiusMeshParameters as Y, type RigidbodyState as Z, type RigidbodyType as _, type AnimationComponentOptions as a, AnimationStateManager as a$, type ScriptEntry as a0, ScriptObjectComponent as a1, type ScriptObjectComponentInput as a2, type ScriptObjectRuntimeState as a3, Selectable as a4, SelectionTransformState as a5, SpriteComponent as a6, type TextureFilteringValue as a7, type TransformModeValue as a8, type TransformSpaceValue as a9, XRInteractorComponent as aA, type XRInteractorOptions as aB, XRInteractorSideComponent as aC, XRRigComponent as aD, type XRRigOptions as aE, type XrAttachPoint as aF, type XrDistanceGrabBehavior as aG, type XrEnvironmentPhysics as aH, type XrGrabGesture as aI, type XrGrabHands as aJ, type XrGrabReach as aK, type XrHandPoseEntry as aL, type XrHandPreset as aM, type XrInteractorSide as aN, type XrInteractorType as aO, type XrLocomotionMode as aP, type XrTrackingOrigin as aQ, type XrTwoHandRotation as aR, createAttachPoint as aS, createHandPoseEntry as aT, defaultMaterialValue as aU, handPoseDefinitionFor as aV, normalizePhysicsState as aW, setModelLoadState as aX, setPhysicsLiveRef as aY, type AnimationStateCallbacks as aZ, AnimationStateMachine as a_, UIButtonComponent as aa, type UIButtonOptions as ab, UIPanelComponent as ac, type UIPanelOptions as ad, UISliderComponent as ae, type UISliderOptions as af, UITextComponent as ag, type UITextOptions as ah, UIToggleComponent as ai, type UIToggleOptions as aj, type UiFollowMode as ak, type UiIconPosition as al, type UiSliderVariant as am, type UiTextAlign as an, type UiTextVAlign as ao, type UiToggleVariant as ap, VRTeleportAreaComponent as aq, type VRTeleportAreaOptions as ar, VideoComponent as as, type VrTeleportShape as at, XRAnchorComponent as au, type XRAnchorOptions as av, XRHandPoseComponent as aw, type XRHandPoseOptions as ax, XRInteractableComponent as ay, type XRInteractableOptions as az, AudioComponent as b, type StateMachine as b0, type UiColorStop as b1, type UiPaint as b2, type UiShadow as b3, type UiStyle as b4, type UiTextStyle as b5, type UiTokens as b6, type BoneAttachmentOptions as c, type CameraComponentOptions as d, type CameraProjection as e, type CameraRuntimeType as f, type ColliderShape as g, type ColliderState as h, type CubeMeshParameters as i, DEFAULT_INSTANCED_MESH_PARAMETERS as j, DEFAULT_INSTANCE_TRANSFORM as k, DEFAULT_MESH_GEOMETRY_PARAMETERS as l, DEFAULT_PHYSICS_STATE as m, DEFAULT_POSE_CURLS as n, DEFAULT_POSE_DIRECTIONS as o, DEFAULT_RIGIDBODY_STATE as p, EntityType as q, ImageTarget as r, ImageTargetAnchor as s, type ImageTargetAnchorOptions as t, type ImageTargetReference as u, InstanceSlotComponent as v, type InstanceTransform as w, InstancedMeshComponent as x, type InstancedMeshKind as y, type LightShadowState as z };
|
|
@@ -1663,6 +1663,80 @@ declare class BoneAttachmentComponent extends Component {
|
|
|
1663
1663
|
constructor(options?: BoneAttachmentOptions);
|
|
1664
1664
|
}
|
|
1665
1665
|
|
|
1666
|
+
/**
|
|
1667
|
+
* The style model for spatial UI.
|
|
1668
|
+
*
|
|
1669
|
+
* Every field here is optional and stays ABSENT until authored. A defaulted
|
|
1670
|
+
* field would show up as a change on every instance of a prefab saved before
|
|
1671
|
+
* it existed, pinning those instances against later prefab edits. Old flat
|
|
1672
|
+
* fields (`backgroundColor`, `cornerRadius`…) stay as the fallback, so a scene
|
|
1673
|
+
* saved before this model renders the same.
|
|
1674
|
+
*
|
|
1675
|
+
* Units are metres. Any colour or file string may be a token, `$name`, which
|
|
1676
|
+
* resolves through `tokens` on the nearest panel above the widget. A theme
|
|
1677
|
+
* therefore travels with a prefab, and editing one panel restyles a menu.
|
|
1678
|
+
*
|
|
1679
|
+
* Pure and free of three.js and the DOM.
|
|
1680
|
+
*/
|
|
1681
|
+
type UiColorStop = {
|
|
1682
|
+
at: number;
|
|
1683
|
+
color: string;
|
|
1684
|
+
};
|
|
1685
|
+
type UiPaint = {
|
|
1686
|
+
kind: "solid";
|
|
1687
|
+
color: string;
|
|
1688
|
+
}
|
|
1689
|
+
/** `angle` is in degrees and reads like CSS: 0 points up, 90 points right. */
|
|
1690
|
+
| {
|
|
1691
|
+
kind: "linear";
|
|
1692
|
+
angle: number;
|
|
1693
|
+
stops: UiColorStop[];
|
|
1694
|
+
} | {
|
|
1695
|
+
kind: "radial";
|
|
1696
|
+
stops: UiColorStop[];
|
|
1697
|
+
} | {
|
|
1698
|
+
kind: "image";
|
|
1699
|
+
src: string;
|
|
1700
|
+
fit: "cover" | "contain" | "fill";
|
|
1701
|
+
tint?: string;
|
|
1702
|
+
};
|
|
1703
|
+
type UiShadow = {
|
|
1704
|
+
x: number;
|
|
1705
|
+
y: number;
|
|
1706
|
+
blur: number;
|
|
1707
|
+
color: string;
|
|
1708
|
+
};
|
|
1709
|
+
type UiTextStyle = {
|
|
1710
|
+
/** A font file in the project, such as one `add_font` bundled. */
|
|
1711
|
+
font?: string;
|
|
1712
|
+
weight?: number;
|
|
1713
|
+
/** Letter spacing in metres. */
|
|
1714
|
+
tracking?: number;
|
|
1715
|
+
transform?: "upper" | "lower";
|
|
1716
|
+
paint?: UiPaint;
|
|
1717
|
+
maxLines?: number;
|
|
1718
|
+
shadow?: UiShadow;
|
|
1719
|
+
};
|
|
1720
|
+
type UiStyle = {
|
|
1721
|
+
fill?: UiPaint;
|
|
1722
|
+
border?: {
|
|
1723
|
+
width: number;
|
|
1724
|
+
paint: UiPaint;
|
|
1725
|
+
};
|
|
1726
|
+
/** One radius, or top-left, top-right, bottom-right, bottom-left. */
|
|
1727
|
+
radius?: number | [number, number, number, number];
|
|
1728
|
+
shadows?: UiShadow[];
|
|
1729
|
+
/** A thin highlight along the top inner edge. */
|
|
1730
|
+
edge?: {
|
|
1731
|
+
width: number;
|
|
1732
|
+
color: string;
|
|
1733
|
+
};
|
|
1734
|
+
/** 0–1. Multiplies down the widget tree, so fading a panel fades its menu. */
|
|
1735
|
+
opacity?: number;
|
|
1736
|
+
text?: UiTextStyle;
|
|
1737
|
+
};
|
|
1738
|
+
type UiTokens = Record<string, string>;
|
|
1739
|
+
|
|
1666
1740
|
/** How a panel orients itself while the experience runs. */
|
|
1667
1741
|
type UiFollowMode = "world" | "billboard";
|
|
1668
1742
|
/** Optional initializer for {@link UIPanelComponent}. */
|
|
@@ -1676,6 +1750,8 @@ type UIPanelOptions = {
|
|
|
1676
1750
|
borderColor?: string;
|
|
1677
1751
|
pixelDensity?: number;
|
|
1678
1752
|
follow?: UiFollowMode;
|
|
1753
|
+
style?: UiStyle;
|
|
1754
|
+
tokens?: UiTokens;
|
|
1679
1755
|
};
|
|
1680
1756
|
/**
|
|
1681
1757
|
* A flat UI surface in the world — the backdrop menus and HUDs are built on.
|
|
@@ -1707,6 +1783,13 @@ declare class UIPanelComponent extends Component {
|
|
|
1707
1783
|
/** Texture density in px/metre, clamped 256–2048 at render time. */
|
|
1708
1784
|
pixelDensity: number;
|
|
1709
1785
|
follow: UiFollowMode;
|
|
1786
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1787
|
+
style?: UiStyle;
|
|
1788
|
+
/**
|
|
1789
|
+
* Named values widgets under this panel use as `$name`. The nearest panel
|
|
1790
|
+
* wins, so a theme travels with the panel and one edit restyles the menu.
|
|
1791
|
+
*/
|
|
1792
|
+
tokens?: UiTokens;
|
|
1710
1793
|
constructor(options?: UIPanelOptions);
|
|
1711
1794
|
}
|
|
1712
1795
|
|
|
@@ -1724,6 +1807,8 @@ type UITextOptions = {
|
|
|
1724
1807
|
valign?: UiTextVAlign;
|
|
1725
1808
|
lineHeight?: number;
|
|
1726
1809
|
padding?: number;
|
|
1810
|
+
pixelDensity?: number;
|
|
1811
|
+
style?: UiStyle;
|
|
1727
1812
|
};
|
|
1728
1813
|
/**
|
|
1729
1814
|
* A block of text drawn onto a transparent canvas quad.
|
|
@@ -1752,9 +1837,18 @@ declare class UITextComponent extends Component {
|
|
|
1752
1837
|
lineHeight: number;
|
|
1753
1838
|
/** Inner padding in metres. */
|
|
1754
1839
|
padding: number;
|
|
1840
|
+
/**
|
|
1841
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
1842
|
+
* the default: a defaulted field would count as a change on every instance
|
|
1843
|
+
* of a prefab saved before it existed.
|
|
1844
|
+
*/
|
|
1845
|
+
pixelDensity?: number;
|
|
1846
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1847
|
+
style?: UiStyle;
|
|
1755
1848
|
constructor(options?: UITextOptions);
|
|
1756
1849
|
}
|
|
1757
1850
|
|
|
1851
|
+
type UiIconPosition = "left" | "right";
|
|
1758
1852
|
/** Optional initializer for {@link UIButtonComponent}. */
|
|
1759
1853
|
type UIButtonOptions = {
|
|
1760
1854
|
label?: string;
|
|
@@ -1769,6 +1863,10 @@ type UIButtonOptions = {
|
|
|
1769
1863
|
cornerRadius?: number;
|
|
1770
1864
|
borderWidth?: number;
|
|
1771
1865
|
borderColor?: string;
|
|
1866
|
+
pixelDensity?: number;
|
|
1867
|
+
style?: UiStyle;
|
|
1868
|
+
icon?: string;
|
|
1869
|
+
iconPosition?: UiIconPosition;
|
|
1772
1870
|
};
|
|
1773
1871
|
/**
|
|
1774
1872
|
* A pressable control.
|
|
@@ -1799,9 +1897,21 @@ declare class UIButtonComponent extends Component {
|
|
|
1799
1897
|
cornerRadius: number;
|
|
1800
1898
|
borderWidth: number;
|
|
1801
1899
|
borderColor: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
1902
|
+
* the default: a defaulted field would count as a change on every instance
|
|
1903
|
+
* of a prefab saved before it existed.
|
|
1904
|
+
*/
|
|
1905
|
+
pixelDensity?: number;
|
|
1906
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1907
|
+
style?: UiStyle;
|
|
1908
|
+
/** An image or SVG file drawn beside the label, tinted to the text colour. */
|
|
1909
|
+
icon?: string;
|
|
1910
|
+
iconPosition?: UiIconPosition;
|
|
1802
1911
|
constructor(options?: UIButtonOptions);
|
|
1803
1912
|
}
|
|
1804
1913
|
|
|
1914
|
+
type UiToggleVariant = "switch" | "checkbox" | "radio";
|
|
1805
1915
|
/** Optional initializer for {@link UIToggleComponent}. */
|
|
1806
1916
|
type UIToggleOptions = {
|
|
1807
1917
|
value?: boolean;
|
|
@@ -1811,6 +1921,9 @@ type UIToggleOptions = {
|
|
|
1811
1921
|
trackColor?: string;
|
|
1812
1922
|
accentColor?: string;
|
|
1813
1923
|
knobColor?: string;
|
|
1924
|
+
pixelDensity?: number;
|
|
1925
|
+
style?: UiStyle;
|
|
1926
|
+
variant?: UiToggleVariant;
|
|
1814
1927
|
};
|
|
1815
1928
|
/**
|
|
1816
1929
|
* An on/off switch.
|
|
@@ -1835,9 +1948,20 @@ declare class UIToggleComponent extends Component {
|
|
|
1835
1948
|
/** Track colour while ON. */
|
|
1836
1949
|
accentColor: string;
|
|
1837
1950
|
knobColor: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
1953
|
+
* the default: a defaulted field would count as a change on every instance
|
|
1954
|
+
* of a prefab saved before it existed.
|
|
1955
|
+
*/
|
|
1956
|
+
pixelDensity?: number;
|
|
1957
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
1958
|
+
style?: UiStyle;
|
|
1959
|
+
/** How the control is drawn. Absent means `switch`. */
|
|
1960
|
+
variant?: UiToggleVariant;
|
|
1838
1961
|
constructor(options?: UIToggleOptions);
|
|
1839
1962
|
}
|
|
1840
1963
|
|
|
1964
|
+
type UiSliderVariant = "slider" | "progress" | "ring";
|
|
1841
1965
|
/** Optional initializer for {@link UISliderComponent}. */
|
|
1842
1966
|
type UISliderOptions = {
|
|
1843
1967
|
value?: number;
|
|
@@ -1849,6 +1973,11 @@ type UISliderOptions = {
|
|
|
1849
1973
|
trackColor?: string;
|
|
1850
1974
|
accentColor?: string;
|
|
1851
1975
|
knobColor?: string;
|
|
1976
|
+
pixelDensity?: number;
|
|
1977
|
+
style?: UiStyle;
|
|
1978
|
+
variant?: UiSliderVariant;
|
|
1979
|
+
step?: number;
|
|
1980
|
+
readOnly?: boolean;
|
|
1852
1981
|
};
|
|
1853
1982
|
/**
|
|
1854
1983
|
* A draggable value control.
|
|
@@ -1876,6 +2005,20 @@ declare class UISliderComponent extends Component {
|
|
|
1876
2005
|
/** Fill colour between min and the current value. */
|
|
1877
2006
|
accentColor: string;
|
|
1878
2007
|
knobColor: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* Texture density in px/metre, clamped 256–2048 at render time. Absent means
|
|
2010
|
+
* the default: a defaulted field would count as a change on every instance
|
|
2011
|
+
* of a prefab saved before it existed.
|
|
2012
|
+
*/
|
|
2013
|
+
pixelDensity?: number;
|
|
2014
|
+
/** Modern styling; wins over the flat fields above. Absent until authored. */
|
|
2015
|
+
style?: UiStyle;
|
|
2016
|
+
/** How the value is drawn. `progress` and `ring` are read-only. */
|
|
2017
|
+
variant?: UiSliderVariant;
|
|
2018
|
+
/** Snap to multiples of this, measured from `min`. */
|
|
2019
|
+
step?: number;
|
|
2020
|
+
/** Shows the value but takes no input. */
|
|
2021
|
+
readOnly?: boolean;
|
|
1879
2022
|
constructor(options?: UISliderOptions);
|
|
1880
2023
|
}
|
|
1881
2024
|
|
|
@@ -2043,4 +2186,4 @@ declare class XRHandPoseComponent extends Component {
|
|
|
2043
2186
|
constructor(options?: XRHandPoseOptions);
|
|
2044
2187
|
}
|
|
2045
2188
|
|
|
2046
|
-
export { ScriptComponent as $, AnimationComponent as A, BoneAttachmentComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type LightValueState as F, MaterialComponent as G, type MaterialTypeValue as H, ImageComponent as I, type MaterialValueState as J, MeshComponent as K, LightComponent as L, MODEL_NO_PATH_MESSAGE as M, MeshGeometryComponent as N, type MeshGeometryParameters as O, type MeshGeometryParametersByKind as P, ModelComponent as Q, type ModelLoadState as R, Name as S, Object3DRef as T, PhysicsComponent as U, type PhysicsState as V, type PlaneMeshParameters as W, type RadiusHeightMeshParameters as X, type RadiusMeshParameters as Y, type RigidbodyState as Z, type RigidbodyType as _, type AnimationComponentOptions as a, type ScriptEntry as a0, ScriptObjectComponent as a1, type ScriptObjectComponentInput as a2, type ScriptObjectRuntimeState as a3, Selectable as a4, SelectionTransformState as a5, SpriteComponent as a6, type TextureFilteringValue as a7, type TransformModeValue as a8, type TransformSpaceValue as a9,
|
|
2189
|
+
export { ScriptComponent as $, AnimationComponent as A, BoneAttachmentComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type LightValueState as F, MaterialComponent as G, type MaterialTypeValue as H, ImageComponent as I, type MaterialValueState as J, MeshComponent as K, LightComponent as L, MODEL_NO_PATH_MESSAGE as M, MeshGeometryComponent as N, type MeshGeometryParameters as O, type MeshGeometryParametersByKind as P, ModelComponent as Q, type ModelLoadState as R, Name as S, Object3DRef as T, PhysicsComponent as U, type PhysicsState as V, type PlaneMeshParameters as W, type RadiusHeightMeshParameters as X, type RadiusMeshParameters as Y, type RigidbodyState as Z, type RigidbodyType as _, type AnimationComponentOptions as a, AnimationStateManager as a$, type ScriptEntry as a0, ScriptObjectComponent as a1, type ScriptObjectComponentInput as a2, type ScriptObjectRuntimeState as a3, Selectable as a4, SelectionTransformState as a5, SpriteComponent as a6, type TextureFilteringValue as a7, type TransformModeValue as a8, type TransformSpaceValue as a9, XRInteractorComponent as aA, type XRInteractorOptions as aB, XRInteractorSideComponent as aC, XRRigComponent as aD, type XRRigOptions as aE, type XrAttachPoint as aF, type XrDistanceGrabBehavior as aG, type XrEnvironmentPhysics as aH, type XrGrabGesture as aI, type XrGrabHands as aJ, type XrGrabReach as aK, type XrHandPoseEntry as aL, type XrHandPreset as aM, type XrInteractorSide as aN, type XrInteractorType as aO, type XrLocomotionMode as aP, type XrTrackingOrigin as aQ, type XrTwoHandRotation as aR, createAttachPoint as aS, createHandPoseEntry as aT, defaultMaterialValue as aU, handPoseDefinitionFor as aV, normalizePhysicsState as aW, setModelLoadState as aX, setPhysicsLiveRef as aY, type AnimationStateCallbacks as aZ, AnimationStateMachine as a_, UIButtonComponent as aa, type UIButtonOptions as ab, UIPanelComponent as ac, type UIPanelOptions as ad, UISliderComponent as ae, type UISliderOptions as af, UITextComponent as ag, type UITextOptions as ah, UIToggleComponent as ai, type UIToggleOptions as aj, type UiFollowMode as ak, type UiIconPosition as al, type UiSliderVariant as am, type UiTextAlign as an, type UiTextVAlign as ao, type UiToggleVariant as ap, VRTeleportAreaComponent as aq, type VRTeleportAreaOptions as ar, VideoComponent as as, type VrTeleportShape as at, XRAnchorComponent as au, type XRAnchorOptions as av, XRHandPoseComponent as aw, type XRHandPoseOptions as ax, XRInteractableComponent as ay, type XRInteractableOptions as az, AudioComponent as b, type StateMachine as b0, type UiColorStop as b1, type UiPaint as b2, type UiShadow as b3, type UiStyle as b4, type UiTextStyle as b5, type UiTokens as b6, type BoneAttachmentOptions as c, type CameraComponentOptions as d, type CameraProjection as e, type CameraRuntimeType as f, type ColliderShape as g, type ColliderState as h, type CubeMeshParameters as i, DEFAULT_INSTANCED_MESH_PARAMETERS as j, DEFAULT_INSTANCE_TRANSFORM as k, DEFAULT_MESH_GEOMETRY_PARAMETERS as l, DEFAULT_PHYSICS_STATE as m, DEFAULT_POSE_CURLS as n, DEFAULT_POSE_DIRECTIONS as o, DEFAULT_RIGIDBODY_STATE as p, EntityType as q, ImageTarget as r, ImageTargetAnchor as s, type ImageTargetAnchorOptions as t, type ImageTargetReference as u, InstanceSlotComponent as v, type InstanceTransform as w, InstancedMeshComponent as x, type InstancedMeshKind as y, type LightShadowState as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimationComponent, AudioComponent, Object3DRef, CameraComponent, MeshGeometryComponent, PhysicsComponent, Environment, EntityType, ImageComponent, ImageTargetAnchor, ImageTarget, LightComponent, MaterialComponent, MeshComponent, ModelComponent, Name, ParentId, Postprocessing, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, InstancedMeshComponent, InstanceSlotComponent, VideoComponent, XRRigComponent, VRTeleportAreaComponent, XRHandPoseComponent, XRAnchorComponent, BoneAttachmentComponent, IKComponent, NetworkIdentityComponent, NetworkTransformComponent, NetworkedPropsComponent, NetworkSpawnerComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, UIButtonComponent, UIPanelComponent, UISliderComponent, UITextComponent, UIToggleComponent, setModelLoadState } from './chunk-
|
|
1
|
+
import { AnimationComponent, AudioComponent, Object3DRef, CameraComponent, MeshGeometryComponent, PhysicsComponent, Environment, EntityType, ImageComponent, ImageTargetAnchor, ImageTarget, LightComponent, MaterialComponent, MeshComponent, ModelComponent, Name, ParentId, Postprocessing, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, InstancedMeshComponent, InstanceSlotComponent, VideoComponent, XRRigComponent, VRTeleportAreaComponent, XRHandPoseComponent, XRAnchorComponent, BoneAttachmentComponent, IKComponent, NetworkIdentityComponent, NetworkTransformComponent, NetworkedPropsComponent, NetworkSpawnerComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, UIButtonComponent, UIPanelComponent, UISliderComponent, UITextComponent, UIToggleComponent, setModelLoadState } from './chunk-JNYPJB55.js';
|
|
2
2
|
import { detectRig, skeletonFromObject3D } from './chunk-GSWC6LLD.js';
|
|
3
3
|
import { __name } from './chunk-XE4OXN2W.js';
|
|
4
4
|
import * as THREE from 'three';
|
|
@@ -1233,5 +1233,5 @@ __name(_ObjectManagementSystem, "ObjectManagementSystem");
|
|
|
1233
1233
|
var ObjectManagementSystem = _ObjectManagementSystem;
|
|
1234
1234
|
|
|
1235
1235
|
export { ObjectManagementSystem, SHARED_MODEL_RESOURCE_FLAG, applyTransform, clearModelCache, createAnimationComponent, createAudioComponent, createBaseEntity, createBoneAttachmentComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createGLTFLoader, createIKComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModel, createModelComponent, createNameComponent, createNetworkIdentityComponent, createNetworkSpawnerComponent, createNetworkTransformComponent, createNetworkedPropsComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransform, createTransformComponent, createUIButtonComponent, createUIPanelComponent, createUISliderComponent, createUITextComponent, createUIToggleComponent, createVRTeleportAreaComponent, createVideoComponent, createXRAnchorComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, findModelBone, listModelBones, loadSharedGltf, resolveDracoDecoderPath, setDracoDecoderPath };
|
|
1236
|
-
//# sourceMappingURL=chunk-
|
|
1237
|
-
//# sourceMappingURL=chunk-
|
|
1236
|
+
//# sourceMappingURL=chunk-JEPUCLZX.js.map
|
|
1237
|
+
//# sourceMappingURL=chunk-JEPUCLZX.js.map
|