Reformatted + fixed spawn problem.
This commit is contained in:
parent
46efe08535
commit
6d776ef545
@ -16,10 +16,7 @@ import {
|
|||||||
Vector3,
|
Vector3,
|
||||||
WebXRDefaultExperience
|
WebXRDefaultExperience
|
||||||
} from "@babylonjs/core";
|
} from "@babylonjs/core";
|
||||||
import {Right} from "./controllers/right";
|
|
||||||
import {Left} from "./controllers/left";
|
|
||||||
///import {havokModule} from "./util/havok";
|
///import {havokModule} from "./util/havok";
|
||||||
import {Bmenu} from "./menus/bmenu";
|
|
||||||
import HavokPhysics from "@babylonjs/havok";
|
import HavokPhysics from "@babylonjs/havok";
|
||||||
import {Rigplatform} from "./controllers/rigplatform";
|
import {Rigplatform} from "./controllers/rigplatform";
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import {PhysicsBody, Vector3, WebXRCamera, WebXRInputSource} from "@babylonjs/core";
|
import {Vector3, WebXRInputSource} from "@babylonjs/core";
|
||||||
import {Rigplatform} from "./rigplatform";
|
import {Rigplatform} from "./rigplatform";
|
||||||
|
|
||||||
export class Base {
|
export class Base {
|
||||||
@ -22,6 +22,7 @@ export class Base {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setRig(rig: Rigplatform) {
|
setRig(rig: Rigplatform) {
|
||||||
this.rig = rig;
|
this.rig = rig;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,15 +20,15 @@ import {Bmenu} from "../menus/bmenu";
|
|||||||
export class Rigplatform {
|
export class Rigplatform {
|
||||||
static LINEAR_VELOCITY = 4;
|
static LINEAR_VELOCITY = 4;
|
||||||
static ANGULAR_VELOCITY = 3;
|
static ANGULAR_VELOCITY = 3;
|
||||||
public bMenu: Bmenu;
|
|
||||||
static x90 = Quaternion.RotationAxis(Vector3.Up(), 1.5708);
|
static x90 = Quaternion.RotationAxis(Vector3.Up(), 1.5708);
|
||||||
private camera: Camera;
|
public bMenu: Bmenu;
|
||||||
private scene: Scene;
|
|
||||||
private xr: WebXRDefaultExperience;
|
|
||||||
public right: Right;
|
public right: Right;
|
||||||
public left: Left;
|
public left: Left;
|
||||||
public body: PhysicsBody;
|
public body: PhysicsBody;
|
||||||
public rigMesh: Mesh;
|
public rigMesh: Mesh;
|
||||||
|
private camera: Camera;
|
||||||
|
private scene: Scene;
|
||||||
|
private xr: WebXRDefaultExperience;
|
||||||
private turning: boolean = false;
|
private turning: boolean = false;
|
||||||
|
|
||||||
constructor(scene: Scene, xr: WebXRDefaultExperience) {
|
constructor(scene: Scene, xr: WebXRDefaultExperience) {
|
||||||
@ -68,31 +68,6 @@ export class Rigplatform {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#initializeControllers() {
|
|
||||||
this.xr.input.onControllerAddedObservable.add((source, state) => {
|
|
||||||
let controller;
|
|
||||||
switch (source.inputSource.handedness) {
|
|
||||||
case "right":
|
|
||||||
controller = new Right(source);
|
|
||||||
this.right = controller;
|
|
||||||
controller.setBMenu(this.bMenu);
|
|
||||||
break;
|
|
||||||
case "left":
|
|
||||||
controller = new Left(source);
|
|
||||||
this.left = controller;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
this.xr.baseExperience.camera.position = new Vector3(0, 1.6, 0);
|
|
||||||
if (controller) {
|
|
||||||
controller.setRig(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(source);
|
|
||||||
console.log(state);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public forwardback(val: number) {
|
public forwardback(val: number) {
|
||||||
const ray = this.camera.getForwardRay();
|
const ray = this.camera.getForwardRay();
|
||||||
|
|
||||||
@ -143,6 +118,31 @@ export class Rigplatform {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#initializeControllers() {
|
||||||
|
this.xr.input.onControllerAddedObservable.add((source, state) => {
|
||||||
|
let controller;
|
||||||
|
switch (source.inputSource.handedness) {
|
||||||
|
case "right":
|
||||||
|
controller = new Right(source);
|
||||||
|
this.right = controller;
|
||||||
|
controller.setBMenu(this.bMenu);
|
||||||
|
break;
|
||||||
|
case "left":
|
||||||
|
controller = new Left(source);
|
||||||
|
this.left = controller;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
this.xr.baseExperience.camera.position = new Vector3(0, 1.6, 0);
|
||||||
|
if (controller) {
|
||||||
|
controller.setRig(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(source);
|
||||||
|
console.log(state);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//create a method to set the camera to the rig
|
//create a method to set the camera to the rig
|
||||||
|
|
||||||
#setupKeyboard() {
|
#setupKeyboard() {
|
||||||
|
|||||||
@ -12,6 +12,7 @@ export enum DiagramEventType {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DiagramEvent = {
|
export type DiagramEvent = {
|
||||||
type: DiagramEventType;
|
type: DiagramEventType;
|
||||||
menustate?: BmenuState;
|
menustate?: BmenuState;
|
||||||
@ -30,6 +31,7 @@ export type DiagramEntity = {
|
|||||||
scale?: Vector3;
|
scale?: Vector3;
|
||||||
parent?: string;
|
parent?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DiagramManager {
|
export class DiagramManager {
|
||||||
static onDiagramEventObservable = new Observable();
|
static onDiagramEventObservable = new Observable();
|
||||||
static leftController: Mesh;
|
static leftController: Mesh;
|
||||||
@ -46,6 +48,7 @@ export class DiagramManager {
|
|||||||
DiagramManager.onDiagramEventObservable.add(this.#onDiagramEvent, -1, true, this);
|
DiagramManager.onDiagramEventObservable.add(this.#onDiagramEvent, -1, true, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#onDiagramEvent(event: DiagramEvent) {
|
#onDiagramEvent(event: DiagramEvent) {
|
||||||
console.log(event);
|
console.log(event);
|
||||||
const entity = event.entity;
|
const entity = event.entity;
|
||||||
@ -71,10 +74,17 @@ export class DiagramManager {
|
|||||||
const newMesh = DiagramManager.currentMesh.clone(DiagramManager.currentMesh.name = "id" + uuidv4(), DiagramManager.currentMesh.parent);
|
const newMesh = DiagramManager.currentMesh.clone(DiagramManager.currentMesh.name = "id" + uuidv4(), DiagramManager.currentMesh.parent);
|
||||||
DiagramManager.currentMesh.setParent(null);
|
DiagramManager.currentMesh.setParent(null);
|
||||||
DiagramManager.currentMesh = newMesh;
|
DiagramManager.currentMesh = newMesh;
|
||||||
DiagramManager.onDiagramEventObservable.notifyObservers({type: DiagramEventType.DROPPED, entity: entity});
|
DiagramManager.onDiagramEventObservable.notifyObservers({
|
||||||
|
type: DiagramEventType.DROPPED,
|
||||||
|
entity: entity
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DiagramEventType.ADD:
|
case DiagramEventType.ADD:
|
||||||
|
if (DiagramManager.currentMesh){
|
||||||
|
DiagramManager.currentMesh.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
if (mesh) {
|
if (mesh) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -82,6 +92,7 @@ export class DiagramManager {
|
|||||||
if (!mesh) {
|
if (!mesh) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case DiagramEventType.MODIFY:
|
case DiagramEventType.MODIFY:
|
||||||
@ -109,6 +120,7 @@ export class DiagramManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#createMesh(entity: DiagramEntity) {
|
#createMesh(entity: DiagramEntity) {
|
||||||
if (!entity.id) {
|
if (!entity.id) {
|
||||||
entity.id = "id" + uuidv4();
|
entity.id = "id" + uuidv4();
|
||||||
@ -117,9 +129,11 @@ export class DiagramManager {
|
|||||||
switch (entity.template) {
|
switch (entity.template) {
|
||||||
case "#box-template":
|
case "#box-template":
|
||||||
mesh = MeshBuilder.CreateBox(entity.id,
|
mesh = MeshBuilder.CreateBox(entity.id,
|
||||||
{width: entity.scale.x,
|
{
|
||||||
|
width: entity.scale.x,
|
||||||
height: entity.scale.y,
|
height: entity.scale.y,
|
||||||
depth: entity.scale.z}, this.scene);
|
depth: entity.scale.z
|
||||||
|
}, this.scene);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "#sphere-template":
|
case "#sphere-template":
|
||||||
@ -127,7 +141,10 @@ export class DiagramManager {
|
|||||||
mesh = MeshBuilder.CreateSphere(entity.id, {diameter: entity.scale.x}, this.scene);
|
mesh = MeshBuilder.CreateSphere(entity.id, {diameter: entity.scale.x}, this.scene);
|
||||||
break
|
break
|
||||||
case "#cylinder-template":
|
case "#cylinder-template":
|
||||||
mesh= MeshBuilder.CreateCylinder(entity.id, {diameter: entity.scale.x, height: entity.scale.y}, this.scene);
|
mesh = MeshBuilder.CreateCylinder(entity.id, {
|
||||||
|
diameter: entity.scale.x,
|
||||||
|
height: entity.scale.y
|
||||||
|
}, this.scene);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
mesh = null;
|
mesh = null;
|
||||||
|
|||||||
@ -6,16 +6,19 @@ export class Cameras {
|
|||||||
private token: string;
|
private token: string;
|
||||||
private cameras;
|
private cameras;
|
||||||
private cameratextures = new Array<Texture>();
|
private cameratextures = new Array<Texture>();
|
||||||
|
|
||||||
constructor(scene: Scene, token: string) {
|
constructor(scene: Scene, token: string) {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getCameras() {
|
public async getCameras() {
|
||||||
|
|
||||||
const cameras = await axios.get('https://local.immersiveidea.com/api/cameras');
|
const cameras = await axios.get('https://local.immersiveidea.com/api/cameras');
|
||||||
this.cameras = cameras;
|
this.cameras = cameras;
|
||||||
console.log(cameras);
|
console.log(cameras);
|
||||||
}
|
}
|
||||||
|
|
||||||
public createCameras() {
|
public createCameras() {
|
||||||
this.createCamera(12333524, 0);
|
this.createCamera(12333524, 0);
|
||||||
this.createCamera(115860395, 1);
|
this.createCamera(115860395, 1);
|
||||||
@ -24,6 +27,7 @@ export class Cameras {
|
|||||||
this.createCamera(48497021, 4);
|
this.createCamera(48497021, 4);
|
||||||
this.createCamera(55870327, 5);
|
this.createCamera(55870327, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public createCamera(id, index) {
|
public createCamera(id, index) {
|
||||||
const width = 1.6;
|
const width = 1.6;
|
||||||
const height = .9
|
const height = .9
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
export class Amenu {
|
export class Amenu {
|
||||||
private visible = false;
|
private visible = false;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public toggle() {
|
public toggle() {
|
||||||
this.visible = !this.visible;
|
this.visible = !this.visible;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
import {
|
import {
|
||||||
AbstractMesh,
|
AbstractMesh,
|
||||||
Angle,
|
Angle,
|
||||||
Color3, Mesh,
|
Color3,
|
||||||
MeshBuilder,
|
Scene,
|
||||||
Scene, SceneSerializer,
|
|
||||||
StandardMaterial,
|
StandardMaterial,
|
||||||
TransformNode, Vector3,
|
TransformNode,
|
||||||
WebXRExperienceHelper, WebXRInputSource
|
Vector3,
|
||||||
|
WebXRExperienceHelper,
|
||||||
|
WebXRInputSource
|
||||||
} from "@babylonjs/core";
|
} from "@babylonjs/core";
|
||||||
import {GUI3DManager, HolographicButton, PlanePanel} from "@babylonjs/gui";
|
import {GUI3DManager, HolographicButton, PlanePanel} from "@babylonjs/gui";
|
||||||
import {DiagramEntity, DiagramEvent, DiagramEventType, DiagramManager} from "../diagram/diagramManager";
|
import {DiagramEntity, DiagramEvent, DiagramEventType, DiagramManager} from "../diagram/diagramManager";
|
||||||
@ -17,6 +18,7 @@ export enum BmenuState {
|
|||||||
DROPPING, // Dropping an entity
|
DROPPING, // Dropping an entity
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Bmenu {
|
export class Bmenu {
|
||||||
private scene;
|
private scene;
|
||||||
private state: BmenuState = BmenuState.NONE;
|
private state: BmenuState = BmenuState.NONE;
|
||||||
@ -36,9 +38,11 @@ export class Bmenu {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setController(controller: WebXRInputSource) {
|
setController(controller: WebXRInputSource) {
|
||||||
this.rightController = controller.grip;
|
this.rightController = controller.grip;
|
||||||
}
|
}
|
||||||
|
|
||||||
makeButton(name: string, id: string) {
|
makeButton(name: string, id: string) {
|
||||||
const button = new HolographicButton(name);
|
const button = new HolographicButton(name);
|
||||||
button.text = name;
|
button.text = name;
|
||||||
@ -47,6 +51,43 @@ export class Bmenu {
|
|||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getState() {
|
||||||
|
return this.state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public setState(state: BmenuState) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
toggle() {
|
||||||
|
if (this.panel) {
|
||||||
|
this.panel.dispose();
|
||||||
|
this.panel = null;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
const anchor = new TransformNode("bMenuAnchor");
|
||||||
|
anchor.rotation.y = Angle.FromDegrees(180).radians();
|
||||||
|
const cam = this.xr.camera.getFrontPosition(2);
|
||||||
|
anchor.position = cam;
|
||||||
|
const panel = new PlanePanel();
|
||||||
|
panel.margin = .6;
|
||||||
|
//panel.scaling.y=.5;
|
||||||
|
//panel.orientation = Container3D.FACEFORWARDREVERSED_ORIENTATION;
|
||||||
|
|
||||||
|
panel.columns = 5;
|
||||||
|
this.manager.addControl(panel);
|
||||||
|
panel.linkToTransformNode(anchor);
|
||||||
|
//panel.position.z = 2;
|
||||||
|
//panel.position.y = 4;
|
||||||
|
|
||||||
|
panel.addControl(this.makeButton("Add Box", "addBox"));
|
||||||
|
panel.addControl(this.makeButton("Add Sphere", "addSphere"));
|
||||||
|
panel.addControl(this.makeButton("Add Cylinder", "addCylinder"));
|
||||||
|
this.panel = panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#clickhandler(_info, state) {
|
#clickhandler(_info, state) {
|
||||||
console.log(state.currentTarget.name);
|
console.log(state.currentTarget.name);
|
||||||
|
|
||||||
@ -71,6 +112,10 @@ export class Bmenu {
|
|||||||
break;
|
break;
|
||||||
case "addCylinder":
|
case "addCylinder":
|
||||||
entity.template = "#cylinder-template";
|
entity.template = "#cylinder-template";
|
||||||
|
break;
|
||||||
|
case "doneAdding":
|
||||||
|
this.state=BmenuState.NONE;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Unknown button");
|
console.log("Unknown button");
|
||||||
@ -83,12 +128,6 @@ export class Bmenu {
|
|||||||
this.state = BmenuState.ADDING;
|
this.state = BmenuState.ADDING;
|
||||||
DiagramManager.onDiagramEventObservable.notifyObservers(event);
|
DiagramManager.onDiagramEventObservable.notifyObservers(event);
|
||||||
}
|
}
|
||||||
public getState() {
|
|
||||||
return this.state;
|
|
||||||
}
|
|
||||||
public setState(state: BmenuState) {
|
|
||||||
this.state = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
#createDefaultMaterial() {
|
#createDefaultMaterial() {
|
||||||
|
|
||||||
@ -96,33 +135,4 @@ export class Bmenu {
|
|||||||
myMaterial.diffuseColor = Color3.FromHexString("#CEE");
|
myMaterial.diffuseColor = Color3.FromHexString("#CEE");
|
||||||
return myMaterial;
|
return myMaterial;
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle() {
|
|
||||||
if (this.panel) {
|
|
||||||
this.panel.dispose();
|
|
||||||
this.panel = null;
|
|
||||||
this.setState(BmenuState.NONE);
|
|
||||||
} else {
|
|
||||||
const anchor = new TransformNode("bMenuAnchor");
|
|
||||||
anchor.rotation.y = Angle.FromDegrees(180).radians();
|
|
||||||
const cam = this.xr.camera.getFrontPosition(2);
|
|
||||||
anchor.position = cam;
|
|
||||||
const panel = new PlanePanel();
|
|
||||||
panel.margin = .6;
|
|
||||||
//panel.scaling.y=.5;
|
|
||||||
//panel.orientation = Container3D.FACEFORWARDREVERSED_ORIENTATION;
|
|
||||||
|
|
||||||
panel.columns = 5;
|
|
||||||
this.manager.addControl(panel);
|
|
||||||
panel.linkToTransformNode(anchor);
|
|
||||||
//panel.position.z = 2;
|
|
||||||
//panel.position.y = 4;
|
|
||||||
|
|
||||||
panel.addControl(this.makeButton("Add Box", "addBox"));
|
|
||||||
panel.addControl(this.makeButton("Add Sphere", "addSphere"));
|
|
||||||
panel.addControl(this.makeButton("Add Cylinder", "addCylinder"));
|
|
||||||
this.panel = panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -5,11 +5,13 @@ export class ObjectEditor {
|
|||||||
private scene;
|
private scene;
|
||||||
private editor: Mesh;
|
private editor: Mesh;
|
||||||
private mesh;
|
private mesh;
|
||||||
|
|
||||||
constructor(scene, mesh) {
|
constructor(scene, mesh) {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
this.mesh = mesh;
|
this.mesh = mesh;
|
||||||
this.edit();
|
this.edit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public edit() {
|
public edit() {
|
||||||
this.editor = Mesh.CreatePlane("editor", 2, this.scene);
|
this.editor = Mesh.CreatePlane("editor", 2, this.scene);
|
||||||
this.editor.position.z = -2;
|
this.editor.position.z = -2;
|
||||||
@ -51,6 +53,7 @@ export class ObjectEditor {
|
|||||||
this.close();
|
this.close();
|
||||||
}, -1, false, this);
|
}, -1, false, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
createControl(): Slider {
|
createControl(): Slider {
|
||||||
const slider = new Slider();
|
const slider = new Slider();
|
||||||
slider.minimum = .1
|
slider.minimum = .1
|
||||||
@ -59,6 +62,7 @@ export class ObjectEditor {
|
|||||||
slider.step = .1
|
slider.step = .1
|
||||||
return slider;
|
return slider;
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.editor.dispose();
|
this.editor.dispose();
|
||||||
this.mesh = null;
|
this.mesh = null;
|
||||||
|
|||||||
@ -11,6 +11,7 @@ export class RingCamera {
|
|||||||
});
|
});
|
||||||
this.ringApi = ringApi;
|
this.ringApi = ringApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getCameras() {
|
public async getCameras() {
|
||||||
const cams = await this.ringApi.getCameras();
|
const cams = await this.ringApi.getCameras();
|
||||||
console.log(cams[0]);
|
console.log(cams[0]);
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
import {Angle, Color3, MeshBuilder, Scene, StandardMaterial, Texture} from "@babylonjs/core";
|
import {Angle, Color3, MeshBuilder, Scene, StandardMaterial, Texture} from "@babylonjs/core";
|
||||||
import googleStaticMapsTile from "google-static-maps-tile";
|
import googleStaticMapsTile from "google-static-maps-tile";
|
||||||
|
|
||||||
export class Gmap {
|
export class Gmap {
|
||||||
private scene: Scene;
|
private scene: Scene;
|
||||||
|
|
||||||
constructor(scene: Scene) {
|
constructor(scene: Scene) {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async createMapTiles(lat, lon) {
|
public async createMapTiles(lat, lon) {
|
||||||
googleStaticMapsTile({
|
googleStaticMapsTile({
|
||||||
areaSize: '2560x2560',
|
areaSize: '2560x2560',
|
||||||
@ -27,6 +29,7 @@ export class Gmap {
|
|||||||
document.body.appendChild(image);
|
document.body.appendChild(image);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public createMap(lat, lon) {
|
public createMap(lat, lon) {
|
||||||
//const lat = 42.3369513;
|
//const lat = 42.3369513;
|
||||||
//const lon = -88.8707076;
|
//const lon = -88.8707076;
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
import * as maptilerClient from '@maptiler/client';
|
import * as maptilerClient from '@maptiler/client';
|
||||||
import {Angle, Color3, MeshBuilder, Scene, StandardMaterial, Texture} from "@babylonjs/core";
|
import {Angle, Color3, MeshBuilder, Scene, StandardMaterial, Texture} from "@babylonjs/core";
|
||||||
|
|
||||||
export class Mapt {
|
export class Mapt {
|
||||||
private scene: Scene;
|
private scene: Scene;
|
||||||
|
|
||||||
constructor(scene: Scene) {
|
constructor(scene: Scene) {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildMapImage() {
|
buildMapImage() {
|
||||||
const apiKey = '073I3Pfe4lzoSf8tNriR';
|
const apiKey = '073I3Pfe4lzoSf8tNriR';
|
||||||
maptilerClient.config.apiKey = apiKey;
|
maptilerClient.config.apiKey = apiKey;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user