@relu-interactives/spatial-ecs 0.4.5 → 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-QIIWFP3V.js → chunk-Z6ZMR3CS.js} +1189 -18
- 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/spatial-ui.md +165 -0
- 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-BphKHaV-.d.ts → index-CppKDxbu.d.ts} +145 -3
- package/dist/{index-CQsHUez3.d.cts → index-Dlr-7-4m.d.cts} +16 -3
- package/dist/{index-CH7qMsQT.d.cts → index-I2IsocYW.d.cts} +145 -3
- package/dist/index.cjs +1798 -360
- 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 +1280 -13
- 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-QIIWFP3V.js.map +0 -1
- package/dist/chunk-SGADE55G.js.map +0 -1
|
@@ -333,7 +333,7 @@ type EntityId = number;
|
|
|
333
333
|
* maps to an object factory in `core/factories/objects/*` that creates the
|
|
334
334
|
* baseline component set.
|
|
335
335
|
*/
|
|
336
|
-
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "xrInteractor" | "teleportArea";
|
|
336
|
+
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "xrInteractor" | "teleportArea" | "uiPanel" | "uiText" | "uiButton" | "uiToggle" | "uiSlider";
|
|
337
337
|
/** {@link EcsEntityKind} extended with editor-only utility entities (gizmos, helpers). */
|
|
338
338
|
type EcsEntityEditorKind = EcsEntityKind | "editorUtility";
|
|
339
339
|
/** Callback invoked when the selected entity changes. `null` indicates a deselection. */
|
|
@@ -619,7 +619,7 @@ type CreateContext = {
|
|
|
619
619
|
isEditor?: boolean;
|
|
620
620
|
};
|
|
621
621
|
type EntityFactory = (context: CreateContext) => EntityId;
|
|
622
|
-
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrHandPose" | "xrAnchor" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
622
|
+
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrHandPose" | "xrAnchor" | "uiPanel" | "uiText" | "uiButton" | "uiToggle" | "uiSlider" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
623
623
|
type ComponentFactory = (world: World, entityId: EntityId, ...args: any[]) => unknown;
|
|
624
624
|
declare class ObjectManagementSystem implements EcsSystem {
|
|
625
625
|
private readonly scene;
|
|
@@ -333,7 +333,7 @@ type EntityId = number;
|
|
|
333
333
|
* maps to an object factory in `core/factories/objects/*` that creates the
|
|
334
334
|
* baseline component set.
|
|
335
335
|
*/
|
|
336
|
-
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "xrInteractor" | "teleportArea";
|
|
336
|
+
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "xrInteractor" | "teleportArea" | "uiPanel" | "uiText" | "uiButton" | "uiToggle" | "uiSlider";
|
|
337
337
|
/** {@link EcsEntityKind} extended with editor-only utility entities (gizmos, helpers). */
|
|
338
338
|
type EcsEntityEditorKind = EcsEntityKind | "editorUtility";
|
|
339
339
|
/** Callback invoked when the selected entity changes. `null` indicates a deselection. */
|
|
@@ -619,7 +619,7 @@ type CreateContext = {
|
|
|
619
619
|
isEditor?: boolean;
|
|
620
620
|
};
|
|
621
621
|
type EntityFactory = (context: CreateContext) => EntityId;
|
|
622
|
-
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrHandPose" | "xrAnchor" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
622
|
+
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrHandPose" | "xrAnchor" | "uiPanel" | "uiText" | "uiButton" | "uiToggle" | "uiSlider" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
623
623
|
type ComponentFactory = (world: World, entityId: EntityId, ...args: any[]) => unknown;
|
|
624
624
|
declare class ObjectManagementSystem implements EcsSystem {
|
|
625
625
|
private readonly scene;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-
|
|
2
|
+
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-V_mv07le.cjs';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
import { a as XrFinger, c as XrHandPoseDirection, b as XrHandPoseOrientation, X as XrHandPoseDefinition } from './handPose-DlcTtqgx.cjs';
|
|
5
5
|
|
|
@@ -1573,6 +1573,222 @@ declare class XRAnchorComponent extends Component {
|
|
|
1573
1573
|
constructor(options?: XRAnchorOptions);
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
+
/** How a panel orients itself while the experience runs. */
|
|
1577
|
+
type UiFollowMode = "world" | "billboard";
|
|
1578
|
+
/** Optional initializer for {@link UIPanelComponent}. */
|
|
1579
|
+
type UIPanelOptions = {
|
|
1580
|
+
width?: number;
|
|
1581
|
+
height?: number;
|
|
1582
|
+
backgroundColor?: string;
|
|
1583
|
+
backgroundOpacity?: number;
|
|
1584
|
+
cornerRadius?: number;
|
|
1585
|
+
borderWidth?: number;
|
|
1586
|
+
borderColor?: string;
|
|
1587
|
+
pixelDensity?: number;
|
|
1588
|
+
follow?: UiFollowMode;
|
|
1589
|
+
};
|
|
1590
|
+
/**
|
|
1591
|
+
* A flat UI surface in the world — the backdrop menus and HUDs are built on.
|
|
1592
|
+
*
|
|
1593
|
+
* Size is authored in METRES on the component, never via transform scale:
|
|
1594
|
+
* the canvas texture is rasterised for the authored size, so scaling the
|
|
1595
|
+
* entity would stretch texels into blur. Child widgets (text, buttons,
|
|
1596
|
+
* toggles, sliders) are ordinary entities parented under the panel and placed
|
|
1597
|
+
* with their transforms.
|
|
1598
|
+
*
|
|
1599
|
+
* `follow: "billboard"` yaw-faces the camera each frame; for a wrist menu,
|
|
1600
|
+
* parent the panel under an XR Interactor's Left/Right slot entity instead.
|
|
1601
|
+
*
|
|
1602
|
+
* @category Components
|
|
1603
|
+
*/
|
|
1604
|
+
declare class UIPanelComponent extends Component {
|
|
1605
|
+
/** Full width in metres. */
|
|
1606
|
+
width: number;
|
|
1607
|
+
/** Full height in metres. */
|
|
1608
|
+
height: number;
|
|
1609
|
+
backgroundColor: string;
|
|
1610
|
+
/** 0–1. Panels are usually slightly translucent in XR. */
|
|
1611
|
+
backgroundOpacity: number;
|
|
1612
|
+
/** Corner radius in metres. */
|
|
1613
|
+
cornerRadius: number;
|
|
1614
|
+
/** Border thickness in metres; 0 disables the border. */
|
|
1615
|
+
borderWidth: number;
|
|
1616
|
+
borderColor: string;
|
|
1617
|
+
/** Texture density in px/metre, clamped 256–2048 at render time. */
|
|
1618
|
+
pixelDensity: number;
|
|
1619
|
+
follow: UiFollowMode;
|
|
1620
|
+
constructor(options?: UIPanelOptions);
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
type UiTextAlign = "left" | "center" | "right";
|
|
1624
|
+
type UiTextVAlign = "top" | "middle" | "bottom";
|
|
1625
|
+
/** Optional initializer for {@link UITextComponent}. */
|
|
1626
|
+
type UITextOptions = {
|
|
1627
|
+
text?: string;
|
|
1628
|
+
width?: number;
|
|
1629
|
+
height?: number;
|
|
1630
|
+
fontSize?: number;
|
|
1631
|
+
fontWeight?: number;
|
|
1632
|
+
color?: string;
|
|
1633
|
+
align?: UiTextAlign;
|
|
1634
|
+
valign?: UiTextVAlign;
|
|
1635
|
+
lineHeight?: number;
|
|
1636
|
+
padding?: number;
|
|
1637
|
+
};
|
|
1638
|
+
/**
|
|
1639
|
+
* A block of text drawn onto a transparent canvas quad.
|
|
1640
|
+
*
|
|
1641
|
+
* Pure text — put a {@link UIPanelComponent} entity behind it for a card
|
|
1642
|
+
* look. `fontSize` is in METRES (how tall the glyphs stand in the world), so
|
|
1643
|
+
* text reads the same regardless of texture density. Wrapping is automatic
|
|
1644
|
+
* inside `width`; overflow past `height` is line-clamped with an ellipsis.
|
|
1645
|
+
*
|
|
1646
|
+
* @category Components
|
|
1647
|
+
*/
|
|
1648
|
+
declare class UITextComponent extends Component {
|
|
1649
|
+
text: string;
|
|
1650
|
+
/** Layout box width in metres — wrap happens against this. */
|
|
1651
|
+
width: number;
|
|
1652
|
+
/** Layout box height in metres — overflow clamps to it. */
|
|
1653
|
+
height: number;
|
|
1654
|
+
/** Glyph height in metres. */
|
|
1655
|
+
fontSize: number;
|
|
1656
|
+
/** CSS font weight (400 normal, 600 semibold…). */
|
|
1657
|
+
fontWeight: number;
|
|
1658
|
+
color: string;
|
|
1659
|
+
align: UiTextAlign;
|
|
1660
|
+
valign: UiTextVAlign;
|
|
1661
|
+
/** Unitless multiplier over fontSize. */
|
|
1662
|
+
lineHeight: number;
|
|
1663
|
+
/** Inner padding in metres. */
|
|
1664
|
+
padding: number;
|
|
1665
|
+
constructor(options?: UITextOptions);
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
/** Optional initializer for {@link UIButtonComponent}. */
|
|
1669
|
+
type UIButtonOptions = {
|
|
1670
|
+
label?: string;
|
|
1671
|
+
actionId?: string;
|
|
1672
|
+
width?: number;
|
|
1673
|
+
height?: number;
|
|
1674
|
+
fontSize?: number;
|
|
1675
|
+
fontWeight?: number;
|
|
1676
|
+
textColor?: string;
|
|
1677
|
+
backgroundColor?: string;
|
|
1678
|
+
backgroundOpacity?: number;
|
|
1679
|
+
cornerRadius?: number;
|
|
1680
|
+
borderWidth?: number;
|
|
1681
|
+
borderColor?: string;
|
|
1682
|
+
};
|
|
1683
|
+
/**
|
|
1684
|
+
* A pressable control.
|
|
1685
|
+
*
|
|
1686
|
+
* A press is CLICK-ON-RELEASE: it arms when the pinch/trigger/mouse goes down
|
|
1687
|
+
* on the button and fires only if the release still points at it — sliding
|
|
1688
|
+
* off cancels, matching platform UX. Scripts hear it via
|
|
1689
|
+
* `Behaviour.onUiPress`, on the button's own entity first and then bubbling
|
|
1690
|
+
* up the parent chain, carrying `actionId` (defaults to the entity's name) so
|
|
1691
|
+
* one panel script can handle all of its buttons.
|
|
1692
|
+
*
|
|
1693
|
+
* @category Components
|
|
1694
|
+
*/
|
|
1695
|
+
declare class UIButtonComponent extends Component {
|
|
1696
|
+
label: string;
|
|
1697
|
+
/** Dispatch identifier; empty string means "use the entity name". */
|
|
1698
|
+
actionId: string;
|
|
1699
|
+
/** Full width in metres. */
|
|
1700
|
+
width: number;
|
|
1701
|
+
/** Full height in metres. */
|
|
1702
|
+
height: number;
|
|
1703
|
+
/** Label glyph height in metres. */
|
|
1704
|
+
fontSize: number;
|
|
1705
|
+
fontWeight: number;
|
|
1706
|
+
textColor: string;
|
|
1707
|
+
backgroundColor: string;
|
|
1708
|
+
backgroundOpacity: number;
|
|
1709
|
+
cornerRadius: number;
|
|
1710
|
+
borderWidth: number;
|
|
1711
|
+
borderColor: string;
|
|
1712
|
+
constructor(options?: UIButtonOptions);
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
/** Optional initializer for {@link UIToggleComponent}. */
|
|
1716
|
+
type UIToggleOptions = {
|
|
1717
|
+
value?: boolean;
|
|
1718
|
+
actionId?: string;
|
|
1719
|
+
width?: number;
|
|
1720
|
+
height?: number;
|
|
1721
|
+
trackColor?: string;
|
|
1722
|
+
accentColor?: string;
|
|
1723
|
+
knobColor?: string;
|
|
1724
|
+
};
|
|
1725
|
+
/**
|
|
1726
|
+
* An on/off switch.
|
|
1727
|
+
*
|
|
1728
|
+
* The knob is a separate quad positioned from `value` — flipping animates
|
|
1729
|
+
* geometry, never redrawing the canvas. Scripts hear changes via
|
|
1730
|
+
* `Behaviour.onUiToggle` (bubbling like button presses); `value` is authored
|
|
1731
|
+
* state and persists with the scene.
|
|
1732
|
+
*
|
|
1733
|
+
* @category Components
|
|
1734
|
+
*/
|
|
1735
|
+
declare class UIToggleComponent extends Component {
|
|
1736
|
+
value: boolean;
|
|
1737
|
+
/** Dispatch identifier; empty string means "use the entity name". */
|
|
1738
|
+
actionId: string;
|
|
1739
|
+
/** Full width in metres. */
|
|
1740
|
+
width: number;
|
|
1741
|
+
/** Full height in metres. */
|
|
1742
|
+
height: number;
|
|
1743
|
+
/** Track colour while OFF. */
|
|
1744
|
+
trackColor: string;
|
|
1745
|
+
/** Track colour while ON. */
|
|
1746
|
+
accentColor: string;
|
|
1747
|
+
knobColor: string;
|
|
1748
|
+
constructor(options?: UIToggleOptions);
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
/** Optional initializer for {@link UISliderComponent}. */
|
|
1752
|
+
type UISliderOptions = {
|
|
1753
|
+
value?: number;
|
|
1754
|
+
min?: number;
|
|
1755
|
+
max?: number;
|
|
1756
|
+
actionId?: string;
|
|
1757
|
+
width?: number;
|
|
1758
|
+
height?: number;
|
|
1759
|
+
trackColor?: string;
|
|
1760
|
+
accentColor?: string;
|
|
1761
|
+
knobColor?: string;
|
|
1762
|
+
};
|
|
1763
|
+
/**
|
|
1764
|
+
* A draggable value control.
|
|
1765
|
+
*
|
|
1766
|
+
* Press and drag along the track: the value is the clamped projection of the
|
|
1767
|
+
* pointer onto the track's local X. The fill and knob are separate quads
|
|
1768
|
+
* positioned from `value`, so dragging repositions geometry and never
|
|
1769
|
+
* redraws the canvas. Scripts hear changes via `Behaviour.onUiChange`
|
|
1770
|
+
* (throttled to real value changes, plus a final dispatch on release).
|
|
1771
|
+
*
|
|
1772
|
+
* @category Components
|
|
1773
|
+
*/
|
|
1774
|
+
declare class UISliderComponent extends Component {
|
|
1775
|
+
/** Current value, clamped to [min, max]. */
|
|
1776
|
+
value: number;
|
|
1777
|
+
min: number;
|
|
1778
|
+
max: number;
|
|
1779
|
+
/** Dispatch identifier; empty string means "use the entity name". */
|
|
1780
|
+
actionId: string;
|
|
1781
|
+
/** Full width in metres. */
|
|
1782
|
+
width: number;
|
|
1783
|
+
/** Full height in metres. */
|
|
1784
|
+
height: number;
|
|
1785
|
+
trackColor: string;
|
|
1786
|
+
/** Fill colour between min and the current value. */
|
|
1787
|
+
accentColor: string;
|
|
1788
|
+
knobColor: string;
|
|
1789
|
+
constructor(options?: UISliderOptions);
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1576
1792
|
/**
|
|
1577
1793
|
* What is rendered at the user's hands.
|
|
1578
1794
|
*
|
|
@@ -1737,4 +1953,4 @@ declare class XRHandPoseComponent extends Component {
|
|
|
1737
1953
|
constructor(options?: XRHandPoseOptions);
|
|
1738
1954
|
}
|
|
1739
1955
|
|
|
1740
|
-
export { Selectable as $, AnimationComponent as A, type MaterialValueState as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshComponent as F, MeshGeometryComponent as G, type MeshGeometryParameters as H, ImageComponent as I, type MeshGeometryParametersByKind as J, ModelComponent as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PhysicsState as Q, type PlaneMeshParameters as R, type RadiusHeightMeshParameters as S, type RadiusMeshParameters as T, type RigidbodyState as U, type RigidbodyType as V, ScriptComponent as W, type ScriptEntry as X, ScriptObjectComponent as Y, type ScriptObjectComponentInput as Z, type ScriptObjectRuntimeState as _, type AnimationComponentOptions as a, SelectionTransformState as a0, SpriteComponent as a1, type TextureFilteringValue as a2, type TransformModeValue as a3, type TransformSpaceValue as a4,
|
|
1956
|
+
export { Selectable as $, AnimationComponent as A, type MaterialValueState as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshComponent as F, MeshGeometryComponent as G, type MeshGeometryParameters as H, ImageComponent as I, type MeshGeometryParametersByKind as J, ModelComponent as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PhysicsState as Q, type PlaneMeshParameters as R, type RadiusHeightMeshParameters as S, type RadiusMeshParameters as T, type RigidbodyState as U, type RigidbodyType as V, ScriptComponent as W, type ScriptEntry as X, ScriptObjectComponent as Y, type ScriptObjectComponentInput as Z, type ScriptObjectRuntimeState as _, type AnimationComponentOptions as a, SelectionTransformState as a0, SpriteComponent as a1, type TextureFilteringValue as a2, type TransformModeValue as a3, type TransformSpaceValue as a4, UIButtonComponent as a5, type UIButtonOptions as a6, UIPanelComponent as a7, type UIPanelOptions as a8, UISliderComponent as a9, type XrGrabGesture as aA, type XrGrabHands as aB, type XrGrabReach as aC, type XrHandPoseEntry as aD, type XrHandPreset as aE, type XrInteractorSide as aF, type XrInteractorType as aG, type XrLocomotionMode as aH, type XrTrackingOrigin as aI, type XrTwoHandRotation as aJ, createAttachPoint as aK, createHandPoseEntry as aL, defaultMaterialValue as aM, handPoseDefinitionFor as aN, normalizePhysicsState as aO, setPhysicsLiveRef as aP, type AnimationStateCallbacks as aQ, AnimationStateMachine as aR, AnimationStateManager as aS, type StateMachine as aT, type UISliderOptions as aa, UITextComponent as ab, type UITextOptions as ac, UIToggleComponent as ad, type UIToggleOptions as ae, type UiFollowMode as af, type UiTextAlign as ag, type UiTextVAlign as ah, VRTeleportAreaComponent as ai, type VRTeleportAreaOptions as aj, VideoComponent as ak, type VrTeleportShape as al, XRAnchorComponent as am, type XRAnchorOptions as an, XRHandPoseComponent as ao, type XRHandPoseOptions as ap, XRInteractableComponent as aq, type XRInteractableOptions as ar, XRInteractorComponent as as, type XRInteractorOptions as at, XRInteractorSideComponent as au, XRRigComponent as av, type XRRigOptions as aw, type XrAttachPoint as ax, type XrDistanceGrabBehavior as ay, type XrEnvironmentPhysics as az, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_POSE_CURLS as m, DEFAULT_POSE_DIRECTIONS as n, DEFAULT_RIGIDBODY_STATE as o, EntityType as p, ImageTarget as q, ImageTargetAnchor as r, type ImageTargetAnchorOptions as s, type ImageTargetReference as t, InstanceSlotComponent as u, type InstanceTransform as v, InstancedMeshComponent as w, type InstancedMeshKind as x, type LightValueState as y, type MaterialTypeValue as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-
|
|
2
|
+
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-V_mv07le.js';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
import { a as XrFinger, c as XrHandPoseDirection, b as XrHandPoseOrientation, X as XrHandPoseDefinition } from './handPose-DlcTtqgx.js';
|
|
5
5
|
|
|
@@ -1573,6 +1573,222 @@ declare class XRAnchorComponent extends Component {
|
|
|
1573
1573
|
constructor(options?: XRAnchorOptions);
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
+
/** How a panel orients itself while the experience runs. */
|
|
1577
|
+
type UiFollowMode = "world" | "billboard";
|
|
1578
|
+
/** Optional initializer for {@link UIPanelComponent}. */
|
|
1579
|
+
type UIPanelOptions = {
|
|
1580
|
+
width?: number;
|
|
1581
|
+
height?: number;
|
|
1582
|
+
backgroundColor?: string;
|
|
1583
|
+
backgroundOpacity?: number;
|
|
1584
|
+
cornerRadius?: number;
|
|
1585
|
+
borderWidth?: number;
|
|
1586
|
+
borderColor?: string;
|
|
1587
|
+
pixelDensity?: number;
|
|
1588
|
+
follow?: UiFollowMode;
|
|
1589
|
+
};
|
|
1590
|
+
/**
|
|
1591
|
+
* A flat UI surface in the world — the backdrop menus and HUDs are built on.
|
|
1592
|
+
*
|
|
1593
|
+
* Size is authored in METRES on the component, never via transform scale:
|
|
1594
|
+
* the canvas texture is rasterised for the authored size, so scaling the
|
|
1595
|
+
* entity would stretch texels into blur. Child widgets (text, buttons,
|
|
1596
|
+
* toggles, sliders) are ordinary entities parented under the panel and placed
|
|
1597
|
+
* with their transforms.
|
|
1598
|
+
*
|
|
1599
|
+
* `follow: "billboard"` yaw-faces the camera each frame; for a wrist menu,
|
|
1600
|
+
* parent the panel under an XR Interactor's Left/Right slot entity instead.
|
|
1601
|
+
*
|
|
1602
|
+
* @category Components
|
|
1603
|
+
*/
|
|
1604
|
+
declare class UIPanelComponent extends Component {
|
|
1605
|
+
/** Full width in metres. */
|
|
1606
|
+
width: number;
|
|
1607
|
+
/** Full height in metres. */
|
|
1608
|
+
height: number;
|
|
1609
|
+
backgroundColor: string;
|
|
1610
|
+
/** 0–1. Panels are usually slightly translucent in XR. */
|
|
1611
|
+
backgroundOpacity: number;
|
|
1612
|
+
/** Corner radius in metres. */
|
|
1613
|
+
cornerRadius: number;
|
|
1614
|
+
/** Border thickness in metres; 0 disables the border. */
|
|
1615
|
+
borderWidth: number;
|
|
1616
|
+
borderColor: string;
|
|
1617
|
+
/** Texture density in px/metre, clamped 256–2048 at render time. */
|
|
1618
|
+
pixelDensity: number;
|
|
1619
|
+
follow: UiFollowMode;
|
|
1620
|
+
constructor(options?: UIPanelOptions);
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
type UiTextAlign = "left" | "center" | "right";
|
|
1624
|
+
type UiTextVAlign = "top" | "middle" | "bottom";
|
|
1625
|
+
/** Optional initializer for {@link UITextComponent}. */
|
|
1626
|
+
type UITextOptions = {
|
|
1627
|
+
text?: string;
|
|
1628
|
+
width?: number;
|
|
1629
|
+
height?: number;
|
|
1630
|
+
fontSize?: number;
|
|
1631
|
+
fontWeight?: number;
|
|
1632
|
+
color?: string;
|
|
1633
|
+
align?: UiTextAlign;
|
|
1634
|
+
valign?: UiTextVAlign;
|
|
1635
|
+
lineHeight?: number;
|
|
1636
|
+
padding?: number;
|
|
1637
|
+
};
|
|
1638
|
+
/**
|
|
1639
|
+
* A block of text drawn onto a transparent canvas quad.
|
|
1640
|
+
*
|
|
1641
|
+
* Pure text — put a {@link UIPanelComponent} entity behind it for a card
|
|
1642
|
+
* look. `fontSize` is in METRES (how tall the glyphs stand in the world), so
|
|
1643
|
+
* text reads the same regardless of texture density. Wrapping is automatic
|
|
1644
|
+
* inside `width`; overflow past `height` is line-clamped with an ellipsis.
|
|
1645
|
+
*
|
|
1646
|
+
* @category Components
|
|
1647
|
+
*/
|
|
1648
|
+
declare class UITextComponent extends Component {
|
|
1649
|
+
text: string;
|
|
1650
|
+
/** Layout box width in metres — wrap happens against this. */
|
|
1651
|
+
width: number;
|
|
1652
|
+
/** Layout box height in metres — overflow clamps to it. */
|
|
1653
|
+
height: number;
|
|
1654
|
+
/** Glyph height in metres. */
|
|
1655
|
+
fontSize: number;
|
|
1656
|
+
/** CSS font weight (400 normal, 600 semibold…). */
|
|
1657
|
+
fontWeight: number;
|
|
1658
|
+
color: string;
|
|
1659
|
+
align: UiTextAlign;
|
|
1660
|
+
valign: UiTextVAlign;
|
|
1661
|
+
/** Unitless multiplier over fontSize. */
|
|
1662
|
+
lineHeight: number;
|
|
1663
|
+
/** Inner padding in metres. */
|
|
1664
|
+
padding: number;
|
|
1665
|
+
constructor(options?: UITextOptions);
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
/** Optional initializer for {@link UIButtonComponent}. */
|
|
1669
|
+
type UIButtonOptions = {
|
|
1670
|
+
label?: string;
|
|
1671
|
+
actionId?: string;
|
|
1672
|
+
width?: number;
|
|
1673
|
+
height?: number;
|
|
1674
|
+
fontSize?: number;
|
|
1675
|
+
fontWeight?: number;
|
|
1676
|
+
textColor?: string;
|
|
1677
|
+
backgroundColor?: string;
|
|
1678
|
+
backgroundOpacity?: number;
|
|
1679
|
+
cornerRadius?: number;
|
|
1680
|
+
borderWidth?: number;
|
|
1681
|
+
borderColor?: string;
|
|
1682
|
+
};
|
|
1683
|
+
/**
|
|
1684
|
+
* A pressable control.
|
|
1685
|
+
*
|
|
1686
|
+
* A press is CLICK-ON-RELEASE: it arms when the pinch/trigger/mouse goes down
|
|
1687
|
+
* on the button and fires only if the release still points at it — sliding
|
|
1688
|
+
* off cancels, matching platform UX. Scripts hear it via
|
|
1689
|
+
* `Behaviour.onUiPress`, on the button's own entity first and then bubbling
|
|
1690
|
+
* up the parent chain, carrying `actionId` (defaults to the entity's name) so
|
|
1691
|
+
* one panel script can handle all of its buttons.
|
|
1692
|
+
*
|
|
1693
|
+
* @category Components
|
|
1694
|
+
*/
|
|
1695
|
+
declare class UIButtonComponent extends Component {
|
|
1696
|
+
label: string;
|
|
1697
|
+
/** Dispatch identifier; empty string means "use the entity name". */
|
|
1698
|
+
actionId: string;
|
|
1699
|
+
/** Full width in metres. */
|
|
1700
|
+
width: number;
|
|
1701
|
+
/** Full height in metres. */
|
|
1702
|
+
height: number;
|
|
1703
|
+
/** Label glyph height in metres. */
|
|
1704
|
+
fontSize: number;
|
|
1705
|
+
fontWeight: number;
|
|
1706
|
+
textColor: string;
|
|
1707
|
+
backgroundColor: string;
|
|
1708
|
+
backgroundOpacity: number;
|
|
1709
|
+
cornerRadius: number;
|
|
1710
|
+
borderWidth: number;
|
|
1711
|
+
borderColor: string;
|
|
1712
|
+
constructor(options?: UIButtonOptions);
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
/** Optional initializer for {@link UIToggleComponent}. */
|
|
1716
|
+
type UIToggleOptions = {
|
|
1717
|
+
value?: boolean;
|
|
1718
|
+
actionId?: string;
|
|
1719
|
+
width?: number;
|
|
1720
|
+
height?: number;
|
|
1721
|
+
trackColor?: string;
|
|
1722
|
+
accentColor?: string;
|
|
1723
|
+
knobColor?: string;
|
|
1724
|
+
};
|
|
1725
|
+
/**
|
|
1726
|
+
* An on/off switch.
|
|
1727
|
+
*
|
|
1728
|
+
* The knob is a separate quad positioned from `value` — flipping animates
|
|
1729
|
+
* geometry, never redrawing the canvas. Scripts hear changes via
|
|
1730
|
+
* `Behaviour.onUiToggle` (bubbling like button presses); `value` is authored
|
|
1731
|
+
* state and persists with the scene.
|
|
1732
|
+
*
|
|
1733
|
+
* @category Components
|
|
1734
|
+
*/
|
|
1735
|
+
declare class UIToggleComponent extends Component {
|
|
1736
|
+
value: boolean;
|
|
1737
|
+
/** Dispatch identifier; empty string means "use the entity name". */
|
|
1738
|
+
actionId: string;
|
|
1739
|
+
/** Full width in metres. */
|
|
1740
|
+
width: number;
|
|
1741
|
+
/** Full height in metres. */
|
|
1742
|
+
height: number;
|
|
1743
|
+
/** Track colour while OFF. */
|
|
1744
|
+
trackColor: string;
|
|
1745
|
+
/** Track colour while ON. */
|
|
1746
|
+
accentColor: string;
|
|
1747
|
+
knobColor: string;
|
|
1748
|
+
constructor(options?: UIToggleOptions);
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
/** Optional initializer for {@link UISliderComponent}. */
|
|
1752
|
+
type UISliderOptions = {
|
|
1753
|
+
value?: number;
|
|
1754
|
+
min?: number;
|
|
1755
|
+
max?: number;
|
|
1756
|
+
actionId?: string;
|
|
1757
|
+
width?: number;
|
|
1758
|
+
height?: number;
|
|
1759
|
+
trackColor?: string;
|
|
1760
|
+
accentColor?: string;
|
|
1761
|
+
knobColor?: string;
|
|
1762
|
+
};
|
|
1763
|
+
/**
|
|
1764
|
+
* A draggable value control.
|
|
1765
|
+
*
|
|
1766
|
+
* Press and drag along the track: the value is the clamped projection of the
|
|
1767
|
+
* pointer onto the track's local X. The fill and knob are separate quads
|
|
1768
|
+
* positioned from `value`, so dragging repositions geometry and never
|
|
1769
|
+
* redraws the canvas. Scripts hear changes via `Behaviour.onUiChange`
|
|
1770
|
+
* (throttled to real value changes, plus a final dispatch on release).
|
|
1771
|
+
*
|
|
1772
|
+
* @category Components
|
|
1773
|
+
*/
|
|
1774
|
+
declare class UISliderComponent extends Component {
|
|
1775
|
+
/** Current value, clamped to [min, max]. */
|
|
1776
|
+
value: number;
|
|
1777
|
+
min: number;
|
|
1778
|
+
max: number;
|
|
1779
|
+
/** Dispatch identifier; empty string means "use the entity name". */
|
|
1780
|
+
actionId: string;
|
|
1781
|
+
/** Full width in metres. */
|
|
1782
|
+
width: number;
|
|
1783
|
+
/** Full height in metres. */
|
|
1784
|
+
height: number;
|
|
1785
|
+
trackColor: string;
|
|
1786
|
+
/** Fill colour between min and the current value. */
|
|
1787
|
+
accentColor: string;
|
|
1788
|
+
knobColor: string;
|
|
1789
|
+
constructor(options?: UISliderOptions);
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1576
1792
|
/**
|
|
1577
1793
|
* What is rendered at the user's hands.
|
|
1578
1794
|
*
|
|
@@ -1737,4 +1953,4 @@ declare class XRHandPoseComponent extends Component {
|
|
|
1737
1953
|
constructor(options?: XRHandPoseOptions);
|
|
1738
1954
|
}
|
|
1739
1955
|
|
|
1740
|
-
export { Selectable as $, AnimationComponent as A, type MaterialValueState as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshComponent as F, MeshGeometryComponent as G, type MeshGeometryParameters as H, ImageComponent as I, type MeshGeometryParametersByKind as J, ModelComponent as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PhysicsState as Q, type PlaneMeshParameters as R, type RadiusHeightMeshParameters as S, type RadiusMeshParameters as T, type RigidbodyState as U, type RigidbodyType as V, ScriptComponent as W, type ScriptEntry as X, ScriptObjectComponent as Y, type ScriptObjectComponentInput as Z, type ScriptObjectRuntimeState as _, type AnimationComponentOptions as a, SelectionTransformState as a0, SpriteComponent as a1, type TextureFilteringValue as a2, type TransformModeValue as a3, type TransformSpaceValue as a4,
|
|
1956
|
+
export { Selectable as $, AnimationComponent as A, type MaterialValueState as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, MeshComponent as F, MeshGeometryComponent as G, type MeshGeometryParameters as H, ImageComponent as I, type MeshGeometryParametersByKind as J, ModelComponent as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type PhysicsState as Q, type PlaneMeshParameters as R, type RadiusHeightMeshParameters as S, type RadiusMeshParameters as T, type RigidbodyState as U, type RigidbodyType as V, ScriptComponent as W, type ScriptEntry as X, ScriptObjectComponent as Y, type ScriptObjectComponentInput as Z, type ScriptObjectRuntimeState as _, type AnimationComponentOptions as a, SelectionTransformState as a0, SpriteComponent as a1, type TextureFilteringValue as a2, type TransformModeValue as a3, type TransformSpaceValue as a4, UIButtonComponent as a5, type UIButtonOptions as a6, UIPanelComponent as a7, type UIPanelOptions as a8, UISliderComponent as a9, type XrGrabGesture as aA, type XrGrabHands as aB, type XrGrabReach as aC, type XrHandPoseEntry as aD, type XrHandPreset as aE, type XrInteractorSide as aF, type XrInteractorType as aG, type XrLocomotionMode as aH, type XrTrackingOrigin as aI, type XrTwoHandRotation as aJ, createAttachPoint as aK, createHandPoseEntry as aL, defaultMaterialValue as aM, handPoseDefinitionFor as aN, normalizePhysicsState as aO, setPhysicsLiveRef as aP, type AnimationStateCallbacks as aQ, AnimationStateMachine as aR, AnimationStateManager as aS, type StateMachine as aT, type UISliderOptions as aa, UITextComponent as ab, type UITextOptions as ac, UIToggleComponent as ad, type UIToggleOptions as ae, type UiFollowMode as af, type UiTextAlign as ag, type UiTextVAlign as ah, VRTeleportAreaComponent as ai, type VRTeleportAreaOptions as aj, VideoComponent as ak, type VrTeleportShape as al, XRAnchorComponent as am, type XRAnchorOptions as an, XRHandPoseComponent as ao, type XRHandPoseOptions as ap, XRInteractableComponent as aq, type XRInteractableOptions as ar, XRInteractorComponent as as, type XRInteractorOptions as at, XRInteractorSideComponent as au, XRRigComponent as av, type XRRigOptions as aw, type XrAttachPoint as ax, type XrDistanceGrabBehavior as ay, type XrEnvironmentPhysics as az, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_POSE_CURLS as m, DEFAULT_POSE_DIRECTIONS as n, DEFAULT_RIGIDBODY_STATE as o, EntityType as p, ImageTarget as q, ImageTargetAnchor as r, type ImageTargetAnchorOptions as s, type ImageTargetReference as t, InstanceSlotComponent as u, type InstanceTransform as v, InstancedMeshComponent as w, type InstancedMeshKind as x, type LightValueState as y, type MaterialTypeValue as z };
|
|
@@ -43,6 +43,11 @@ __export(components_exports, {
|
|
|
43
43
|
SelectionTransformState: () => SelectionTransformState,
|
|
44
44
|
SpriteComponent: () => SpriteComponent,
|
|
45
45
|
TransformComponent: () => TransformComponent,
|
|
46
|
+
UIButtonComponent: () => UIButtonComponent,
|
|
47
|
+
UIPanelComponent: () => UIPanelComponent,
|
|
48
|
+
UISliderComponent: () => UISliderComponent,
|
|
49
|
+
UITextComponent: () => UITextComponent,
|
|
50
|
+
UIToggleComponent: () => UIToggleComponent,
|
|
46
51
|
VRTeleportAreaComponent: () => VRTeleportAreaComponent,
|
|
47
52
|
VideoComponent: () => VideoComponent,
|
|
48
53
|
XRAnchorComponent: () => XRAnchorComponent,
|
|
@@ -2034,6 +2039,100 @@ var _XRAnchorComponent = class _XRAnchorComponent extends Component {
|
|
|
2034
2039
|
__name(_XRAnchorComponent, "XRAnchorComponent");
|
|
2035
2040
|
var XRAnchorComponent = _XRAnchorComponent;
|
|
2036
2041
|
|
|
2042
|
+
// core/components/UIPanel.ts
|
|
2043
|
+
var _UIPanelComponent = class _UIPanelComponent extends Component {
|
|
2044
|
+
constructor(options) {
|
|
2045
|
+
super();
|
|
2046
|
+
this.width = options?.width ?? 0.6;
|
|
2047
|
+
this.height = options?.height ?? 0.4;
|
|
2048
|
+
this.backgroundColor = options?.backgroundColor ?? "#1c1c1c";
|
|
2049
|
+
this.backgroundOpacity = options?.backgroundOpacity ?? 0.92;
|
|
2050
|
+
this.cornerRadius = options?.cornerRadius ?? 0.02;
|
|
2051
|
+
this.borderWidth = options?.borderWidth ?? 0;
|
|
2052
|
+
this.borderColor = options?.borderColor ?? "#333333";
|
|
2053
|
+
this.pixelDensity = options?.pixelDensity ?? 1024;
|
|
2054
|
+
this.follow = options?.follow ?? "world";
|
|
2055
|
+
}
|
|
2056
|
+
};
|
|
2057
|
+
__name(_UIPanelComponent, "UIPanelComponent");
|
|
2058
|
+
var UIPanelComponent = _UIPanelComponent;
|
|
2059
|
+
|
|
2060
|
+
// core/components/UIText.ts
|
|
2061
|
+
var _UITextComponent = class _UITextComponent extends Component {
|
|
2062
|
+
constructor(options) {
|
|
2063
|
+
super();
|
|
2064
|
+
this.text = options?.text ?? "Text";
|
|
2065
|
+
this.width = options?.width ?? 0.5;
|
|
2066
|
+
this.height = options?.height ?? 0.12;
|
|
2067
|
+
this.fontSize = options?.fontSize ?? 0.035;
|
|
2068
|
+
this.fontWeight = options?.fontWeight ?? 500;
|
|
2069
|
+
this.color = options?.color ?? "#ffffff";
|
|
2070
|
+
this.align = options?.align ?? "center";
|
|
2071
|
+
this.valign = options?.valign ?? "middle";
|
|
2072
|
+
this.lineHeight = options?.lineHeight ?? 1.25;
|
|
2073
|
+
this.padding = options?.padding ?? 0.01;
|
|
2074
|
+
}
|
|
2075
|
+
};
|
|
2076
|
+
__name(_UITextComponent, "UITextComponent");
|
|
2077
|
+
var UITextComponent = _UITextComponent;
|
|
2078
|
+
|
|
2079
|
+
// core/components/UIButton.ts
|
|
2080
|
+
var _UIButtonComponent = class _UIButtonComponent extends Component {
|
|
2081
|
+
constructor(options) {
|
|
2082
|
+
super();
|
|
2083
|
+
this.label = options?.label ?? "Button";
|
|
2084
|
+
this.actionId = options?.actionId ?? "";
|
|
2085
|
+
this.width = options?.width ?? 0.3;
|
|
2086
|
+
this.height = options?.height ?? 0.1;
|
|
2087
|
+
this.fontSize = options?.fontSize ?? 0.03;
|
|
2088
|
+
this.fontWeight = options?.fontWeight ?? 600;
|
|
2089
|
+
this.textColor = options?.textColor ?? "#ffffff";
|
|
2090
|
+
this.backgroundColor = options?.backgroundColor ?? "#2a2a2a";
|
|
2091
|
+
this.backgroundOpacity = options?.backgroundOpacity ?? 1;
|
|
2092
|
+
this.cornerRadius = options?.cornerRadius ?? 0.02;
|
|
2093
|
+
this.borderWidth = options?.borderWidth ?? 2e-3;
|
|
2094
|
+
this.borderColor = options?.borderColor ?? "#3a3a3a";
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
__name(_UIButtonComponent, "UIButtonComponent");
|
|
2098
|
+
var UIButtonComponent = _UIButtonComponent;
|
|
2099
|
+
|
|
2100
|
+
// core/components/UIToggle.ts
|
|
2101
|
+
var _UIToggleComponent = class _UIToggleComponent extends Component {
|
|
2102
|
+
constructor(options) {
|
|
2103
|
+
super();
|
|
2104
|
+
this.value = options?.value ?? false;
|
|
2105
|
+
this.actionId = options?.actionId ?? "";
|
|
2106
|
+
this.width = options?.width ?? 0.14;
|
|
2107
|
+
this.height = options?.height ?? 0.07;
|
|
2108
|
+
this.trackColor = options?.trackColor ?? "#2a2a2a";
|
|
2109
|
+
this.accentColor = options?.accentColor ?? "#ff6b35";
|
|
2110
|
+
this.knobColor = options?.knobColor ?? "#ffffff";
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
__name(_UIToggleComponent, "UIToggleComponent");
|
|
2114
|
+
var UIToggleComponent = _UIToggleComponent;
|
|
2115
|
+
|
|
2116
|
+
// core/components/UISlider.ts
|
|
2117
|
+
var _UISliderComponent = class _UISliderComponent extends Component {
|
|
2118
|
+
constructor(options) {
|
|
2119
|
+
super();
|
|
2120
|
+
this.min = options?.min ?? 0;
|
|
2121
|
+
this.max = options?.max ?? Math.max(1, this.min + 1);
|
|
2122
|
+
if (this.max <= this.min) this.max = this.min + 1;
|
|
2123
|
+
const v = options?.value ?? (this.min + this.max) / 2;
|
|
2124
|
+
this.value = Math.min(this.max, Math.max(this.min, v));
|
|
2125
|
+
this.actionId = options?.actionId ?? "";
|
|
2126
|
+
this.width = options?.width ?? 0.4;
|
|
2127
|
+
this.height = options?.height ?? 0.06;
|
|
2128
|
+
this.trackColor = options?.trackColor ?? "#2a2a2a";
|
|
2129
|
+
this.accentColor = options?.accentColor ?? "#ff6b35";
|
|
2130
|
+
this.knobColor = options?.knobColor ?? "#ffffff";
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
__name(_UISliderComponent, "UISliderComponent");
|
|
2134
|
+
var UISliderComponent = _UISliderComponent;
|
|
2135
|
+
|
|
2037
2136
|
// core/components/XRInteractor.ts
|
|
2038
2137
|
var _XRInteractorComponent = class _XRInteractorComponent extends Component {
|
|
2039
2138
|
constructor(options) {
|
|
@@ -2292,6 +2391,6 @@ var _XRHandPoseComponent = class _XRHandPoseComponent extends Component {
|
|
|
2292
2391
|
__name(_XRHandPoseComponent, "XRHandPoseComponent");
|
|
2293
2392
|
var XRHandPoseComponent = _XRHandPoseComponent;
|
|
2294
2393
|
|
|
2295
|
-
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSE_CURLS, DEFAULT_POSE_DIRECTIONS, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VRTeleportAreaComponent, VideoComponent, XRAnchorComponent, XREnvironmentComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, XRRigComponent, cloneHandPose, components_exports, createAttachPoint, createHandPoseEntry, defaultMaterialValue, getHandPosePreset, handPoseDefinitionFor, handPoseFromCurls, normalizePhysicsState, setPhysicsLiveRef };
|
|
2296
|
-
//# sourceMappingURL=chunk-
|
|
2297
|
-
//# sourceMappingURL=chunk-
|
|
2394
|
+
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSE_CURLS, DEFAULT_POSE_DIRECTIONS, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, UIButtonComponent, UIPanelComponent, UISliderComponent, UITextComponent, UIToggleComponent, VRTeleportAreaComponent, VideoComponent, XRAnchorComponent, XREnvironmentComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, XRRigComponent, cloneHandPose, components_exports, createAttachPoint, createHandPoseEntry, defaultMaterialValue, getHandPosePreset, handPoseDefinitionFor, handPoseFromCurls, normalizePhysicsState, setPhysicsLiveRef };
|
|
2395
|
+
//# sourceMappingURL=chunk-BUEKOSR5.js.map
|
|
2396
|
+
//# sourceMappingURL=chunk-BUEKOSR5.js.map
|