23 lines
539 B
TypeScript
23 lines
539 B
TypeScript
import { makeAutoObservable } from "mobx";
|
|
import type { Id } from "../types";
|
|
import type { HitResults } from "../helpers/circularFrustumIntersect";
|
|
|
|
export class Root {
|
|
public selectedPrimitiveIds: Id[] = [];
|
|
public hitTest: HitResults = { hits: [] };
|
|
|
|
constructor() {
|
|
makeAutoObservable(this);
|
|
}
|
|
|
|
public setSelectedPrimitiveIds(value: Id[]) {
|
|
this.selectedPrimitiveIds = value;
|
|
}
|
|
|
|
public setHitTest(value: HitResults) {
|
|
this.hitTest = value;
|
|
}
|
|
}
|
|
|
|
export const state = new Root();
|