Compare commits
2 Commits
colonelpan
...
19bdf69830
| Author | SHA1 | Date | |
|---|---|---|---|
| 19bdf69830 | |||
| 303261f2d7 |
20141
src/index.tsx
20141
src/index.tsx
File diff suppressed because it is too large
Load Diff
38
src/operations/recorded_shots.gql
Normal file
38
src/operations/recorded_shots.gql
Normal file
@@ -0,0 +1,38 @@
|
||||
# Lightweight two-step picker data for loading a recorded shot into Shot Lab.
|
||||
query GetRecordedStreams($limit: Int! = 25) {
|
||||
getFeedVideos(
|
||||
limit: $limit
|
||||
filters: { isStreamCompleted: true, excludeVideosWithNoShots: true }
|
||||
includePrivate: MINE
|
||||
feedInput: { allUsers: true }
|
||||
) {
|
||||
videos {
|
||||
id
|
||||
name
|
||||
createdAt
|
||||
screenshotUri
|
||||
framesPerSecond
|
||||
totalShots
|
||||
owner {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetRecordedStreamShots($videoId: Int!, $limit: Int! = 200) {
|
||||
getOrderedShots(
|
||||
filterInput: { videoId: [$videoId] }
|
||||
shotsOrdering: { orderings: [{ startFrame: { descending: false } }] }
|
||||
limit: $limit
|
||||
) {
|
||||
shots {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,19 @@ query GetLiveTableState($videoId: Int!) {
|
||||
identifierToColor {
|
||||
hex
|
||||
}
|
||||
homography {
|
||||
...HomographyInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetShotTableState($shotId: Int!) {
|
||||
getShotTableState(shotId: $shotId) {
|
||||
shotId
|
||||
videoId
|
||||
frameIndex
|
||||
tableState {
|
||||
identifierToPosition
|
||||
identifierToColor {
|
||||
hex
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,3 +85,53 @@ query ComputePotAim(
|
||||
occludingBallIds
|
||||
}
|
||||
}
|
||||
|
||||
fragment PositionShotCandidate on PositionShotCandidateGQL {
|
||||
strike {
|
||||
v0
|
||||
phi
|
||||
theta
|
||||
a
|
||||
b
|
||||
}
|
||||
cueFinalPosition
|
||||
inTargetArea
|
||||
distanceToTargetArea
|
||||
robustness
|
||||
potted
|
||||
scratched
|
||||
projection {
|
||||
trajectories {
|
||||
ballId
|
||||
points {
|
||||
time
|
||||
position
|
||||
}
|
||||
}
|
||||
events {
|
||||
eventType
|
||||
time
|
||||
ballIds
|
||||
position
|
||||
}
|
||||
finalState {
|
||||
ballId
|
||||
position
|
||||
}
|
||||
pottedBallIds
|
||||
}
|
||||
}
|
||||
|
||||
query SuggestPositionShot($suggestionInput: SuggestPositionShotInputGQL!) {
|
||||
suggestPositionShot(suggestionInput: $suggestionInput) {
|
||||
achievable
|
||||
evaluatedCount
|
||||
successfulCount
|
||||
best {
|
||||
...PositionShotCandidate
|
||||
}
|
||||
alternates {
|
||||
...PositionShotCandidate
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,13 +12,6 @@ query getUsageStats($days: Int! = 30) {
|
||||
retentionPrevActive
|
||||
retentionReturned
|
||||
}
|
||||
cohorts {
|
||||
weekStart
|
||||
signups
|
||||
activated7d
|
||||
paid7d
|
||||
activatedNotPaid7d
|
||||
}
|
||||
totalUsers
|
||||
totalVideos
|
||||
totalShots
|
||||
|
||||
@@ -80,6 +80,9 @@ type Query {
|
||||
targetBallId: Int!
|
||||
pocket: PocketIdentifier!
|
||||
): PotAimGQL!
|
||||
suggestPositionShot(
|
||||
suggestionInput: SuggestPositionShotInputGQL!
|
||||
): PositionSuggestionGQL!
|
||||
getOrderedShots(
|
||||
filterInput: FilterInput!
|
||||
ids: [Int!] = null
|
||||
@@ -1143,6 +1146,44 @@ type PotAimGQL {
|
||||
occludingBallIds: [Int!]!
|
||||
}
|
||||
|
||||
type PositionSuggestionGQL {
|
||||
achievable: Boolean!
|
||||
best: PositionShotCandidateGQL
|
||||
alternates: [PositionShotCandidateGQL!]!
|
||||
evaluatedCount: Int!
|
||||
successfulCount: Int!
|
||||
}
|
||||
|
||||
type PositionShotCandidateGQL {
|
||||
strike: CueStrikeGQL!
|
||||
cueFinalPosition: [Float!]!
|
||||
inTargetArea: Boolean!
|
||||
distanceToTargetArea: Float!
|
||||
robustness: Int!
|
||||
potted: Boolean!
|
||||
scratched: Boolean!
|
||||
projection: ShotProjectionGQL
|
||||
}
|
||||
|
||||
type CueStrikeGQL {
|
||||
v0: Float!
|
||||
phi: Float!
|
||||
theta: Float!
|
||||
a: Float!
|
||||
b: Float!
|
||||
}
|
||||
|
||||
input SuggestPositionShotInputGQL {
|
||||
cueBallId: Int!
|
||||
targetBallId: Int!
|
||||
pocket: PocketIdentifier!
|
||||
targetArea: [[Float!]!]!
|
||||
balls: [SimulationBallStateInputGQL!] = null
|
||||
b64Image: String = null
|
||||
useHomography: HomographyInputGQL = null
|
||||
tableSize: Float = null
|
||||
}
|
||||
|
||||
type GetShotsResult {
|
||||
shots: [ShotGQL!]!
|
||||
count: Int
|
||||
@@ -1183,7 +1224,6 @@ type UsageStatsGQL {
|
||||
totalVideos: Int!
|
||||
totalShots: Int!
|
||||
totalRuns: Int!
|
||||
cohorts: [CohortStatsGQL!]!
|
||||
windows: [UsageStatsWindowGQL!]!
|
||||
daily: [UsageStatsDailyGQL!]!
|
||||
processingLast24h: [ProcessingStatusCountGQL!]!
|
||||
@@ -1202,14 +1242,6 @@ type FunnelStatsGQL {
|
||||
retentionReturned: Int!
|
||||
}
|
||||
|
||||
type CohortStatsGQL {
|
||||
weekStart: Date!
|
||||
signups: Int!
|
||||
activated7d: Int!
|
||||
paid7d: Int!
|
||||
activatedNotPaid7d: Int!
|
||||
}
|
||||
|
||||
type UsageStatsWindowGQL {
|
||||
label: String!
|
||||
newUsers: Int!
|
||||
|
||||
Reference in New Issue
Block a user