You've already forked vtt-mapper
Test optimizing quadtree
This commit is contained in:
@@ -28,7 +28,7 @@ export default class Input
|
||||
static #dragCb?: (delta: Point, start: Point, end: Point, button: number) => void;
|
||||
static #dragEndCb?: (start: Point, end: Point, button: number) => void;
|
||||
static #wheelCb?: (delta: number) => void;
|
||||
static #inputCb?: () => void;
|
||||
static #inputCb?: (input: string) => void;
|
||||
|
||||
static init(canvas: HTMLCanvasElement)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ export default class Input
|
||||
{
|
||||
Input.#wheelCb = cb;
|
||||
}
|
||||
static onInput(cb: () => void): void
|
||||
static onInput(cb: (input: string) => void): void
|
||||
{
|
||||
Input.#inputCb = cb;
|
||||
}
|
||||
@@ -173,6 +173,6 @@ export default class Input
|
||||
{
|
||||
Input.#keys[e.key] = false;
|
||||
|
||||
Input.#inputCb && Input.#inputCb();
|
||||
Input.#inputCb && Input.#inputCb(e.key);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,10 @@ export default class Selector
|
||||
{
|
||||
return Selector.#selected;
|
||||
}
|
||||
static get selection(): Asset[]
|
||||
{
|
||||
return Selector.#assets;
|
||||
}
|
||||
static init(): void
|
||||
{
|
||||
Selector.#previewMesh = new Three.Box3Helper(new Three.Box3(), 0x2980B9);
|
||||
@@ -25,7 +29,7 @@ export default class Selector
|
||||
Renderer.scene.add(Selector.#previewMesh);
|
||||
Renderer.scene.add(Selector.#ghostMesh);
|
||||
Renderer.scene.add(Selector.#selectionMesh);
|
||||
|
||||
|
||||
Selector.hide();
|
||||
}
|
||||
static preview(start: Point, end: Point): void
|
||||
|
||||
Reference in New Issue
Block a user