Skip to content

Commit

Permalink
Merge pull request #144 from decentraland/better-basic-views
Browse files Browse the repository at this point in the history
Retouches to smart items
  • Loading branch information
nearnshaw authored Mar 3, 2025
2 parents 506c1e3 + 465b6a5 commit 93d9b72
Show file tree
Hide file tree
Showing 32 changed files with 559 additions and 273 deletions.
29 changes: 26 additions & 3 deletions packs/smart_items/assets/ambient_sound_birds/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,21 @@
{
"name": "Play once",
"type": "play_sound",
"jsonPayload": "{\"src\":\"{assetPath}/birds_(1).mp3\"}"
"jsonPayload": "{\"src\":\"{assetPath}/birds_(1).mp3\"}",
"allowedInBasicView": true
},
{
"name": "Loop",
"type": "play_sound",
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/birds_(1).mp3\"}"
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/birds_(1).mp3\"}",
"allowedInBasicView": true,
"basicViewId": "loop-sound"
},
{
"name": "Stop",
"type": "stop_sound",
"jsonPayload": "{}"
"jsonPayload": "{}",
"allowedInBasicView": true
}
]
}
Expand Down Expand Up @@ -81,6 +85,25 @@
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Ambient Sound",
"fields": [
{
"name": "Sound",
"type": "asset-packs::Actions",
"basicViewId": "loop-sound",
"layout": "{\"src\": { \"field\": \"TextField\", \"type\": \"text\", \"label\": \"Sound Path\" } , \"volume\": { \"field\": \"RangeField\", \"label\": \"Volume\", \"step\": \"0.01\", \"min\": \"0\", \"max\": \"1\", \"default\": \"1\" } }"
}
]
}
}
}
}
]
}
29 changes: 26 additions & 3 deletions packs/smart_items/assets/ambient_sound_birds_alt/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,21 @@
{
"name": "Play once",
"type": "play_sound",
"jsonPayload": "{\"src\":\"{assetPath}/Field.mp3\"}"
"jsonPayload": "{\"src\":\"{assetPath}/Field.mp3\"}",
"allowedInBasicView": true
},
{
"name": "Loop",
"type": "play_sound",
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Field.mp3\"}"
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Field.mp3\"}",
"allowedInBasicView": true,
"basicViewId": "loop-sound"
},
{
"name": "Stop",
"type": "stop_sound",
"jsonPayload": "{}"
"jsonPayload": "{}",
"allowedInBasicView": true
}
]
}
Expand Down Expand Up @@ -81,6 +85,25 @@
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Ambient Sound",
"fields": [
{
"name": "Sound",
"type": "asset-packs::Actions",
"basicViewId": "loop-sound",
"layout": "{\"src\": { \"field\": \"TextField\", \"type\": \"text\", \"label\": \"Sound Path\" } , \"volume\": { \"field\": \"RangeField\", \"label\": \"Volume\", \"step\": \"0.01\", \"min\": \"0\", \"max\": \"1\", \"default\": \"1\" } }"
}
]
}
}
}
}
]
}
29 changes: 26 additions & 3 deletions packs/smart_items/assets/ambient_sound_city/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,21 @@
{
"name": "Play once",
"type": "play_sound",
"jsonPayload": "{\"src\":\"{assetPath}/City.mp3\"}"
"jsonPayload": "{\"src\":\"{assetPath}/City.mp3\"}",
"allowedInBasicView": true
},
{
"name": "Loop",
"type": "play_sound",
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/City.mp3\"}"
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/City.mp3\"}",
"allowedInBasicView": true,
"basicViewId": "loop-sound"
},
{
"name": "Stop",
"type": "stop_sound",
"jsonPayload": "{}"
"jsonPayload": "{}",
"allowedInBasicView": true
}
]
}
Expand Down Expand Up @@ -81,6 +85,25 @@
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Ambient Sound",
"fields": [
{
"name": "Sound",
"type": "asset-packs::Actions",
"basicViewId": "loop-sound",
"layout": "{\"src\": { \"field\": \"TextField\", \"type\": \"text\", \"label\": \"Sound Path\" } , \"volume\": { \"field\": \"RangeField\", \"label\": \"Volume\", \"step\": \"0.01\", \"min\": \"0\", \"max\": \"1\", \"default\": \"1\" } }"
}
]
}
}
}
}
]
}
29 changes: 26 additions & 3 deletions packs/smart_items/assets/ambient_sound_crickets/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,21 @@
{
"name": "Play once",
"type": "play_sound",
"jsonPayload": "{\"src\":\"{assetPath}/Swamp.mp3\"}"
"jsonPayload": "{\"src\":\"{assetPath}/Swamp.mp3\"}",
"allowedInBasicView": true
},
{
"name": "Loop",
"type": "play_sound",
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Swamp.mp3\"}"
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Swamp.mp3\"}",
"allowedInBasicView": true,
"basicViewId": "loop-sound"
},
{
"name": "Stop",
"type": "stop_sound",
"jsonPayload": "{}"
"jsonPayload": "{}",
"allowedInBasicView": true
}
]
}
Expand Down Expand Up @@ -81,6 +85,25 @@
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Ambient Sound",
"fields": [
{
"name": "Sound",
"type": "asset-packs::Actions",
"basicViewId": "loop-sound",
"layout": "{\"src\": { \"field\": \"TextField\", \"type\": \"text\", \"label\": \"Sound Path\" } , \"volume\": { \"field\": \"RangeField\", \"label\": \"Volume\", \"step\": \"0.01\", \"min\": \"0\", \"max\": \"1\", \"default\": \"1\" } }"
}
]
}
}
}
}
]
}
29 changes: 26 additions & 3 deletions packs/smart_items/assets/ambient_sound_factory/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,21 @@
{
"name": "Play once",
"type": "play_sound",
"jsonPayload": "{\"src\":\"{assetPath}/Factory.mp3\"}"
"jsonPayload": "{\"src\":\"{assetPath}/Factory.mp3\"}",
"allowedInBasicView": true
},
{
"name": "Loop",
"type": "play_sound",
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Factory.mp3\"}"
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Factory.mp3\"}",
"allowedInBasicView": true,
"basicViewId": "loop-sound"
},
{
"name": "Stop",
"type": "stop_sound",
"jsonPayload": "{}"
"jsonPayload": "{}",
"allowedInBasicView": true
}
]
}
Expand Down Expand Up @@ -81,6 +85,25 @@
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Ambient Sound",
"fields": [
{
"name": "Sound",
"type": "asset-packs::Actions",
"basicViewId": "loop-sound",
"layout": "{\"src\": { \"field\": \"TextField\", \"type\": \"text\", \"label\": \"Sound Path\" } , \"volume\": { \"field\": \"RangeField\", \"label\": \"Volume\", \"step\": \"0.01\", \"min\": \"0\", \"max\": \"1\", \"default\": \"1\" } }"
}
]
}
}
}
}
]
}
29 changes: 26 additions & 3 deletions packs/smart_items/assets/ambient_sound_town/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,21 @@
{
"name": "Play once",
"type": "play_sound",
"jsonPayload": "{\"src\":\"{assetPath}/Town.mp3\"}"
"jsonPayload": "{\"src\":\"{assetPath}/Town.mp3\"}",
"allowedInBasicView": true
},
{
"name": "Loop",
"type": "play_sound",
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Town.mp3\"}"
"jsonPayload": "{\"loop\":true,\"src\":\"{assetPath}/Town.mp3\"}",
"allowedInBasicView": true,
"basicViewId": "loop-sound"
},
{
"name": "Stop",
"type": "stop_sound",
"jsonPayload": "{}"
"jsonPayload": "{}",
"allowedInBasicView": true
}
]
}
Expand Down Expand Up @@ -81,6 +85,25 @@
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Ambient Sound",
"fields": [
{
"name": "Sound",
"type": "asset-packs::Actions",
"basicViewId": "loop-sound",
"layout": "{\"src\": { \"field\": \"TextField\", \"type\": \"text\", \"label\": \"Sound Path\" } , \"volume\": { \"field\": \"RangeField\", \"label\": \"Volume\", \"step\": \"0.01\", \"min\": \"0\", \"max\": \"1\", \"default\": \"1\" } }"
}
]
}
}
}
}
]
}
19 changes: 17 additions & 2 deletions packs/smart_items/assets/arrow/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,32 @@
{
"name": "Hide",
"type": "set_visibility",
"jsonPayload": "{\"visible\":false,\"collider\":0}"
"jsonPayload": "{\"visible\":false,\"collider\":0}",
"allowedInBasicView": true
},
{
"name": "Show",
"type": "set_visibility",
"jsonPayload": "{\"visible\":true,\"collider\":0}"
"jsonPayload": "{\"visible\":true,\"collider\":0}",
"allowedInBasicView": true
}
]
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Arrow",
"fields": [
]
}
}
}
}
]
}
19 changes: 17 additions & 2 deletions packs/smart_items/assets/arrow_blue/composite.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,32 @@
{
"name": "Hide",
"type": "set_visibility",
"jsonPayload": "{\"visible\":false,\"collider\":0}"
"jsonPayload": "{\"visible\":false,\"collider\":0}",
"allowedInBasicView": true
},
{
"name": "Show",
"type": "set_visibility",
"jsonPayload": "{\"visible\":true,\"collider\":0}"
"jsonPayload": "{\"visible\":true,\"collider\":0}",
"allowedInBasicView": true
}
]
}
}
}
},
{
"name": "inspector::Config",
"data": {
"0": {
"json": {
"isBasicViewEnabled": true,
"componentName": "Arrow",
"fields": [
]
}
}
}
}
]
}
Loading

0 comments on commit 93d9b72

Please sign in to comment.