Add "Grab And Equip" section

Add "Grab And Equip" section for the grabbale and Equipable groups of properties.
This commit is contained in:
Alezia Kurdis 2024-10-10 22:27:26 -04:00 committed by GitHub
parent 17e253006b
commit 82a923e06c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1512,11 +1512,6 @@ const GROUPS = [
id: "behavior",
label: "BEHAVIOR",
properties: [
{
label: "Grabbable",
type: "bool",
propertyID: "grab.grabbable",
},
{
label: "Cloneable",
type: "bool",
@ -1554,11 +1549,6 @@ const GROUPS = [
type: "bool",
propertyID: "grab.triggerable",
},
{
label: "Follow Controller",
type: "bool",
propertyID: "grab.grabFollowsController",
},
{
label: "Cast Shadows",
type: "bool",
@ -1583,6 +1573,113 @@ const GROUPS = [
}
]
},
{
id: "grabAndEquip",
label: "GRAB AND EQUIP",
properties: [
{
label: "Grabbable",
type: "bool",
propertyID: "grab.grabbable",
},
{
label: "Follow Controller",
type: "bool",
propertyID: "grab.grabFollowsController",
showPropertyRule: { "grab.grabbable": "true" },
},
{
label: "Kinematic Grab",
type: "bool",
propertyID: "grab.grabKinematic",
showPropertyRule: { "grab.grabbable": "true" },
},
{
label: "Delegate To Parent",
type: "bool",
propertyID: "grab.grabDelegateToParent",
showPropertyRule: { "grab.grabbable": "true" },
},
{
label: "Equippable",
type: "bool",
propertyID: "grab.equippable",
},
{
label: "Left Position",
type: "vec3",
vec3Type: "xyz",
subLabels: [ "x", "y", "z" ],
step: 0.0025,
decimals: 4,
unit: "m",
propertyID: "grab.equippableLeftPosition",
showPropertyRule: { "grab.equippable": "true" },
},
{
label: "Left Rotation",
type: "vec3",
vec3Type: "pyr",
step: 0.1,
decimals: 4,
subLabels: [ "x", "y", "z" ],
unit: "deg",
propertyID: "grab.equippableLeftRotation",
showPropertyRule: { "grab.equippable": "true" },
},
{
label: "Right Position",
type: "vec3",
vec3Type: "xyz",
subLabels: [ "x", "y", "z" ],
step: 0.0025,
decimals: 4,
unit: "m",
propertyID: "grab.equippableRightPosition",
showPropertyRule: { "grab.equippable": "true" },
},
{
label: "Right Rotation",
type: "vec3",
vec3Type: "pyr",
step: 0.1,
decimals: 4,
subLabels: [ "x", "y", "z" ],
unit: "deg",
propertyID: "grab.equippableRightRotation",
showPropertyRule: { "grab.equippable": "true" },
},
{
label: "Indicator Model URL",
type: "string",
propertyID: "grab.equippableIndicatorURL",
placeholder: "URL",
showPropertyRule: { "grab.equippable": "true" },
},
{
label: "Indicator Scale",
type: "vec3",
vec3Type: "xyz",
subLabels: [ "x", "y", "z" ],
step: 0.0025,
decimals: 4,
unit: "scale",
propertyID: "grab.equippableIndicatorScale",
showPropertyRule: { "grab.equippable": "true" },
},
{
label: "Indicator Offset",
type: "vec3",
vec3Type: "xyz",
subLabels: [ "x", "y", "z" ],
step: 0.005,
decimals: 4,
unit: "m",
propertyID: "grab.equippableIndicatorOffset",
showPropertyRule: { "grab.equippable": "true" },
},
]
},
{
id: "scripts",
label: "SCRIPTS",
@ -1761,22 +1858,22 @@ const GROUPS = [
];
const GROUPS_PER_TYPE = {
None: [ 'base', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
Shape: [ 'base', 'shape', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
Text: [ 'base', 'text', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
None: [ 'base', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Shape: [ 'base', 'shape', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Text: [ 'base', 'text', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Zone: [ 'base', 'zone', 'zone_key_light', 'zone_skybox', 'zone_ambient_light', 'zone_haze',
'zone_bloom', 'zone_avatar_priority', 'spatial', 'behavior', 'scripts', 'physics' ],
Model: [ 'base', 'model', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
Image: [ 'base', 'image', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
Web: [ 'base', 'web', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
Light: [ 'base', 'light', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
Material: [ 'base', 'material', 'spatial', 'behavior', 'scripts', 'physics' ],
'zone_bloom', 'zone_avatar_priority', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
Model: [ 'base', 'model', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Image: [ 'base', 'image', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Web: [ 'base', 'web', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Light: [ 'base', 'light', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Material: [ 'base', 'material', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
ParticleEffect: [ 'base', 'particles', 'particles_emit', 'particles_size', 'particles_color',
'particles_behavior', 'particles_constraints', 'spatial', 'behavior', 'scripts', 'physics' ],
PolyLine: [ 'base', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
PolyVox: [ 'base', 'polyvox', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
Grid: [ 'base', 'grid', 'spatial', 'behavior', 'scripts', 'physics' ],
Multiple: [ 'base', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
'particles_behavior', 'particles_constraints', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
PolyLine: [ 'base', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
PolyVox: [ 'base', 'polyvox', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Grid: [ 'base', 'grid', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
Multiple: [ 'base', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
};
const EDITOR_TIMEOUT_DURATION = 1500;