Skip to content

Commit 74f5ffe

Browse files
committed
Add Performance Center UI demo example
Features: - Demonstrates PerformanceCenterScriptedUI configuration across multiple step types - Shows both approach shots (PerformanceCenterApproachScriptedSetup) and tee shots (PerformanceCenterTeeShotsScriptedSetup) - Comprehensive UI customization examples with different parameter combinations - Frame management for different shot phases specific to Performance Center workflow - Validates successfully with schema Technical: - 3 Performance Center steps with progressive UI complexity - Approach shots with precision-focused UI (FromPin, StrokesGained) - Tee shots with power-focused UI (Total, Carry, Curve, BallSpeed) - Demonstrates StrokesGained integration specific to Performance Center - Shows proper handicap vs PGA player category usage
1 parent 1d3c24b commit 74f5ffe

File tree

1 file changed

+193
-0
lines changed

1 file changed

+193
-0
lines changed

examples/pc-ui-demo.json

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
{
2+
"$schema": "../schema/1.0.0/app-scripting.schema.json",
3+
"version": "1.0.0",
4+
"id": "pc-ui-demo-script",
5+
"startMode": "Overwrite",
6+
"endMode": "Exit",
7+
"activities": [
8+
{
9+
"nodeType": "PerformanceCenterScriptedActivity",
10+
"id": "pc-demo",
11+
"introMessage": {
12+
"header": "Performance Center UI Demo",
13+
"description": "Demonstrating UI configuration for Performance Center",
14+
"seconds": 3
15+
},
16+
"endMessage": {
17+
"header": "Demo Complete",
18+
"description": "You have completed the Performance Center UI demo",
19+
"seconds": 3
20+
},
21+
"steps": [
22+
{
23+
"nodeType": "PerformanceCenterScriptedStep",
24+
"id": "approach-step-1",
25+
"introMessage": {
26+
"header": "Approach Shot Practice",
27+
"description": "Hit 3 approach shots with default UI",
28+
"seconds": 5
29+
},
30+
"successMessage": {
31+
"header": "Excellent approach shots!",
32+
"description": "Great accuracy and distance control",
33+
"seconds": 3
34+
},
35+
"failMessage": {
36+
"header": "Keep practicing",
37+
"description": "Focus on your approach technique",
38+
"seconds": 3
39+
},
40+
"logic": {
41+
"nodeType": "PerformanceCenterScriptedLogic",
42+
"setup": {
43+
"nodeType": "PerformanceCenterApproachScriptedSetup",
44+
"hole": 1,
45+
"pin": 1,
46+
"playerCategory": "Handicap",
47+
"hcp": 10,
48+
"gender": "Male",
49+
"minDistance": 100,
50+
"maxDistance": 150
51+
},
52+
"successCondition": {
53+
"nodeType": "PerformanceCenterScriptedConditions",
54+
"shots": 3
55+
}
56+
},
57+
"ui": {
58+
"nodeType": "PerformanceCenterScriptedUI"
59+
}
60+
},
61+
{
62+
"nodeType": "PerformanceCenterScriptedStep",
63+
"id": "approach-step-2",
64+
"introMessage": {
65+
"header": "Precision Approach",
66+
"description": "Hit 2 precise approach shots with custom UI",
67+
"seconds": 5
68+
},
69+
"successMessage": {
70+
"header": "Perfect precision!",
71+
"description": "Outstanding accuracy and strokes gained",
72+
"seconds": 3
73+
},
74+
"failMessage": {
75+
"header": "Try again",
76+
"description": "Focus on precision and distance control",
77+
"seconds": 3
78+
},
79+
"logic": {
80+
"nodeType": "PerformanceCenterScriptedLogic",
81+
"setup": {
82+
"nodeType": "PerformanceCenterApproachScriptedSetup",
83+
"hole": 2,
84+
"pin": 2,
85+
"playerCategory": "Handicap",
86+
"hcp": 8,
87+
"gender": "Female",
88+
"minDistance": 80,
89+
"maxDistance": 120
90+
},
91+
"successCondition": {
92+
"nodeType": "PerformanceCenterScriptedConditions",
93+
"shots": 2,
94+
"conditionType": "And",
95+
"conditions": [
96+
{
97+
"parameter": "FromPin",
98+
"max": 10
99+
},
100+
{
101+
"parameter": "StrokesGained",
102+
"min": 0.1
103+
}
104+
]
105+
}
106+
},
107+
"ui": {
108+
"nodeType": "PerformanceCenterScriptedUI",
109+
"targetAvailable": true,
110+
"activeDataTiles": ["FromPin", "StrokesGained", "Carry", "Total", "LaunchAngle"],
111+
"shotListParameters": ["FromPin", "StrokesGained", "Carry", "Total", "LaunchAngle", "BallSpeed"],
112+
"defaultShotListParameter": "FromPin",
113+
"beforeShot": {
114+
"addFrames": ["StrokesGainedSummaryTile", "TargetCarry"],
115+
"removeFrames": ["BroadcastTiles"]
116+
},
117+
"duringShot": {
118+
"disableFrames": ["GoToSetup", "ShotList"]
119+
},
120+
"afterShot": {
121+
"addFrames": ["StrokesGainedShotResult", "AllTiles"],
122+
"removeFrames": ["LandingCamera"]
123+
}
124+
}
125+
},
126+
{
127+
"nodeType": "PerformanceCenterScriptedStep",
128+
"id": "tee-shot-step",
129+
"introMessage": {
130+
"header": "Tee Shot Challenge",
131+
"description": "Hit 3 long tee shots with optimized UI",
132+
"seconds": 5
133+
},
134+
"successMessage": {
135+
"header": "Powerful drives!",
136+
"description": "Excellent distance and accuracy off the tee",
137+
"seconds": 3
138+
},
139+
"failMessage": {
140+
"header": "Keep swinging",
141+
"description": "Focus on your tee shot technique",
142+
"seconds": 3
143+
},
144+
"logic": {
145+
"nodeType": "PerformanceCenterScriptedLogic",
146+
"setup": {
147+
"nodeType": "PerformanceCenterTeeShotsScriptedSetup",
148+
"hole": 3,
149+
"playerCategory": "PGA",
150+
"gender": "Male",
151+
"courseDistance": 7200
152+
},
153+
"successCondition": {
154+
"nodeType": "PerformanceCenterScriptedConditions",
155+
"shots": 3,
156+
"conditionType": "And",
157+
"conditions": [
158+
{
159+
"parameter": "Total",
160+
"min": 250
161+
},
162+
{
163+
"parameter": "Curve",
164+
"min": -10,
165+
"max": 10
166+
}
167+
]
168+
}
169+
},
170+
"ui": {
171+
"nodeType": "PerformanceCenterScriptedUI",
172+
"targetAvailable": true,
173+
"activeDataTiles": ["Total", "Carry", "Curve", "BallSpeed", "ClubSpeed", "LaunchAngle"],
174+
"shotListParameters": ["Total", "Carry", "Curve", "BallSpeed", "ClubSpeed", "LaunchAngle", "SmashFactor"],
175+
"defaultShotListParameter": "Total",
176+
"beforeShot": {
177+
"addFrames": ["Player", "ClubDelivery"],
178+
"removeFrames": ["Minimap", "StrokesGainedSummaryTile"]
179+
},
180+
"duringShot": {
181+
"addFrames": ["LandingCamera"],
182+
"removeFrames": ["Tiles"]
183+
},
184+
"afterShot": {
185+
"addFrames": ["AllTiles", "ShotList"],
186+
"disableFrames": []
187+
}
188+
}
189+
}
190+
]
191+
}
192+
]
193+
}

0 commit comments

Comments
 (0)