WebIFCLoaderPlugin tutorial not available #1667
Replies: 1 comment
-
Hi @Yusuke-Togao, It looks like the tutorial page uses an outdated interface to demonstrate The One of examples that uses At line 181 a At lines 206-215 this API is used to create and initialize an After that the Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
To see where the IFC file opens in the xeokit-sdk, the WebIFCLoaderPlugin tutorial (https://xeokit.notion.site/Viewing-an-IFC-Model-with- WebIFCLoaderPlugin-9a572b801af949bf87a21c88968bd251), I used the .html code as is.
However, when I check the operation, the IFC file does not open and the console log shows ‘Uncaught Parameter expected: WebIFC’.
I found that the WebIFC parameter was not specified enough in the WebIFCLoaderPlugin constructor, so I tried to specify it, but the WebIFCLoaderPluginConfiguration object has a parameter named WebIFC It does not exist.
Does the tutorial shown above still work today? Is it a problem with my development environment or implementation?
`<!doctype html>
<title>xeokit Example</title> <style> body { margin: 0; width: 100%; height: 100%; user-select: none; } #myCanvas { width: 100%; height: 100%; position: absolute; background: lightblue; background-image: linear-gradient(lightblue, white); } </style> <script id="source" type="module">import {Viewer, WebIFCLoaderPlugin} from
"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
const viewer = new Viewer({
canvasId: "myCanvas",
transparent: true
});
viewer.camera.eye = [-3.933, 2.855, 27.018];
viewer.camera.look = [4.400, 3.724, 8.899];
viewer.camera.up = [-0.018, 0.999, 0.039];
const webIFCLoader = new WebIFCLoaderPlugin(viewer, {
// Path to web-ifc.wasm, which does the IFC parsing for us
wasmPath: "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/"
});
const model = webIFCLoader.load({ // Returns an Entity that represents the model
</script> `src: "Duplex.ifc",
edges: true
});
Beta Was this translation helpful? Give feedback.
All reactions