@relu-interactives/spatial-ecs 0.4.4 → 0.5.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/{System-ln4Q7Eot.d.cts → System-V_mv07le.d.cts} +2 -2
- package/dist/{System-ln4Q7Eot.d.ts → System-V_mv07le.d.ts} +2 -2
- package/dist/{XRHandPose-CxPv-LBo.d.cts → XRHandPose-CQTLGxFC.d.cts} +218 -2
- package/dist/{XRHandPose-BImIa4ZS.d.ts → XRHandPose-CU3vNFuS.d.ts} +218 -2
- package/dist/{chunk-4AK4I3QF.js → chunk-BUEKOSR5.js} +102 -3
- package/dist/chunk-BUEKOSR5.js.map +1 -0
- package/dist/{chunk-SGADE55G.js → chunk-RXBLOO5B.js} +249 -90
- package/dist/chunk-RXBLOO5B.js.map +1 -0
- package/dist/{chunk-4DWZK4X4.js → chunk-WJD2VKEH.js} +3 -3
- package/dist/chunk-WJD2VKEH.js.map +1 -0
- package/dist/{chunk-OY2OONRR.js → chunk-Z6ZMR3CS.js} +1374 -30
- package/dist/chunk-Z6ZMR3CS.js.map +1 -0
- package/dist/components/index.cjs +99 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +1 -1
- package/dist/docs/guide/mixed-reality.md +137 -3
- package/dist/docs/guide/spatial-ui.md +165 -0
- package/dist/docs/guide/vr-and-hand-poses.md +29 -0
- package/dist/docs/guide/world-api.md +1 -1
- package/dist/factories/index.cjs +372 -114
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +13 -3
- package/dist/factories/index.d.ts +13 -3
- package/dist/factories/index.js +3 -3
- package/dist/{index-CuGqxuk-.d.ts → index-C3ik3sA1.d.ts} +16 -3
- package/dist/{index-B2oHfqkj.d.ts → index-CppKDxbu.d.ts} +187 -3
- package/dist/{index-CQsHUez3.d.cts → index-Dlr-7-4m.d.cts} +16 -3
- package/dist/{index-7YCk4cmQ.d.cts → index-I2IsocYW.d.cts} +187 -3
- package/dist/index.cjs +1977 -366
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -9
- package/dist/index.d.ts +42 -9
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/systems/index.cjs +1465 -25
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +2 -2
- package/dist/systems/index.d.ts +2 -2
- package/dist/systems/index.js +3 -3
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/worldSnapshotUtils.d.cts +1 -1
- package/dist/worldSnapshotUtils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-4AK4I3QF.js.map +0 -1
- package/dist/chunk-4DWZK4X4.js.map +0 -1
- package/dist/chunk-OY2OONRR.js.map +0 -1
- package/dist/chunk-SGADE55G.js.map +0 -1
|
@@ -2005,6 +2005,100 @@ var _XRAnchorComponent = class _XRAnchorComponent extends Component {
|
|
|
2005
2005
|
__name(_XRAnchorComponent, "XRAnchorComponent");
|
|
2006
2006
|
var XRAnchorComponent = _XRAnchorComponent;
|
|
2007
2007
|
|
|
2008
|
+
// core/components/UIPanel.ts
|
|
2009
|
+
var _UIPanelComponent = class _UIPanelComponent extends Component {
|
|
2010
|
+
constructor(options) {
|
|
2011
|
+
super();
|
|
2012
|
+
this.width = options?.width ?? 0.6;
|
|
2013
|
+
this.height = options?.height ?? 0.4;
|
|
2014
|
+
this.backgroundColor = options?.backgroundColor ?? "#1c1c1c";
|
|
2015
|
+
this.backgroundOpacity = options?.backgroundOpacity ?? 0.92;
|
|
2016
|
+
this.cornerRadius = options?.cornerRadius ?? 0.02;
|
|
2017
|
+
this.borderWidth = options?.borderWidth ?? 0;
|
|
2018
|
+
this.borderColor = options?.borderColor ?? "#333333";
|
|
2019
|
+
this.pixelDensity = options?.pixelDensity ?? 1024;
|
|
2020
|
+
this.follow = options?.follow ?? "world";
|
|
2021
|
+
}
|
|
2022
|
+
};
|
|
2023
|
+
__name(_UIPanelComponent, "UIPanelComponent");
|
|
2024
|
+
var UIPanelComponent = _UIPanelComponent;
|
|
2025
|
+
|
|
2026
|
+
// core/components/UIText.ts
|
|
2027
|
+
var _UITextComponent = class _UITextComponent extends Component {
|
|
2028
|
+
constructor(options) {
|
|
2029
|
+
super();
|
|
2030
|
+
this.text = options?.text ?? "Text";
|
|
2031
|
+
this.width = options?.width ?? 0.5;
|
|
2032
|
+
this.height = options?.height ?? 0.12;
|
|
2033
|
+
this.fontSize = options?.fontSize ?? 0.035;
|
|
2034
|
+
this.fontWeight = options?.fontWeight ?? 500;
|
|
2035
|
+
this.color = options?.color ?? "#ffffff";
|
|
2036
|
+
this.align = options?.align ?? "center";
|
|
2037
|
+
this.valign = options?.valign ?? "middle";
|
|
2038
|
+
this.lineHeight = options?.lineHeight ?? 1.25;
|
|
2039
|
+
this.padding = options?.padding ?? 0.01;
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
__name(_UITextComponent, "UITextComponent");
|
|
2043
|
+
var UITextComponent = _UITextComponent;
|
|
2044
|
+
|
|
2045
|
+
// core/components/UIButton.ts
|
|
2046
|
+
var _UIButtonComponent = class _UIButtonComponent extends Component {
|
|
2047
|
+
constructor(options) {
|
|
2048
|
+
super();
|
|
2049
|
+
this.label = options?.label ?? "Button";
|
|
2050
|
+
this.actionId = options?.actionId ?? "";
|
|
2051
|
+
this.width = options?.width ?? 0.3;
|
|
2052
|
+
this.height = options?.height ?? 0.1;
|
|
2053
|
+
this.fontSize = options?.fontSize ?? 0.03;
|
|
2054
|
+
this.fontWeight = options?.fontWeight ?? 600;
|
|
2055
|
+
this.textColor = options?.textColor ?? "#ffffff";
|
|
2056
|
+
this.backgroundColor = options?.backgroundColor ?? "#2a2a2a";
|
|
2057
|
+
this.backgroundOpacity = options?.backgroundOpacity ?? 1;
|
|
2058
|
+
this.cornerRadius = options?.cornerRadius ?? 0.02;
|
|
2059
|
+
this.borderWidth = options?.borderWidth ?? 2e-3;
|
|
2060
|
+
this.borderColor = options?.borderColor ?? "#3a3a3a";
|
|
2061
|
+
}
|
|
2062
|
+
};
|
|
2063
|
+
__name(_UIButtonComponent, "UIButtonComponent");
|
|
2064
|
+
var UIButtonComponent = _UIButtonComponent;
|
|
2065
|
+
|
|
2066
|
+
// core/components/UIToggle.ts
|
|
2067
|
+
var _UIToggleComponent = class _UIToggleComponent extends Component {
|
|
2068
|
+
constructor(options) {
|
|
2069
|
+
super();
|
|
2070
|
+
this.value = options?.value ?? false;
|
|
2071
|
+
this.actionId = options?.actionId ?? "";
|
|
2072
|
+
this.width = options?.width ?? 0.14;
|
|
2073
|
+
this.height = options?.height ?? 0.07;
|
|
2074
|
+
this.trackColor = options?.trackColor ?? "#2a2a2a";
|
|
2075
|
+
this.accentColor = options?.accentColor ?? "#ff6b35";
|
|
2076
|
+
this.knobColor = options?.knobColor ?? "#ffffff";
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
__name(_UIToggleComponent, "UIToggleComponent");
|
|
2080
|
+
var UIToggleComponent = _UIToggleComponent;
|
|
2081
|
+
|
|
2082
|
+
// core/components/UISlider.ts
|
|
2083
|
+
var _UISliderComponent = class _UISliderComponent extends Component {
|
|
2084
|
+
constructor(options) {
|
|
2085
|
+
super();
|
|
2086
|
+
this.min = options?.min ?? 0;
|
|
2087
|
+
this.max = options?.max ?? Math.max(1, this.min + 1);
|
|
2088
|
+
if (this.max <= this.min) this.max = this.min + 1;
|
|
2089
|
+
const v = options?.value ?? (this.min + this.max) / 2;
|
|
2090
|
+
this.value = Math.min(this.max, Math.max(this.min, v));
|
|
2091
|
+
this.actionId = options?.actionId ?? "";
|
|
2092
|
+
this.width = options?.width ?? 0.4;
|
|
2093
|
+
this.height = options?.height ?? 0.06;
|
|
2094
|
+
this.trackColor = options?.trackColor ?? "#2a2a2a";
|
|
2095
|
+
this.accentColor = options?.accentColor ?? "#ff6b35";
|
|
2096
|
+
this.knobColor = options?.knobColor ?? "#ffffff";
|
|
2097
|
+
}
|
|
2098
|
+
};
|
|
2099
|
+
__name(_UISliderComponent, "UISliderComponent");
|
|
2100
|
+
var UISliderComponent = _UISliderComponent;
|
|
2101
|
+
|
|
2008
2102
|
// core/components/XRInteractor.ts
|
|
2009
2103
|
var _XRInteractorComponent = class _XRInteractorComponent extends Component {
|
|
2010
2104
|
constructor(options) {
|
|
@@ -2168,6 +2262,11 @@ exports.Selectable = Selectable;
|
|
|
2168
2262
|
exports.SelectionTransformState = SelectionTransformState;
|
|
2169
2263
|
exports.SpriteComponent = SpriteComponent;
|
|
2170
2264
|
exports.TransformComponent = TransformComponent;
|
|
2265
|
+
exports.UIButtonComponent = UIButtonComponent;
|
|
2266
|
+
exports.UIPanelComponent = UIPanelComponent;
|
|
2267
|
+
exports.UISliderComponent = UISliderComponent;
|
|
2268
|
+
exports.UITextComponent = UITextComponent;
|
|
2269
|
+
exports.UIToggleComponent = UIToggleComponent;
|
|
2171
2270
|
exports.VRTeleportAreaComponent = VRTeleportAreaComponent;
|
|
2172
2271
|
exports.VideoComponent = VideoComponent;
|
|
2173
2272
|
exports.XRAnchorComponent = XRAnchorComponent;
|