Compare commits
1 Commits
19bdf69830
...
live-table
| Author | SHA1 | Date | |
|---|---|---|---|
| a7ac7c0f31 |
15806
src/index.tsx
15806
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
|||||||
# 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,9 +9,6 @@ query GetTableState(
|
|||||||
useHomography: $useHomography
|
useHomography: $useHomography
|
||||||
) {
|
) {
|
||||||
identifierToPosition
|
identifierToPosition
|
||||||
identifierToColor {
|
|
||||||
hex
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,22 +18,8 @@ query GetLiveTableState($videoId: Int!) {
|
|||||||
frameIndex
|
frameIndex
|
||||||
tableState {
|
tableState {
|
||||||
identifierToPosition
|
identifierToPosition
|
||||||
identifierToColor {
|
homography {
|
||||||
hex
|
...HomographyInfo
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
query GetShotTableState($shotId: Int!) {
|
|
||||||
getShotTableState(shotId: $shotId) {
|
|
||||||
shotId
|
|
||||||
videoId
|
|
||||||
frameIndex
|
|
||||||
tableState {
|
|
||||||
identifierToPosition
|
|
||||||
identifierToColor {
|
|
||||||
hex
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -85,53 +68,3 @@ query ComputePotAim(
|
|||||||
occludingBallIds
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
query getUsageStats($days: Int! = 30) {
|
|
||||||
getUsageStats(days: $days) {
|
|
||||||
funnel {
|
|
||||||
freemiumEpoch
|
|
||||||
eraSignups
|
|
||||||
eraPaying
|
|
||||||
activationCohort
|
|
||||||
activationActivated
|
|
||||||
payingUsers
|
|
||||||
newPaid7d
|
|
||||||
newPaid30d
|
|
||||||
retentionPrevActive
|
|
||||||
retentionReturned
|
|
||||||
}
|
|
||||||
totalUsers
|
|
||||||
totalVideos
|
|
||||||
totalShots
|
|
||||||
totalRuns
|
|
||||||
windows {
|
|
||||||
label
|
|
||||||
newUsers
|
|
||||||
activeUsers
|
|
||||||
sessions
|
|
||||||
shots
|
|
||||||
}
|
|
||||||
daily {
|
|
||||||
day
|
|
||||||
newUsers
|
|
||||||
activeUsers
|
|
||||||
sessions
|
|
||||||
shots
|
|
||||||
}
|
|
||||||
processingLast24h {
|
|
||||||
status
|
|
||||||
count
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
105
src/schema.gql
105
src/schema.gql
@@ -73,16 +73,12 @@ type Query {
|
|||||||
useHomography: HomographyInputGQL = null
|
useHomography: HomographyInputGQL = null
|
||||||
): TableStateGQL!
|
): TableStateGQL!
|
||||||
getLiveTableState(videoId: Int!): LiveTableStateGQL!
|
getLiveTableState(videoId: Int!): LiveTableStateGQL!
|
||||||
getShotTableState(shotId: Int!): ShotTableStateGQL!
|
|
||||||
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
|
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
|
||||||
computePotAim(
|
computePotAim(
|
||||||
simulationInput: SimulateShotInputGQL!
|
simulationInput: SimulateShotInputGQL!
|
||||||
targetBallId: Int!
|
targetBallId: Int!
|
||||||
pocket: PocketIdentifier!
|
pocket: PocketIdentifier!
|
||||||
): PotAimGQL!
|
): PotAimGQL!
|
||||||
suggestPositionShot(
|
|
||||||
suggestionInput: SuggestPositionShotInputGQL!
|
|
||||||
): PositionSuggestionGQL!
|
|
||||||
getOrderedShots(
|
getOrderedShots(
|
||||||
filterInput: FilterInput!
|
filterInput: FilterInput!
|
||||||
ids: [Int!] = null
|
ids: [Int!] = null
|
||||||
@@ -104,7 +100,6 @@ type Query {
|
|||||||
countRespectsLimit: Boolean! = false
|
countRespectsLimit: Boolean! = false
|
||||||
): [ShotGQL!]!
|
): [ShotGQL!]!
|
||||||
getShotsByIds(ids: [Int!]!): [ShotGQL!]!
|
getShotsByIds(ids: [Int!]!): [ShotGQL!]!
|
||||||
getUsageStats(days: Int! = 30): UsageStatsGQL!
|
|
||||||
getUser(userId: Int!): UserGQL
|
getUser(userId: Int!): UserGQL
|
||||||
doesUsernameExist(candidateUsername: String!): Boolean!
|
doesUsernameExist(candidateUsername: String!): Boolean!
|
||||||
getLoggedInUser: UserGQL
|
getLoggedInUser: UserGQL
|
||||||
@@ -613,7 +608,7 @@ type VideoTagClass {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type HomographyInfoGQL {
|
type HomographyInfoGQL {
|
||||||
id: Int
|
id: Int!
|
||||||
frameIndex: Int!
|
frameIndex: Int!
|
||||||
crop: BoundingBoxGQL!
|
crop: BoundingBoxGQL!
|
||||||
pockets: [BoundingBoxGQL!]!
|
pockets: [BoundingBoxGQL!]!
|
||||||
@@ -1025,14 +1020,6 @@ type PlayerClusterShotGQL {
|
|||||||
type TableStateGQL {
|
type TableStateGQL {
|
||||||
identifierToPosition: [[Float!]!]!
|
identifierToPosition: [[Float!]!]!
|
||||||
homography: HomographyInfoGQL
|
homography: HomographyInfoGQL
|
||||||
identifierToColor: [RGBColorGQL]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type RGBColorGQL {
|
|
||||||
r: Int!
|
|
||||||
g: Int!
|
|
||||||
b: Int!
|
|
||||||
hex: String!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input HomographyInputGQL {
|
input HomographyInputGQL {
|
||||||
@@ -1069,13 +1056,6 @@ type LiveTableStateGQL {
|
|||||||
tableState: TableStateGQL!
|
tableState: TableStateGQL!
|
||||||
}
|
}
|
||||||
|
|
||||||
type ShotTableStateGQL {
|
|
||||||
shotId: Int!
|
|
||||||
videoId: Int!
|
|
||||||
frameIndex: Int!
|
|
||||||
tableState: TableStateGQL!
|
|
||||||
}
|
|
||||||
|
|
||||||
type ShotProjectionGQL {
|
type ShotProjectionGQL {
|
||||||
trajectories: [BallTrajectoryGQL!]!
|
trajectories: [BallTrajectoryGQL!]!
|
||||||
events: [SimulationEventGQL!]!
|
events: [SimulationEventGQL!]!
|
||||||
@@ -1146,44 +1126,6 @@ type PotAimGQL {
|
|||||||
occludingBallIds: [Int!]!
|
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 {
|
type GetShotsResult {
|
||||||
shots: [ShotGQL!]!
|
shots: [ShotGQL!]!
|
||||||
count: Int
|
count: Int
|
||||||
@@ -1218,51 +1160,6 @@ input CreatedAfter @oneOf {
|
|||||||
createdAt: DateTime
|
createdAt: DateTime
|
||||||
}
|
}
|
||||||
|
|
||||||
type UsageStatsGQL {
|
|
||||||
funnel: FunnelStatsGQL!
|
|
||||||
totalUsers: Int!
|
|
||||||
totalVideos: Int!
|
|
||||||
totalShots: Int!
|
|
||||||
totalRuns: Int!
|
|
||||||
windows: [UsageStatsWindowGQL!]!
|
|
||||||
daily: [UsageStatsDailyGQL!]!
|
|
||||||
processingLast24h: [ProcessingStatusCountGQL!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type FunnelStatsGQL {
|
|
||||||
freemiumEpoch: Date!
|
|
||||||
eraSignups: Int!
|
|
||||||
eraPaying: Int!
|
|
||||||
activationCohort: Int!
|
|
||||||
activationActivated: Int!
|
|
||||||
payingUsers: Int!
|
|
||||||
newPaid7d: Int!
|
|
||||||
newPaid30d: Int!
|
|
||||||
retentionPrevActive: Int!
|
|
||||||
retentionReturned: Int!
|
|
||||||
}
|
|
||||||
|
|
||||||
type UsageStatsWindowGQL {
|
|
||||||
label: String!
|
|
||||||
newUsers: Int!
|
|
||||||
activeUsers: Int!
|
|
||||||
sessions: Int!
|
|
||||||
shots: Int!
|
|
||||||
}
|
|
||||||
|
|
||||||
type UsageStatsDailyGQL {
|
|
||||||
day: Date!
|
|
||||||
newUsers: Int!
|
|
||||||
activeUsers: Int!
|
|
||||||
sessions: Int!
|
|
||||||
shots: Int!
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProcessingStatusCountGQL {
|
|
||||||
status: String!
|
|
||||||
count: Int!
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserRelationshipsResult {
|
type UserRelationshipsResult {
|
||||||
inquiringUser: UserGQL!
|
inquiringUser: UserGQL!
|
||||||
relationships: [UserRelationship!]!
|
relationships: [UserRelationship!]!
|
||||||
|
|||||||
Reference in New Issue
Block a user