-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
1,636 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package wired:math; | ||
|
||
interface types { | ||
record transform { | ||
rotation: quat, | ||
scale: vec3, | ||
translation: vec3, | ||
} | ||
|
||
record vec3 { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
} | ||
|
||
record quat { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
w: f32, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package wired:math; | ||
|
||
interface types { | ||
record transform { | ||
rotation: quat, | ||
scale: vec3, | ||
translation: vec3, | ||
} | ||
|
||
record vec3 { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
} | ||
|
||
record quat { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
w: f32, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
spatial/wit/wired-player/deps/wired-input/deps/wired-math/world.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package wired:math; | ||
|
||
interface types { | ||
record transform { | ||
rotation: quat, | ||
scale: vec3, | ||
translation: vec3, | ||
} | ||
|
||
record vec3 { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
} | ||
|
||
record quat { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
w: f32, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
interface types { | ||
use wired:math/types.{vec3, quat}; | ||
|
||
enum hand-side { | ||
left, | ||
right, | ||
} | ||
|
||
record joint { | ||
translation: vec3, | ||
rotation: quat, | ||
radius: f32, | ||
} | ||
|
||
record finger { | ||
tip: joint, | ||
distal: joint, | ||
proximal: joint, | ||
metacarpal: joint, | ||
} | ||
|
||
// Hand tracking data. | ||
record hand { | ||
side: hand-side, | ||
|
||
thumb: finger, | ||
index: finger, | ||
middle: finger, | ||
ring: finger, | ||
little: finger, | ||
|
||
palm: joint, | ||
wrist: joint, | ||
elbow: option<joint>, | ||
} | ||
|
||
// A line with an origin and a direction. | ||
record ray { | ||
origin: vec3, | ||
orientation: quat, | ||
} | ||
|
||
// A single point of interaction, such as the tip of a stylus. | ||
record tip { | ||
origin: vec3, | ||
orientation: quat, | ||
radius: f32, | ||
} | ||
|
||
variant input-type { | ||
hand(hand), | ||
ray(ray), | ||
tip(tip), | ||
} | ||
|
||
record input-event { | ||
// Unique id for the event. | ||
id: u64, | ||
// Spatial input data. | ||
input: input-type, | ||
// Distance from the input method to the handler. | ||
distance: f32, | ||
// How many handlers received the event before this one. | ||
order: u32, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package wired:input; | ||
|
||
world host { | ||
import handler; | ||
import types; | ||
} | ||
|
||
interface handler { | ||
use types.{input-event}; | ||
|
||
resource input-handler { | ||
constructor(); | ||
|
||
// Handle the next recieved input event. | ||
// Events only last for one tick. | ||
handle-input: func() -> option<input-event>; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package wired:math; | ||
|
||
interface types { | ||
record transform { | ||
rotation: quat, | ||
scale: vec3, | ||
translation: vec3, | ||
} | ||
|
||
record vec3 { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
} | ||
|
||
record quat { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
w: f32, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
spatial/wit/wired-player/deps/wired-physics/deps/wired-math/world.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package wired:math; | ||
|
||
interface types { | ||
record transform { | ||
rotation: quat, | ||
scale: vec3, | ||
translation: vec3, | ||
} | ||
|
||
record vec3 { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
} | ||
|
||
record quat { | ||
x: f32, | ||
y: f32, | ||
z: f32, | ||
w: f32, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package wired:physics; | ||
|
||
world host { | ||
import types; | ||
} | ||
|
||
interface types { | ||
use wired:math/types.{vec3}; | ||
|
||
resource collider { | ||
constructor(shape: shape); | ||
|
||
density: func() -> f32; | ||
set-density: func(value: f32); | ||
} | ||
|
||
variant shape { | ||
cuboid(vec3), | ||
sphere(sphere), | ||
} | ||
|
||
record sphere { | ||
radius: f32 | ||
} | ||
|
||
resource rigid-body { | ||
constructor(rigid-body-type: rigid-body-type); | ||
|
||
angvel: func() -> vec3; | ||
set-angvel: func(value: vec3); | ||
|
||
linvel: func() -> vec3; | ||
set-linvel: func(value: vec3); | ||
} | ||
|
||
enum rigid-body-type { | ||
dynamic, | ||
fixed, | ||
kinematic, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../wired-input/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../wired-math/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../wired-physics/ |
Oops, something went wrong.