Skip to content

Commit 70ee546

Browse files
committed
chore: update tutorials
1 parent ff2c788 commit 70ee546

File tree

10 files changed

+146
-146
lines changed

10 files changed

+146
-146
lines changed

examples/ItemsData/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<link rel="modulepreload" crossorigin href="../assets/lit-html-BUQgm8fs.js">
3131
<link rel="modulepreload" crossorigin href="../assets/index-DAd_Xb3m.js">
3232
<link rel="modulepreload" crossorigin href="../assets/index-ChzsFr2R.js">
33-
<link rel="modulepreload" crossorigin href="../assets/index-BnaeDa9G.js">
33+
<link rel="modulepreload" crossorigin href="../assets/index-CAHkfBk_.js">
3434
</head>
3535

3636
<body>

examples/ModelsList/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<link rel="modulepreload" crossorigin href="../assets/lit-html-BUQgm8fs.js">
2727
<link rel="modulepreload" crossorigin href="../assets/index-DAd_Xb3m.js">
2828
<link rel="modulepreload" crossorigin href="../assets/index-ChzsFr2R.js">
29-
<link rel="modulepreload" crossorigin href="../assets/index-BnaeDa9G.js">
29+
<link rel="modulepreload" crossorigin href="../assets/index-CAHkfBk_.js">
3030
</head>
3131

3232
<body>

examples/SpatialTree/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<link rel="modulepreload" crossorigin href="../assets/lit-html-BUQgm8fs.js">
2727
<link rel="modulepreload" crossorigin href="../assets/index-DAd_Xb3m.js">
2828
<link rel="modulepreload" crossorigin href="../assets/index-ChzsFr2R.js">
29-
<link rel="modulepreload" crossorigin href="../assets/index-BnaeDa9G.js">
29+
<link rel="modulepreload" crossorigin href="../assets/index-CAHkfBk_.js">
3030
</head>
3131

3232
<body>

examples/TopicsList/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<link rel="modulepreload" crossorigin href="../assets/index-DAd_Xb3m.js">
4242
<link rel="modulepreload" crossorigin href="../assets/ref-CLKbrLVk.js">
4343
<link rel="modulepreload" crossorigin href="../assets/index-CG13lMFw.js">
44-
<link rel="modulepreload" crossorigin href="../assets/index-BnaeDa9G.js">
44+
<link rel="modulepreload" crossorigin href="../assets/index-CAHkfBk_.js">
4545
</head>
4646

4747
<body>

examples/assets/index-BnaeDa9G.js

Lines changed: 0 additions & 131 deletions
This file was deleted.

examples/assets/index-CAHkfBk_.js

Lines changed: 131 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/assets/itemsData.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/assets/modelsList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import"./lit-html-BUQgm8fs.js";import{u as c,C as l,W as d,S as p,a as u,b,G as g,I as w,F as f,V as C,f as v}from"./index-DAd_Xb3m.js";import{b as L}from"./index-ChzsFr2R.js";import{e as h}from"./index-BnaeDa9G.js";c.init();const e=new l,S=e.get(d),t=S.create();t.name="main";const r=new p(e);r.setup();t.scene=r;const o=document.createElement("bim-viewport"),i=new u(e,o);t.renderer=i;const m=new b(e);t.camera=m;o.addEventListener("resize",()=>{i.resize(),m.updateAspect()});const F=e.get(g);F.create(t);e.init();const I=e.get(w);await I.setup();const n=e.get(f);n.init("https://thatopen.github.io/engine_fragment/resources/worker.mjs");t.camera.controls.addEventListener("rest",()=>n.core.update(!0));n.list.onItemSet.add(async({value:a})=>{a.useCamera(t.camera.three),t.scene.three.add(a.object),await n.core.update(!0)});const[y]=h.modelsList({components:e,metaDataTags:["schema"],actions:{download:!0}}),E=C.create(()=>{const[a]=L.loadFrag({components:e});return v`
1+
import"./lit-html-BUQgm8fs.js";import{u as c,C as l,W as d,S as p,a as u,b,G as g,I as w,F as f,V as C,f as v}from"./index-DAd_Xb3m.js";import{b as L}from"./index-ChzsFr2R.js";import{e as h}from"./index-CAHkfBk_.js";c.init();const e=new l,S=e.get(d),t=S.create();t.name="main";const r=new p(e);r.setup();t.scene=r;const o=document.createElement("bim-viewport"),i=new u(e,o);t.renderer=i;const m=new b(e);t.camera=m;o.addEventListener("resize",()=>{i.resize(),m.updateAspect()});const F=e.get(g);F.create(t);e.init();const I=e.get(w);await I.setup();const n=e.get(f);n.init("https://thatopen.github.io/engine_fragment/resources/worker.mjs");t.camera.controls.addEventListener("rest",()=>n.core.update(!0));n.list.onItemSet.add(async({value:a})=>{a.useCamera(t.camera.three),t.scene.three.add(a.object),await n.core.update(!0)});const[y]=h.modelsList({components:e,metaDataTags:["schema"],actions:{download:!0}}),E=C.create(()=>{const[a]=L.loadFrag({components:e});return v`
22
<bim-panel label="IFC Models">
33
<bim-panel-section label="Importing">
44
${a}

examples/assets/spatialTree.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/assets/topicsList.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be,V as I,N as z,c as Z,d as ee,C as ue,W as fe,S as ye,a as ge,b as $e,G as we,F as ve,I as he}from"./index-DAd_Xb3m.js";import"./index-CG13lMFw.js";import{c as Te,d as D,a as M,b as V,t as ke,v as xe,e as Se}from"./index-BnaeDa9G.js";import{e as Y}from"./ref-CLKbrLVk.js";const Ie={dueDate:e=>{if(typeof e=="string"&&e.trim()!=="")return new Date(e)},status:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},type:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},priority:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},stage:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},assignedTo:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},labels:e=>{if(Array.isArray(e))return new Set(e)}},te=e=>{const{components:l,topic:t,value:i,onCancel:n,onSubmit:s,styles:r}=e,m=s??(()=>{}),d=l.get(U),v=(i==null?void 0:i.title)??(t==null?void 0:t.title)??C.default.title,p=(i==null?void 0:i.status)??(t==null?void 0:t.status)??C.default.status,b=(i==null?void 0:i.type)??(t==null?void 0:t.type)??C.default.type,a=(i==null?void 0:i.priority)??(t==null?void 0:t.priority)??C.default.priority,y=(i==null?void 0:i.assignedTo)??(t==null?void 0:t.assignedTo)??C.default.assignedTo,u=(i==null?void 0:i.labels)??(t==null?void 0:t.labels)??C.default.labels,g=(i==null?void 0:i.stage)??(t==null?void 0:t.stage)??C.default.stage,k=(i==null?void 0:i.description)??(t==null?void 0:t.description)??C.default.description,$=t!=null&&t.dueDate?t.dueDate.toISOString().split("T")[0]:null,f=new Set([...d.config.statuses]);p&&f.add(p);const h=new Set([...d.config.types]);b&&h.add(b);const w=new Set([...d.config.priorities]);a&&w.add(a);const j=new Set([...d.config.users]);y&&j.add(y);const W=new Set([...d.config.labels]);if(u)for(const c of u)W.add(c);const G=new Set([...d.config.stages]);g&&G.add(g);const J=Y(),me=async()=>{const{value:c}=J;if(!c)return;const x=be(c,Ie);if(t)t.set(x),await m(t);else{const B=d.create(x);await m(B)}},H=Y(),de=c=>{const{value:x}=H;if(!x)return;const B=c.target;x.disabled=B.value.trim()===""},Q=`btn-${S.newRandomId()}`,O=`btn-${S.newRandomId()}`;return o`
1+
import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be,V as I,N as z,c as Z,d as ee,C as ue,W as fe,S as ye,a as ge,O as $e,G as we,F as ve,I as he}from"./index-DAd_Xb3m.js";import"./index-CG13lMFw.js";import{c as Te,d as D,a as M,b as V,t as ke,v as xe,e as Se}from"./index-CAHkfBk_.js";import{e as Y}from"./ref-CLKbrLVk.js";const Ie={dueDate:e=>{if(typeof e=="string"&&e.trim()!=="")return new Date(e)},status:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},type:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},priority:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},stage:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},assignedTo:e=>{if(Array.isArray(e)&&e.length!==0)return e[0]},labels:e=>{if(Array.isArray(e))return new Set(e)}},te=e=>{const{components:l,topic:t,value:i,onCancel:n,onSubmit:s,styles:r}=e,m=s??(()=>{}),d=l.get(U),v=(i==null?void 0:i.title)??(t==null?void 0:t.title)??C.default.title,p=(i==null?void 0:i.status)??(t==null?void 0:t.status)??C.default.status,b=(i==null?void 0:i.type)??(t==null?void 0:t.type)??C.default.type,a=(i==null?void 0:i.priority)??(t==null?void 0:t.priority)??C.default.priority,y=(i==null?void 0:i.assignedTo)??(t==null?void 0:t.assignedTo)??C.default.assignedTo,u=(i==null?void 0:i.labels)??(t==null?void 0:t.labels)??C.default.labels,g=(i==null?void 0:i.stage)??(t==null?void 0:t.stage)??C.default.stage,k=(i==null?void 0:i.description)??(t==null?void 0:t.description)??C.default.description,$=t!=null&&t.dueDate?t.dueDate.toISOString().split("T")[0]:null,f=new Set([...d.config.statuses]);p&&f.add(p);const h=new Set([...d.config.types]);b&&h.add(b);const w=new Set([...d.config.priorities]);a&&w.add(a);const j=new Set([...d.config.users]);y&&j.add(y);const W=new Set([...d.config.labels]);if(u)for(const c of u)W.add(c);const G=new Set([...d.config.stages]);g&&G.add(g);const J=Y(),me=async()=>{const{value:c}=J;if(!c)return;const x=be(c,Ie);if(t)t.set(x),await m(t);else{const B=d.create(x);await m(B)}},H=Y(),de=c=>{const{value:x}=H;if(!x)return;const B=c.target;x.disabled=B.value.trim()===""},Q=`btn-${S.newRandomId()}`,E=`btn-${S.newRandomId()}`;return o`
22
<div ${X(J)} style="display: flex; flex-direction: column; gap: 0.75rem;">
33
<div style="display: flex; gap: 0.375rem">
44
<bim-text-input @input=${de} vertical label="Title" name="title" .value=${v}></bim-text-input>
@@ -32,19 +32,19 @@ import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be
3232
<bim-text-input vertical label="Description" name="description" type="area" .value=${k??null}></bim-text-input>
3333
<div style="justify-content: right; display: flex; gap: 0.375rem">
3434
<style>
35-
#${O} {
35+
#${E} {
3636
background-color: transparent;
3737
}
3838
39-
#${O}:hover {
39+
#${E}:hover {
4040
--bim-label--c: #FF5252;
4141
}
4242
4343
#${Q}:hover {
4444
background-color: #329936;
4545
}
4646
</style>
47-
<bim-button id=${O} style="flex: 0" @click=${n} label="Cancel"></bim-button>
47+
<bim-button id=${E} style="flex: 0" @click=${n} label="Cancel"></bim-button>
4848
<bim-button id=${Q} style="flex: 0" @click=${me} ${X(H)} label=${t?"Update Topic":"Add Topic"} icon=${t?"tabler:refresh":"mi:add"}></bim-button>
4949
</div>
5050
</div>
@@ -228,7 +228,7 @@ import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be
228228
<bim-panel-section fixed label="New Topic" name="topic">
229229
${te(e)}
230230
</bim-panel-section>
231-
`,Fe=e=>I.create(Pe,e),Ee=Object.freeze(Object.defineProperty({__proto__:null,topic:Fe},Symbol.toStringTag,{value:"Module"})),Oe={...Ee};S.init();const q=document.createElement("bim-viewport"),T=new ue,ze=T.get(fe),A=ze.create(),se=new ye(T);se.setup();A.scene=se;const ae=new ge(T,q);A.renderer=ae;const K=new $e(T);A.camera=K;K.controls.setLookAt(10,5.5,5,-4,-1,-6.5);q.addEventListener("resize",()=>{ae.resize(),K.updateAspect()});T.init();const Me=T.get(we);Me.create(A);const P=T.get(ve);P.init("https://thatopen.github.io/engine_fragment/resources/worker.mjs");A.camera.controls.addEventListener("rest",()=>P.core.update(!0));P.list.onItemSet.add(async({value:e})=>{e.useCamera(A.camera.three),A.scene.three.add(e.object),await P.core.update(!0)});const re=T.get(he);await re.setup({autoSetWasm:!1,wasm:{path:"https://unpkg.com/[email protected]/",absolute:!0}});const Ve=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),Ue=await Ve.arrayBuffer(),qe=new Uint8Array(Ue);await re.load(qe,!0,"small");const E={"[email protected]":{name:"Jhon Doe",picture:"https://www.profilebakery.com/wp-content/uploads/2023/04/Profile-Image-AI.jpg"},"[email protected]":{name:"User A",picture:"https://www.profilebakery.com/wp-content/uploads/2023/04/Portrait-Photography.jpg"},"[email protected]":{name:"User B",picture:"https://www.profilebakery.com/wp-content/uploads/2023/04/AI-Portrait.jpg"}},_=T.get(U);_.setup({users:new Set(Object.keys(E)),labels:new Set(["Architecture","Structure","MEP"])});const Ke=T.get(ee);_.list.onItemSet.add(({value:e})=>{const l=Ke.create();l.world=A,e.viewpoints.add(l.guid)});const[L]=Se.topicsList({components:T,dataStyles:{users:E}});L.selectableRows=!0;const[Ne,We]=Oe.topic({components:T,styles:{users:E}}),F=I.create(()=>o`
231+
`,Fe=e=>I.create(Pe,e),Oe=Object.freeze(Object.defineProperty({__proto__:null,topic:Fe},Symbol.toStringTag,{value:"Module"})),Ee={...Oe};S.init();const q=document.createElement("bim-viewport"),T=new ue,ze=T.get(fe),A=ze.create(),se=new ye(T);se.setup();A.scene=se;const ae=new ge(T,q);A.renderer=ae;const K=new $e(T);A.camera=K;K.controls.setLookAt(10,5.5,5,-4,-1,-6.5);q.addEventListener("resize",()=>{ae.resize(),K.updateAspect()});T.init();const Me=T.get(we);Me.create(A);const P=T.get(ve);P.init("https://thatopen.github.io/engine_fragment/resources/worker.mjs");A.camera.controls.addEventListener("rest",()=>P.core.update(!0));P.list.onItemSet.add(async({value:e})=>{e.useCamera(A.camera.three),A.scene.three.add(e.object),await P.core.update(!0)});const re=T.get(he);await re.setup({autoSetWasm:!1,wasm:{path:"https://unpkg.com/[email protected]/",absolute:!0}});const Ve=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),Ue=await Ve.arrayBuffer(),qe=new Uint8Array(Ue);await re.load(qe,!0,"small");const O={"[email protected]":{name:"Jhon Doe",picture:"https://www.profilebakery.com/wp-content/uploads/2023/04/Profile-Image-AI.jpg"},"[email protected]":{name:"User A",picture:"https://www.profilebakery.com/wp-content/uploads/2023/04/Portrait-Photography.jpg"},"[email protected]":{name:"User B",picture:"https://www.profilebakery.com/wp-content/uploads/2023/04/AI-Portrait.jpg"}},_=T.get(U);_.setup({users:new Set(Object.keys(O)),labels:new Set(["Architecture","Structure","MEP"])});const Ke=T.get(ee);_.list.onItemSet.add(({value:e})=>{const l=Ke.create();l.world=A,e.viewpoints.add(l.guid)});const[L]=Se.topicsList({components:T,dataStyles:{users:O}});L.selectableRows=!0;const[Ne,We]=Ee.topic({components:T,styles:{users:O}}),F=I.create(()=>o`
232232
<dialog class="form-dialog">
233233
<bim-panel style="border-radius: var(--bim-ui_size-base); width: 22rem;">
234234
${Ne}
@@ -266,7 +266,7 @@ import"./lit-html-BUQgm8fs.js";import{B as U,T as C,u as S,J as X,f as o,z as be
266266
${m}
267267
${r}
268268
</bim-panel>
269-
`},{components:T,world:A,styles:{users:E}});_.list.onItemUpdated.add(()=>ce());L.addEventListener("rowcreated",e=>{const{row:l}=e.detail;l.addEventListener("click",()=>{const{Guid:t}=l.data;if(!t)return;const i=_.list.get(t);i&&ce({topic:i})}),l.style.cursor="pointer",l.addEventListener("mouseover",()=>{l.style.backgroundColor=`color-mix(
269+
`},{components:T,world:A,styles:{users:O}});_.list.onItemUpdated.add(()=>ce());L.addEventListener("rowcreated",e=>{const{row:l}=e.detail;l.addEventListener("click",()=>{const{Guid:t}=l.data;if(!t)return;const i=_.list.get(t);i&&ce({topic:i})}),l.style.cursor="pointer",l.addEventListener("mouseover",()=>{l.style.backgroundColor=`color-mix(
270270
in lab,
271271
var(--bim-ui_bg-contrast-20) 30%,
272272
var(--bim-ui_main-base) 10%

0 commit comments

Comments
 (0)