Implement project + remove useless config

This commit is contained in:
2025-04-02 17:16:54 +02:00
parent 3422412bbf
commit 34d1506483
18 changed files with 502 additions and 70 deletions

View File

@@ -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';

View File

@@ -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>
`;

View File

@@ -1,4 +1,15 @@
{
"controllers": [],
"controllers": {
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,
"fetch": "eager"
},
"mercure-turbo-stream": {
"enabled": false,
"fetch": "eager"
}
}
},
"entrypoints": []
}

View File

@@ -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);