rbx_dom_lua rojo-rbx/rbx-dom@6ccd30f (custom pivot get/set) (#868)

This commit is contained in:
Kenneth Loeffler
2024-02-20 12:08:55 -08:00
committed by GitHub
parent 8ff064fe28
commit ddb26c73bd
5 changed files with 518 additions and 97 deletions

View File

@@ -493,9 +493,32 @@ types = {
},
}
types.OptionalCFrame = {
fromPod = function(pod)
if pod == nil then
return nil
else
return types.CFrame.fromPod(pod)
end
end,
toPod = function(roblox)
if roblox == nil then
return nil
else
return types.CFrame.toPod(roblox)
end
end,
}
function EncodedValue.decode(encodedValue)
local ty, value = next(encodedValue)
if ty == nil then
-- If the encoded pair is empty, assume it is an unoccupied optional value
return true, nil
end
local typeImpl = types[ty]
if typeImpl == nil then
return false, "Couldn't decode value " .. tostring(ty)

View File

@@ -370,6 +370,41 @@
},
"ty": "NumberSequence"
},
"OptionalCFrame-None": {
"value": {
"OptionalCFrame": null
},
"ty": "OptionalCFrame"
},
"OptionalCFrame-Some": {
"value": {
"OptionalCFrame": {
"position": [
0.0,
0.0,
0.0
],
"orientation": [
[
1.0,
0.0,
0.0
],
[
0.0,
1.0,
0.0
],
[
0.0,
0.0,
1.0
]
]
}
},
"ty": "OptionalCFrame"
},
"PhysicalProperties-Custom": {
"value": {
"PhysicalProperties": {

View File

@@ -111,6 +111,18 @@ return {
return true, instance:ScaleTo(value)
end,
},
WorldPivotData = {
read = function(instance)
return true, instance:GetPivot()
end,
write = function(instance, _, value)
if value == nil then
return true, nil
else
return true, instance:PivotTo(value)
end
end,
},
},
Terrain = {
MaterialColors = {

View File

@@ -1,9 +1,9 @@
{
"Version": [
0,
607,
612,
0,
6070550
6120532
],
"Classes": {
"Accessory": {
@@ -345,6 +345,17 @@
}
}
},
"ActivityHistoryService": {
"Name": "ActivityHistoryService",
"Tags": [
"NotCreatable",
"NotReplicated",
"Service"
],
"Superclass": "Instance",
"Properties": {},
"DefaultProperties": {}
},
"Actor": {
"Name": "Actor",
"Tags": [],
@@ -11172,10 +11183,12 @@
"DataType": {
"Value": "CFrame"
},
"Tags": [],
"Tags": [
"Hidden"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
"Serialization": "DoesNotSerialize"
}
}
},
@@ -11185,10 +11198,12 @@
"DataType": {
"Value": "Int32"
},
"Tags": [],
"Tags": [
"Hidden"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
"Serialization": "DoesNotSerialize"
}
}
},
@@ -11198,10 +11213,12 @@
"DataType": {
"Value": "String"
},
"Tags": [],
"Tags": [
"Hidden"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
"Serialization": "DoesNotSerialize"
}
}
},
@@ -11211,22 +11228,38 @@
"DataType": {
"Value": "Int32"
},
"Tags": [],
"Tags": [
"Hidden"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
"Serialization": "DoesNotSerialize"
}
}
},
"IsIdle": {
"Name": "IsIdle",
"Scriptability": "ReadWrite",
"DataType": {
"Value": "Bool"
},
"Tags": [
"Hidden"
],
"Kind": {
"Canonical": {
"Serialization": "DoesNotSerialize"
}
}
},
"Status": {
"Name": "Status",
"Scriptability": "None",
"Scriptability": "ReadWrite",
"DataType": {
"Enum": "CollaboratorStatus"
},
"Tags": [
"Hidden",
"NotScriptable"
"Hidden"
],
"Kind": {
"Canonical": {
@@ -11240,10 +11273,12 @@
"DataType": {
"Value": "Int64"
},
"Tags": [],
"Tags": [
"Hidden"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
"Serialization": "DoesNotSerialize"
}
}
},
@@ -11253,10 +11288,12 @@
"DataType": {
"Value": "String"
},
"Tags": [],
"Tags": [
"Hidden"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
"Serialization": "DoesNotSerialize"
}
}
}
@@ -12224,6 +12261,19 @@
"Serialization": "Serializes"
}
}
},
"UpDirection": {
"Name": "UpDirection",
"Scriptability": "ReadWrite",
"DataType": {
"Value": "Vector3"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
}
},
"DefaultProperties": {
@@ -12261,6 +12311,13 @@
},
"Tags": {
"Tags": []
},
"UpDirection": {
"Vector3": [
0.0,
1.0,
0.0
]
}
}
},
@@ -13286,7 +13343,9 @@
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Tags": [
"Deprecated"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
@@ -15878,6 +15937,19 @@
}
}
},
"PermissionPolicy": {
"Name": "PermissionPolicy",
"Scriptability": "ReadWrite",
"DataType": {
"Enum": "DragDetectorPermissionPolicy"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"PhysicalDragClickedPart": {
"Name": "PhysicalDragClickedPart",
"Scriptability": "None",
@@ -16168,10 +16240,13 @@
"Orientation": {
"Vector3": [
-0.0,
180.0,
179.99998,
90.0
]
},
"PermissionPolicy": {
"Enum": 1
},
"ResponseStyle": {
"Enum": 1
},
@@ -22285,7 +22360,9 @@
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Tags": [
"Deprecated"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
@@ -31232,7 +31309,7 @@
},
"WorldPivotData": {
"Name": "WorldPivotData",
"Scriptability": "None",
"Scriptability": "Custom",
"DataType": {
"Value": "OptionalCFrame"
},
@@ -33071,7 +33148,7 @@
},
"SerializedDefaultAttributes": {
"Name": "SerializedDefaultAttributes",
"Scriptability": "Read",
"Scriptability": "None",
"DataType": {
"Value": "BinaryString"
},
@@ -35022,6 +35099,19 @@
"Serialization": "Serializes"
}
}
},
"ZIndex": {
"Name": "ZIndex",
"Scriptability": "None",
"DataType": {
"Value": "Int32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
}
},
"DefaultProperties": {}
@@ -35734,6 +35824,58 @@
}
}
},
"DrawConstraintsNetForce": {
"Name": "DrawConstraintsNetForce",
"Scriptability": "None",
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DrawContactsNetForce": {
"Name": "DrawContactsNetForce",
"Scriptability": "None",
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DrawTotalNetForce": {
"Name": "DrawTotalNetForce",
"Scriptability": "None",
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"EnableForceVisualizationSmoothing": {
"Name": "EnableForceVisualizationSmoothing",
"Scriptability": "None",
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"FluidForceDrawScale": {
"Name": "FluidForceDrawScale",
"Scriptability": "None",
@@ -35776,6 +35918,19 @@
}
}
},
"ForceVisualizationSmoothingSteps": {
"Name": "ForceVisualizationSmoothingSteps",
"Scriptability": "None",
"DataType": {
"Value": "Int32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"IsInterpolationThrottleShown": {
"Name": "IsInterpolationThrottleShown",
"Scriptability": "ReadWrite",
@@ -35893,6 +36048,19 @@
}
}
},
"TorqueDrawScale": {
"Name": "TorqueDrawScale",
"Scriptability": "None",
"DataType": {
"Value": "Float32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"UseCSGv2": {
"Name": "UseCSGv2",
"Scriptability": "ReadWrite",
@@ -38337,6 +38505,17 @@
}
}
},
"ProjectFolderService": {
"Name": "ProjectFolderService",
"Tags": [
"NotCreatable",
"NotReplicated",
"Service"
],
"Superclass": "Instance",
"Properties": {},
"DefaultProperties": {}
},
"ProximityPrompt": {
"Name": "ProximityPrompt",
"Tags": [],
@@ -40859,6 +41038,19 @@
}
}
},
"PreferredUploadId": {
"Name": "PreferredUploadId",
"Scriptability": "ReadWrite",
"DataType": {
"Value": "Int64"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"RestPose": {
"Name": "RestPose",
"Scriptability": "ReadWrite",
@@ -44505,7 +44697,9 @@
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Tags": [
"Deprecated"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
@@ -46931,21 +47125,6 @@
}
}
},
"AnimationCompositorMode": {
"Name": "AnimationCompositorMode",
"Scriptability": "ReadWrite",
"DataType": {
"Enum": "AnimationCompositorMode"
},
"Tags": [
"NotBrowsable"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"AutoJumpEnabled": {
"Name": "AutoJumpEnabled",
"Scriptability": "ReadWrite",
@@ -47488,21 +47667,6 @@
}
}
},
"HumanoidStateMachineMode": {
"Name": "HumanoidStateMachineMode",
"Scriptability": "ReadWrite",
"DataType": {
"Enum": "HumanoidStateMachineMode"
},
"Tags": [
"NotBrowsable"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"LoadCharacterAppearance": {
"Name": "LoadCharacterAppearance",
"Scriptability": "ReadWrite",
@@ -47594,9 +47758,6 @@
"AllowCustomAnimations": {
"Bool": true
},
"AnimationCompositorMode": {
"Enum": 0
},
"Attributes": {
"Attributes": {}
},
@@ -47729,9 +47890,6 @@
"HealthDisplayDistance": {
"Float32": 100.0
},
"HumanoidStateMachineMode": {
"Enum": 0
},
"LoadCharacterAppearance": {
"Bool": true
},
@@ -48619,6 +48777,136 @@
}
}
},
"DraggerActiveColor": {
"Name": "DraggerActiveColor",
"Scriptability": "None",
"DataType": {
"Value": "Color3"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerMajorGridIncrement": {
"Name": "DraggerMajorGridIncrement",
"Scriptability": "None",
"DataType": {
"Value": "Int32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerMaxSoftSnaps": {
"Name": "DraggerMaxSoftSnaps",
"Scriptability": "None",
"DataType": {
"Value": "Int32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerPassiveColor": {
"Name": "DraggerPassiveColor",
"Scriptability": "None",
"DataType": {
"Value": "Color3"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerShowHoverRuler": {
"Name": "DraggerShowHoverRuler",
"Scriptability": "None",
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerShowMeasurement": {
"Name": "DraggerShowMeasurement",
"Scriptability": "None",
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerShowTargetSnap": {
"Name": "DraggerShowTargetSnap",
"Scriptability": "None",
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerSoftSnapMarginFactor": {
"Name": "DraggerSoftSnapMarginFactor",
"Scriptability": "None",
"DataType": {
"Value": "Float32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerSummonMarginFactor": {
"Name": "DraggerSummonMarginFactor",
"Scriptability": "None",
"DataType": {
"Value": "Float32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"DraggerTiltRotateDuration": {
"Name": "DraggerTiltRotateDuration",
"Scriptability": "None",
"DataType": {
"Value": "Float32"
},
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"Enable Autocomplete": {
"Name": "Enable Autocomplete",
"Scriptability": "ReadWrite",
@@ -55907,6 +56195,17 @@
"Properties": {},
"DefaultProperties": {}
},
"TextureGenerationService": {
"Name": "TextureGenerationService",
"Tags": [
"NotCreatable",
"NotReplicated",
"Service"
],
"Superclass": "Instance",
"Properties": {},
"DefaultProperties": {}
},
"ThirdPartyUserService": {
"Name": "ThirdPartyUserService",
"Tags": [
@@ -59590,6 +59889,22 @@
}
}
},
"ChatTranslationLocale": {
"Name": "ChatTranslationLocale",
"Scriptability": "None",
"DataType": {
"Value": "String"
},
"Tags": [
"Hidden",
"NotReplicated"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"ChatTranslationToggleEnabled": {
"Name": "ChatTranslationToggleEnabled",
"Scriptability": "None",
@@ -59724,6 +60039,22 @@
}
}
},
"FramerateCap": {
"Name": "FramerateCap",
"Scriptability": "None",
"DataType": {
"Value": "Int32"
},
"Tags": [
"Hidden",
"NotReplicated"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
"Fullscreen": {
"Name": "Fullscreen",
"Scriptability": "None",
@@ -61068,6 +61399,7 @@
"VRService": {
"Name": "VRService",
"Tags": [
"NotBrowsable",
"NotCreatable",
"Service"
],
@@ -61084,7 +61416,22 @@
],
"Kind": {
"Canonical": {
"Serialization": "DoesNotSerialize"
"Serialization": "Serializes"
}
}
},
"AvatarGestures": {
"Name": "AvatarGestures",
"Scriptability": "ReadWrite",
"DataType": {
"Value": "Bool"
},
"Tags": [
"NotBrowsable"
],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
}
}
},
@@ -61111,10 +61458,12 @@
"DataType": {
"Value": "Bool"
},
"Tags": [],
"Tags": [
"NotReplicated"
],
"Kind": {
"Canonical": {
"Serialization": "DoesNotSerialize"
"Serialization": "Serializes"
}
}
},
@@ -61124,7 +61473,9 @@
"DataType": {
"Enum": "UserCFrame"
},
"Tags": [],
"Tags": [
"NotReplicated"
],
"Kind": {
"Canonical": {
"Serialization": "DoesNotSerialize"
@@ -61283,12 +61634,21 @@
"Attributes": {
"Attributes": {}
},
"AutomaticScaling": {
"Enum": 0
},
"AvatarGestures": {
"Bool": false
},
"Capabilities": {
"SecurityCapabilities": 0
},
"DefinesCapabilities": {
"Bool": false
},
"FadeOutViewOnCollision": {
"Bool": true
},
"SourceAssetId": {
"Int64": -1
},
@@ -62839,16 +63199,6 @@
"Properties": {},
"DefaultProperties": {}
},
"VisibilityService": {
"Name": "VisibilityService",
"Tags": [
"NotCreatable",
"Service"
],
"Superclass": "Instance",
"Properties": {},
"DefaultProperties": {}
},
"Visit": {
"Name": "Visit",
"Tags": [
@@ -62933,9 +63283,7 @@
"DataType": {
"Enum": "AudioApiRollout"
},
"Tags": [
"NotBrowsable"
],
"Tags": [],
"Kind": {
"Canonical": {
"Serialization": "Serializes"
@@ -65214,14 +65562,6 @@
"Timeout": 10
}
},
"AnimationCompositorMode": {
"name": "AnimationCompositorMode",
"items": {
"Default": 0,
"Disabled": 2,
"Enabled": 1
}
},
"AnimationPriority": {
"name": "AnimationPriority",
"items": {
@@ -65835,10 +66175,10 @@
"CollaboratorStatus": {
"name": "CollaboratorStatus",
"items": {
"Editing3D": 0,
"None": 3,
"PrivateScripting": 2,
"Scripting": 1
"Editing3D": 1,
"None": 0,
"PrivateScripting": 3,
"Scripting": 2
}
},
"CollisionFidelity": {
@@ -66307,6 +66647,14 @@
"TranslateViewPlane": 4
}
},
"DragDetectorPermissionPolicy": {
"name": "DragDetectorPermissionPolicy",
"items": {
"Everybody": 1,
"Nobody": 0,
"Scriptable": 2
}
},
"DragDetectorResponseStyle": {
"name": "DragDetectorResponseStyle",
"items": {
@@ -66810,15 +67158,6 @@
"R6": 0
}
},
"HumanoidStateMachineMode": {
"name": "HumanoidStateMachineMode",
"items": {
"Default": 0,
"Legacy": 1,
"LuaStateMachine": 3,
"NoStateMachine": 2
}
},
"HumanoidStateType": {
"name": "HumanoidStateType",
"items": {
@@ -67469,6 +67808,16 @@
"PersistentPerPlayer": 3
}
},
"ModerationStatus": {
"name": "ModerationStatus",
"items": {
"Invalid": 5,
"NotApplicable": 4,
"NotReviewed": 3,
"ReviewedApproved": 1,
"ReviewedRejected": 2
}
},
"ModifierKey": {
"name": "ModifierKey",
"items": {