@vincentt-xr/sdk 2.0.0-alpha.4 → 2.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +85 -52
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,85 +1,118 @@
1
- # RTX AR Tracking SDK
1
+ # Vincentt XR SDK
2
2
 
3
- This SDK is intended for implementing AI-powered tracking for WebAR projects by rangoon.tech.
3
+ `@vincentt-xr/sdk` is the AR runtime for Vincentt projects. It gives a React +
4
+ react-three-fiber app a camera session, face/hand/body tracking, and the
5
+ screen-space layout primitives that most AR effects are built from.
4
6
 
5
- ## Installation
6
- First, install the library by running the command
7
+ Your JSX renders directly — in local preview and in the published bundle at
8
+ `<slug>.vincentt.app`.
9
+
10
+ ## Install
11
+
12
+ The SDK is installed for you when you scaffold a project from the Vincentt
13
+ template, which pins a known-good version alongside its peers:
7
14
 
8
15
  ```
9
- npm install @rangoon/track
16
+ vincentt create my-app
10
17
  ```
11
18
 
12
- If you're using yarn,
19
+ To add it to an existing project:
13
20
 
14
21
  ```
15
- yarn add @rangoon/track
22
+ pnpm add @vincentt-xr/sdk
16
23
  ```
17
24
 
18
- ## How to use
19
- The usage of `@rangoon/track` usually involves two steps.
25
+ It expects `react`, `react-dom`, `three`, `@react-three/fiber`,
26
+ `@react-three/drei`, and `@mediapipe/tasks-vision` as peers. The template
27
+ already pins compatible versions of all of them; mismatched copies of React or
28
+ three.js are the most common source of runtime errors.
20
29
 
21
- ### 1. Start a video stream
22
- Initialize the SDK by attaching the `@rangoon/track`'s `Webcam` component to your React Project.
23
- The `Webcam` component will start a video stream which will be used for tracking.
30
+ ## Quick start
24
31
 
25
- ```ts
26
- import { Webcam } from "@rangoon/track"
27
- import { useRef } from "react"
32
+ Wrap your app in `XRProvider`, mount an `XRScene`, and add content. Trackers
33
+ self-register when mounted — there is no pipeline to wire up by hand.
28
34
 
29
- function App() {
35
+ ```tsx
36
+ import { ScreenSpaceUI, ScreenText, XRProvider, XRScene } from "@vincentt-xr/sdk";
37
+ import { useFaceDetection } from "@vincentt-xr/sdk/tracking";
30
38
 
31
- const videoRef = useRef<HTMLVideoElement>(null)
39
+ function Effect() {
40
+ const detection = useFaceDetection({ numFaces: 1 });
41
+
42
+ if (detection.face) return null;
32
43
 
33
44
  return (
34
- <div>
35
- <Webcam videoReference={videoRef}/>
36
- </div>
37
- )
45
+ <ScreenSpaceUI>
46
+ <ScreenText
47
+ text="SHOW A FACE TO THE CAMERA"
48
+ screenTransform={{ position: { x: 0, y: 0 }, size: { width: 400, height: 52 } }}
49
+ fontSize={24}
50
+ />
51
+ </ScreenSpaceUI>
52
+ );
38
53
  }
39
54
 
40
- export default App
41
-
55
+ export default function App() {
56
+ return (
57
+ <XRProvider>
58
+ <XRScene>
59
+ <Effect />
60
+ </XRScene>
61
+ </XRProvider>
62
+ );
63
+ }
42
64
  ```
43
65
 
44
- ### 2. Initiate a tracking model
66
+ ## Import doors
45
67
 
46
- Currently, `@rangoon/track` supports three types of tracking models.
47
- * Hand Tracking (Landmarks)
48
- * Hand Gesture Tracking (Landmarks + Gestures)
49
- * Face Tracking
68
+ The API is split by task domain. Import each symbol from the door that owns it.
50
69
 
51
- By calling the Hook associated with the respective model, you can obtain the tracking data.
70
+ | Entry point | What lives there |
71
+ | -------------------------------- | ------------------------------------------------------------------------------- |
72
+ | `@vincentt-xr/sdk` | Providers, scene root, screen-space layout, renderers, text, capture, audio |
73
+ | `@vincentt-xr/sdk/tracking` | Face / hand / gesture / body / segmentation trackers, anchors, triggers |
74
+ | `@vincentt-xr/sdk/face-effects` | Face mesh materials, retouch, canonical mesh, head binding |
75
+ | `@vincentt-xr/sdk/scene-object` | Scene-object types, factories, selectors, immutable store operations |
76
+ | `@vincentt-xr/sdk/low-level` | Raw model-node reads and custom-tracker plumbing — the escape hatch |
77
+ | `@vincentt-xr/sdk/debug-ui` | Dev-only inspector panels; not for shipping surfaces |
52
78
 
53
- Below is an example of obtaining hand-tracking data with `useHandTracking` Hook.
54
- ```ts
55
- import { Webcam, useHandTracking } from "@rangoon/track"
56
- import { useEffect, useRef } from "react"
79
+ ## Documentation
57
80
 
58
- function App() {
81
+ **[`GROUNDING.md`](./GROUNDING.md) is the authoritative API reference** — every
82
+ component, hook, and prop, plus the composition conventions. Read it before
83
+ reaching into `node_modules` or inventing props. It ships inside the package, so
84
+ it travels with the version you actually installed.
59
85
 
60
- const videoRef = useRef<HTMLVideoElement>(null)
86
+ Longer-form guides live in [`docs/`](./docs):
61
87
 
62
- //Initiate the model by passing the webcam reference
63
- const handData = useHandTracking({
64
- videoReference: videoRef
65
- })
88
+ - [`docs/introduction.mdx`](./docs/introduction.mdx) — the scene-object authoring model
89
+ - [`docs/guides/`](./docs/guides) — task guides
90
+ - [`docs/api/`](./docs/api) — API pages
91
+ - [`docs/MIGRATION_GUIDE.md`](./docs/MIGRATION_GUIDE.md) — upgrading from 1.x
66
92
 
67
- //Watch the data changes with useEffect
68
- useEffect(() => {
69
- console.log(handData)
70
- }, [handData])
93
+ ## Local development
71
94
 
72
- return (
73
- <div>
74
- <Webcam videoReference={videoRef}/>
75
- </div>
76
- )
77
- }
78
-
79
- export default App
80
95
  ```
96
+ pnpm install
97
+ pnpm dev # example app
98
+ pnpm preview:tunnel # example app, reachable on a phone
99
+ pnpm build
100
+ pnpm test
101
+ pnpm typecheck
102
+ ```
103
+
104
+ The example app under `example/` is the development surface for the SDK itself.
105
+ Experiments start there; once one becomes a real app it graduates to its own
106
+ repo built against the packaged SDK.
107
+
108
+ Release steps are in [`RELEASING.md`](./RELEASING.md).
109
+
110
+ ## License
81
111
 
112
+ Proprietary. See [`LICENSE`](./LICENSE) — the published package is for use with
113
+ the Vincentt platform only.
82
114
 
83
115
  ## Feedback
84
116
 
85
- If you have any feedback, please reach out to us at waing@rangoon.tech
117
+ Report friction and bugs to the Vincentt team through the beta reporting flow,
118
+ or open an issue on this repository.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@vincentt-xr/sdk",
3
- "version": "2.0.0-alpha.4",
3
+ "version": "2.0.0-alpha.5",
4
4
  "description": "XR SDK by Vincentt",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/rangoon-x/vincentt-xr-sdk.git"
7
+ "url": "git+https://github.com/vincentt-xr/sdk.git"
8
8
  },
9
9
  "license": "UNLICENSED",
10
10
  "keywords": [