Implement project + remove useless config
This commit is contained in:
@@ -5,7 +5,4 @@ import './bootstrap.js';
|
||||
* This file will be included onto the page via the importmap() Twig function,
|
||||
* which should already be in your base.html.twig.
|
||||
*/
|
||||
import './styles/app.css';
|
||||
import API_CONFIG from "./config.js";
|
||||
|
||||
window.API_CONFIG = API_CONFIG;
|
||||
import './styles/app.css';
|
||||
@@ -77,8 +77,8 @@ BIM.loadIfc = async function (buffer, name) {
|
||||
}
|
||||
|
||||
const fragments = this.components.get(OBC.FragmentsManager);
|
||||
|
||||
const fragmentIfcLoader = this.components.get(OBC.IfcLoader);
|
||||
const classifier = this.components.get(OBC.Classifier);
|
||||
|
||||
// NOTE: loads web-ifc WASM from https://unpkg.com/web-ifc@0.0.53/
|
||||
await fragmentIfcLoader.setup();
|
||||
@@ -107,14 +107,20 @@ BIM.loadIfc = async function (buffer, name) {
|
||||
model.name = name;
|
||||
this.world.scene.three.add(model);
|
||||
|
||||
// To actually add the model to the scene...
|
||||
for (const fragment of model.items) {
|
||||
this.world.meshes.add(fragment.mesh);
|
||||
}
|
||||
|
||||
classifier.byEntity(model);
|
||||
const entities = classifier.list.entities;
|
||||
|
||||
// Useful?
|
||||
this.fragments = fragments;
|
||||
this.model = model;
|
||||
|
||||
console.log(entities);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -147,6 +153,7 @@ BIM.setupHighligther = async function (model) {
|
||||
li.innerHTML = `
|
||||
<ul>
|
||||
<li><strong>Name</strong>: ${testProp['Name'].value}</span>
|
||||
<li><strong>Type</strong>: ${testProp['ObjectType']?.value}</span>
|
||||
<li><strong>Tag</strong>: ${testProp['Tag'].value}</li>
|
||||
</ul>
|
||||
`;
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
{
|
||||
"controllers": [],
|
||||
"controllers": {
|
||||
"@symfony/ux-turbo": {
|
||||
"turbo-core": {
|
||||
"enabled": true,
|
||||
"fetch": "eager"
|
||||
},
|
||||
"mercure-turbo-stream": {
|
||||
"enabled": false,
|
||||
"fetch": "eager"
|
||||
}
|
||||
}
|
||||
},
|
||||
"entrypoints": []
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ export default class extends Controller {
|
||||
'buildingForm'
|
||||
];
|
||||
|
||||
API_BASE = window.API_CONFIG.dev;
|
||||
|
||||
async submit(event) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -22,10 +20,7 @@ export default class extends Controller {
|
||||
'POST'
|
||||
);
|
||||
|
||||
const res = await this.send(
|
||||
`${this.API_BASE}/api/buildings`,
|
||||
options
|
||||
);
|
||||
const res = await this.send('/project/create', options);
|
||||
|
||||
if (res.id) {
|
||||
this.buildingTarget.setAttribute('data-id', res.id);
|
||||
|
||||
Reference in New Issue
Block a user