From 8276eb6a2b2654e6ee5e0833dae5a8feec88608a Mon Sep 17 00:00:00 2001 From: claustra01 Date: Sun, 11 Aug 2024 09:36:49 +0900 Subject: [PATCH] add: shooting schema --- src/type/shooting.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/type/shooting.ts diff --git a/src/type/shooting.ts b/src/type/shooting.ts new file mode 100644 index 0000000..bba0cd9 --- /dev/null +++ b/src/type/shooting.ts @@ -0,0 +1,28 @@ +export enum EventType { + Pointer = "pointer", + Action = "action", +} + +export interface Target { + x: number; + y: number; +} + +export interface Vector { + x: number; + y: number; + z: number; +} + +export interface PointerSchema { + id: string; + event_type: EventType.Pointer; + target: Target; +} + +export interface ActionSchema { + id: string; + event_type: EventType.Action; + target: Target; + vector: Vector; +}