Skip to content

Commit

Permalink
replace symlinks with git symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Aug 15, 2024
1 parent b6b3ca2 commit 881284a
Show file tree
Hide file tree
Showing 61 changed files with 1,636 additions and 15 deletions.
1 change: 0 additions & 1 deletion spatial/wit/wired-input/deps/wired-math

This file was deleted.

22 changes: 22 additions & 0 deletions spatial/wit/wired-input/deps/wired-math/world.wit
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,
}
}
1 change: 0 additions & 1 deletion spatial/wit/wired-physics/deps/wired-math

This file was deleted.

22 changes: 22 additions & 0 deletions spatial/wit/wired-physics/deps/wired-math/world.wit
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,
}
}
1 change: 0 additions & 1 deletion spatial/wit/wired-player/deps/wired-input

This file was deleted.

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,
}
}
66 changes: 66 additions & 0 deletions spatial/wit/wired-player/deps/wired-input/types.wit
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,
}
}
18 changes: 18 additions & 0 deletions spatial/wit/wired-player/deps/wired-input/world.wit
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>;
}
}
1 change: 0 additions & 1 deletion spatial/wit/wired-player/deps/wired-math

This file was deleted.

22 changes: 22 additions & 0 deletions spatial/wit/wired-player/deps/wired-math/world.wit
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,
}
}
1 change: 0 additions & 1 deletion spatial/wit/wired-player/deps/wired-physics

This file was deleted.

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,
}
}
41 changes: 41 additions & 0 deletions spatial/wit/wired-player/deps/wired-physics/world.wit
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,
}
}
1 change: 0 additions & 1 deletion spatial/wit/wired-player/deps/wired-scene

This file was deleted.

1 change: 1 addition & 0 deletions spatial/wit/wired-player/deps/wired-scene/deps/wired-input
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../wired-input/
1 change: 1 addition & 0 deletions spatial/wit/wired-player/deps/wired-scene/deps/wired-math
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../wired-math/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../wired-physics/
Loading

0 comments on commit 881284a

Please sign in to comment.