mirror of
https://github.com/sortedcord/omnia.git
synced 2026-07-22 03:52:48 +05:30
feat: Implemented basic location graph
This commit is contained in:
@@ -5,5 +5,8 @@
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./dist/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@omnia/core": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export {};
|
||||
export * from "./location.js";
|
||||
|
||||
20
packages/spatial/src/location.ts
Normal file
20
packages/spatial/src/location.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { AttributableObject } from "@omnia/core";
|
||||
|
||||
export class Location extends AttributableObject {
|
||||
parentId: string | null;
|
||||
connections: PortalConnection[] = [];
|
||||
|
||||
constructor(id?: string, parentId: string | null = null) {
|
||||
super(id);
|
||||
this.parentId = parentId;
|
||||
}
|
||||
}
|
||||
|
||||
export interface PortalConnection {
|
||||
targetId: string;
|
||||
portalName?: string;
|
||||
portalStateDescriptor?: string;
|
||||
visionProp: number; // 0–10
|
||||
soundProp: number; // 0–10
|
||||
bidirectional: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user