@hypersoniclabs/helix-cli 0.1.27-helix3.697 → 0.1.27-helix3.699
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/device.js +44 -2
- package/dist/device.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_abs.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_audio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_engine.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_expression.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_jbeam.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_materials.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_stock_events.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/fmod_studio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/fsb5.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_ac.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_beamng.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_fixtures.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/test_beamng_engine.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/test_sim_audio.cpython-312.pyc +0 -0
package/dist/device.js
CHANGED
|
@@ -1758,6 +1758,17 @@ function validateDeviceProject(input, options = {}) {
|
|
|
1758
1758
|
errors.push(`interaction ${id} maxDistanceM must be > 0 and <= 20`);
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
|
+
// `anchorNode`: a row measured from a named node of the Device instead of from its whole bounds (a room-sized Device is 0 m from everyone in it).
|
|
1762
|
+
if (interaction.anchorNode !== undefined) {
|
|
1763
|
+
if (typeof interaction.anchorNode !== 'string' ||
|
|
1764
|
+
!interaction.anchorNode.length ||
|
|
1765
|
+
interaction.anchorNode.length > 64) {
|
|
1766
|
+
errors.push(`interaction ${id} anchorNode must be a node name of 1 to 64 characters`);
|
|
1767
|
+
}
|
|
1768
|
+
else if (object(definition.model).kind === 'procedural' && !nodes.has(interaction.anchorNode)) {
|
|
1769
|
+
errors.push(`interaction ${id}: unknown anchorNode "${interaction.anchorNode}"`);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1761
1772
|
if (interaction.surface !== undefined &&
|
|
1762
1773
|
!['menu', 'internal'].includes(String(interaction.surface))) {
|
|
1763
1774
|
errors.push(`interaction ${id} has unsupported surface "${String(interaction.surface)}"`);
|
|
@@ -1920,6 +1931,37 @@ function validateDeviceProject(input, options = {}) {
|
|
|
1920
1931
|
for (const [name, raw] of Object.entries(object(definition.effects))) {
|
|
1921
1932
|
validateDeviceVfxSpec(raw, sockets, `effects.${name}`, errors);
|
|
1922
1933
|
}
|
|
1934
|
+
// `lightZones`: zones of a BAKED shell this Device dims with a numeric state (the engine's DeviceLightZone). A top-level list, not a component kind.
|
|
1935
|
+
const lightZones = definition.lightZones;
|
|
1936
|
+
if (lightZones !== undefined) {
|
|
1937
|
+
if (!Array.isArray(lightZones) || lightZones.length > 4) {
|
|
1938
|
+
errors.push('lightZones must be a list of at most 4 zones');
|
|
1939
|
+
}
|
|
1940
|
+
else {
|
|
1941
|
+
const lightZoneIds = new Set();
|
|
1942
|
+
for (const raw of lightZones) {
|
|
1943
|
+
const zone = object(raw);
|
|
1944
|
+
const zoneId = String(zone.id ?? '');
|
|
1945
|
+
if (!zoneId || zoneId.length > 64)
|
|
1946
|
+
errors.push('lightZones: each zone needs an id of 1 to 64 characters');
|
|
1947
|
+
else if (lightZoneIds.has(zoneId))
|
|
1948
|
+
errors.push(`lightZones: duplicate id "${zoneId}"`);
|
|
1949
|
+
lightZoneIds.add(zoneId);
|
|
1950
|
+
for (const key of Object.keys(zone))
|
|
1951
|
+
if (!['id', 'zone', 'stateKey', 'floor', 'rampMs'].includes(key))
|
|
1952
|
+
errors.push(`light zone ${zoneId} has unknown field "${key}"`);
|
|
1953
|
+
if (typeof zone.zone !== 'string' || !/^[a-z][a-z0-9-]{0,31}$/.test(zone.zone))
|
|
1954
|
+
errors.push(`light zone ${zoneId} zone must be a lowercase tag (a-z, 0-9, hyphen; at most 32 characters)`);
|
|
1955
|
+
const spec = typeof zone.stateKey === 'string' ? object(state[zone.stateKey]) : null;
|
|
1956
|
+
if (spec === null || !['integer', 'float'].includes(String(spec.type)))
|
|
1957
|
+
errors.push(`light zone ${zoneId} stateKey must reference numeric state`);
|
|
1958
|
+
if (zone.floor !== undefined && (!isFiniteNumber(zone.floor) || zone.floor < 0 || zone.floor > 1))
|
|
1959
|
+
errors.push(`light zone ${zoneId} floor must be between 0 and 1`);
|
|
1960
|
+
if (zone.rampMs !== undefined && (!isFiniteNumber(zone.rampMs) || zone.rampMs < 0 || zone.rampMs > 60000))
|
|
1961
|
+
errors.push(`light zone ${zoneId} rampMs must be between 0 and 60000`);
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1923
1965
|
const collision = Array.isArray(definition.collision)
|
|
1924
1966
|
? definition.collision.map(object)
|
|
1925
1967
|
: [];
|
|
@@ -2607,9 +2649,9 @@ function validateDeviceProject(input, options = {}) {
|
|
|
2607
2649
|
errors.push(`capability "${capability}" is unsupported`);
|
|
2608
2650
|
}
|
|
2609
2651
|
}
|
|
2610
|
-
if (components.some((component) => component.type === 'pointLight') &&
|
|
2652
|
+
if ((components.some((component) => component.type === 'pointLight') || (Array.isArray(lightZones) && lightZones.length > 0)) &&
|
|
2611
2653
|
!capabilities.has('presentation.light')) {
|
|
2612
|
-
errors.push('a point light requires capability presentation.light');
|
|
2654
|
+
errors.push('a point light or light zone requires capability presentation.light');
|
|
2613
2655
|
}
|
|
2614
2656
|
if (Object.values(object(definition.apps)).some((raw) => object(raw).type === 'canvas') &&
|
|
2615
2657
|
!capabilities.has('app.canvas')) {
|