Skip to content

Commit

Permalink
fix: add streaming file sample
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Feb 22, 2024
1 parent 83f37b7 commit 32a188e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,4 @@ resources/asdf.frag
resources/asdf.json
resources/bbbb.*

resources/*-processed.json
resources/*-processed-properties.json

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openbim-components",
"version": "1.4.0-alpha.17",
"version": "1.4.0",
"main": "src/index.js",
"author": "harry collin, antonio gonzalez viegas",
"license": "MIT",
Expand All @@ -24,7 +24,7 @@
"@types/three": "0.160.0",
"@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.27.0",
"bim-fragment": "1.3.35",
"bim-fragment": "1.4.0",
"cpy-cli": "^3.1.1",
"eslint": "^7.28.0",
"eslint-config-airbnb-base": "^14.2.1",
Expand Down Expand Up @@ -57,7 +57,7 @@
"unzipit": "^1.4.3"
},
"peerDependencies": {
"bim-fragment": "1.3.35",
"bim-fragment": "1.4.0",
"three": "^0.160.1",
"web-ifc": "0.0.51"
}
Expand Down
2 changes: 1 addition & 1 deletion resources/openbim-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -17522,7 +17522,7 @@ function getRaycastedFace(mesh, faceIndex, instance) {
addTriangleToFace(face, iterator, e3, e1, e2, i, raycasted);
}
}
{
if (iterator.found === null) {
if (raycasted.index === i) {
raycasted.island = face.length;
}
Expand Down
1 change: 1 addition & 0 deletions resources/small.ifc-processed-properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"types":{"101040310":[1],"103090709":[2],"160246688":[3],"180925521":[4],"248100487":[5],"263784265":[6],"336235671":[7],"395920057":[8],"448429030":[9],"526551008":[10],"639542469":[11],"747523909":[12],"781010003":[13],"1045800335":[14],"1073191201":[15],"1207048766":[16],"1268542332":[17],"1299126871":[18],"1303795690":[19],"1401173127":[20],"1451395588":[21,22,23],"1457835157":[24],"1529196076":[25],"1714330368":[26],"1765591967":[27],"1838606355":[28],"1898987631":[29],"2022407955":[30],"2022622350":[31],"2077209135":[32],"2199411900":[33],"2533589738":[34],"2597039031":[35],"2655215786":[36],"2889183280":[37],"2949456006":[38],"2963535650":[39],"3124254112":[40],"3171933400":[41],"3181161470":[42],"3242617779":[43],"3303938423":[44],"3304561284":[45],"3355820592":[46],"3495092785":[47],"3512223829":[48],"3588315303":[49],"3650150729":[50],"3945020480":[51],"4017108033":[52],"4031249490":[53],"4097777520":[54],"4186316022":[55,56],"4251960020":[57]},"ids":{"1":57,"5":11,"35":32,"37":57,"38":1,"41":16,"42":9,"43":9,"44":9,"45":9,"46":38,"47":35,"48":37,"49":9,"50":14,"51":14,"52":27,"54":14,"55":27,"57":9,"58":9,"59":9,"60":9,"61":14,"62":14,"63":14,"64":27,"66":9,"67":14,"68":14,"69":27,"71":9,"72":9,"73":9,"74":9,"75":9,"76":9,"77":9,"78":14,"79":14,"80":14,"81":14,"82":27,"84":14,"85":14,"86":27,"88":9,"89":14,"90":14,"91":14,"92":27,"94":14,"95":14,"96":14,"97":14,"98":27,"100":14,"101":14,"102":14,"103":14,"104":27,"106":4,"119":2,"125":46,"129":53,"138":40,"144":40,"148":54,"186":48,"195":28,"205":30,"208":28,"219":30,"222":5,"224":5,"225":5,"226":44,"231":19,"232":29,"234":50,"235":21,"240":50,"241":21,"243":50,"244":21,"250":21,"252":50,"253":21,"255":50,"256":50,"257":21,"259":55,"263":55,"266":55,"269":12,"294":48,"297":19,"298":21,"300":50,"301":21,"303":21,"305":55,"309":55,"312":55,"338":48,"341":19,"342":21,"344":50,"345":21,"347":21,"349":55,"353":55,"356":55,"6470":7,"6471":18,"6475":28,"6482":30,"6485":28,"6492":30,"6495":28,"6502":30,"6505":33,"6518":45,"6521":33,"6523":50,"6524":21,"6526":50,"6527":21,"6529":50,"6530":21,"6532":55,"6536":55,"6539":55,"6542":50,"6543":21,"6545":21,"6547":50,"6548":21,"6563":45,"6566":33,"6568":50,"6569":21,"6571":21,"6573":50,"6574":21,"6576":55,"6580":55,"6583":55,"6595":45,"6598":33,"6600":50,"6601":21,"6603":21,"6605":50,"6606":21,"6608":55,"6612":55,"6615":55,"6627":45,"6630":33,"6632":50,"6633":21,"6635":21,"6637":50,"6638":21,"6640":55,"6644":55,"6647":55,"6659":45,"6662":33,"6664":50,"6665":21,"6667":21,"6669":50,"6670":21,"6672":55,"6676":55,"6679":55,"6691":45,"6694":33,"6696":50,"6697":21,"6699":21,"6701":50,"6702":21,"6704":55,"6708":55,"6711":55,"6723":45,"6726":33,"6728":50,"6729":21,"6731":21,"6733":50,"6734":21,"6736":55,"6740":55,"6743":55,"6755":45,"6758":33,"6760":50,"6761":21,"6763":21,"6765":50,"6766":21,"6768":55,"6772":55,"6775":55,"6787":45,"6790":33,"6792":50,"6793":21,"6795":21,"6797":50,"6798":21,"6800":55,"6804":55,"6807":55,"7758":17,"7760":28,"7767":30,"7770":28,"7777":30,"7780":33,"7792":6,"7795":33,"7797":50,"7798":21,"7800":55,"7804":21,"18740":17,"18742":28,"18749":30,"18752":28,"18759":30,"18762":33,"18774":6,"18777":33,"18779":50,"18780":21,"18782":55,"18786":21,"18799":6,"18802":33,"18804":21,"18806":55,"18819":6,"18822":33,"18824":21,"18826":55,"18839":6,"18842":33,"18844":21,"18846":55,"18859":6,"18862":33,"18864":21,"18866":55,"18879":6,"18882":33,"18884":21,"18886":55,"18899":6,"18902":33,"18904":21,"18906":55,"18919":6,"18922":33,"18924":21,"18926":55,"18939":6,"18942":33,"18944":21,"18946":55,"18959":6,"18962":33,"18964":21,"18966":55,"18979":6,"18982":33,"18984":21,"18986":55,"18999":6,"19002":33,"19004":21,"19006":55,"19019":6,"19022":33,"19024":21,"19026":55,"19039":6,"19042":33,"19044":21,"19046":55,"19059":6,"19062":33,"19064":21,"19066":55,"19079":6,"19082":33,"19084":21,"19086":55,"19099":6,"19102":33,"19104":21,"19106":55,"19119":6,"19122":33,"19124":21,"19126":55,"19139":6,"19142":33,"19144":21,"19146":55,"19159":6,"19162":33,"19164":21,"19166":55,"19179":6,"19182":33,"19184":21,"19186":55,"19199":6,"19202":33,"19204":21,"19206":55,"19219":6,"19222":33,"19224":21,"19226":55,"19239":6,"19242":33,"19244":21,"19246":55,"19259":6,"19262":33,"19264":21,"19266":55,"19279":6,"19282":33,"19284":21,"19286":55,"19299":6,"19302":33,"19304":21,"19306":55,"19319":6,"19322":33,"19324":21,"19326":55,"19339":6,"19342":33,"19344":21,"19346":55,"19359":6,"19362":33,"19364":21,"19366":55,"19379":6,"19382":33,"19384":21,"19386":55,"19399":6,"19402":33,"19404":21,"19406":55,"19419":6,"19422":33,"19424":21,"19426":55,"19439":6,"19442":33,"19444":21,"19446":55,"22472":39,"22473":26,"22474":10,"22479":28,"22480":33,"22492":8,"22495":50,"22496":50,"22497":21,"22499":50,"22500":21,"22502":21,"22504":55,"22508":55,"22511":55,"22514":50,"22515":21,"22517":50,"22518":21,"22520":21,"22551":25,"22554":34,"22555":28,"22562":30,"22565":5,"22566":44,"22569":19,"22570":50,"22571":21,"22573":50,"22574":21,"22576":50,"22577":21,"22579":55,"22583":55,"22586":55,"22589":21,"22591":50,"22592":21,"22594":21,"22620":25,"22623":34,"22624":19,"22625":21,"22627":50,"22628":21,"22630":21,"22632":55,"22636":55,"22639":55,"22642":21,"22644":50,"22645":21,"22647":21,"22655":47,"22678":52,"22680":28,"22687":30,"22705":41,"22708":50,"22709":50,"22710":21,"22712":21,"22732":52,"22748":41,"22751":50,"22752":21,"22754":22,"22772":41,"22788":41,"22804":41,"22820":41,"22836":41,"22852":41,"22868":41,"22884":41,"22900":41,"22916":41,"22936":42,"22952":15,"22955":50,"22956":22,"22958":22,"22980":42,"22996":15,"22999":22,"23001":22,"23023":42,"23039":15,"23042":22,"23044":22,"23062":15,"23078":15,"23098":42,"23114":15,"23117":22,"23119":22,"23141":42,"23157":15,"23160":22,"23162":22,"23184":42,"23200":15,"23203":22,"23205":22,"23227":42,"23243":15,"23246":22,"23248":22,"23270":42,"23286":15,"23289":22,"23291":22,"23313":42,"23329":15,"23332":22,"23334":22,"23352":15,"23368":15,"23384":15,"23400":15,"23420":42,"23436":15,"23439":22,"23441":22,"23463":42,"23479":15,"23482":22,"23484":22,"23502":15,"23518":15,"23534":15,"23550":15,"23566":15,"23582":15,"23602":42,"23618":15,"23621":22,"23623":22,"23645":42,"23661":15,"23664":22,"23666":22,"23688":42,"23704":15,"23707":22,"23709":22,"23727":15,"23747":42,"23763":15,"23766":22,"23768":22,"23790":42,"23806":15,"23809":22,"23811":22,"23829":15,"23849":42,"23865":15,"23868":22,"23870":22,"23875":3,"23921":24,"23922":50,"23923":50,"23924":22,"23926":22,"23928":50,"23929":22,"23931":22,"23933":50,"23934":22,"23936":22,"23938":50,"23939":22,"23941":22,"23943":50,"23944":22,"23946":22,"23948":50,"23949":22,"23951":22,"23953":50,"23954":22,"23956":22,"23958":50,"23959":22,"23961":22,"23963":50,"23964":22,"23966":22,"23968":50,"23969":22,"23971":22,"23973":50,"23974":22,"23976":22,"23978":50,"23979":22,"23981":22,"23983":50,"23984":22,"23986":22,"23988":50,"23989":22,"23991":22,"23993":50,"23994":22,"23996":22,"23998":50,"23999":22,"24001":22,"24003":50,"24004":22,"24006":22,"24008":50,"24009":22,"24011":22,"24013":50,"24014":22,"24016":22,"24018":50,"24019":22,"24021":22,"24023":50,"24024":22,"24026":22,"24028":50,"24029":22,"24031":22,"24033":50,"24034":22,"24036":22,"24038":50,"24039":22,"24041":22,"24043":50,"24044":22,"24046":22,"24048":50,"24049":22,"24051":22,"24053":50,"24054":22,"24056":22,"24058":50,"24059":22,"24061":22,"24063":50,"24064":22,"24066":22,"24068":50,"24069":22,"24071":22,"24073":50,"24074":22,"24076":22,"24078":50,"24079":22,"24081":22,"24083":50,"24084":22,"24086":23,"24088":50,"24089":23,"24091":23,"24093":50,"24094":23,"24096":23,"24098":50,"24099":23,"24101":23,"24103":50,"24104":23,"24106":23,"24108":50,"24109":23,"24111":23,"24113":50,"24114":23,"24116":23,"24118":50,"24119":23,"24121":23,"24123":50,"24124":23,"24126":23,"24128":50,"24129":23,"24131":23,"24133":50,"24134":23,"24136":23,"24138":50,"24139":23,"24141":23,"24143":55,"24147":55,"24150":55,"24154":55,"24157":55,"24161":55,"24164":55,"24168":55,"24171":55,"24175":55,"24178":55,"24182":55,"24185":55,"24189":55,"24192":55,"24196":55,"24199":55,"24203":55,"24206":55,"24210":55,"24213":56,"24217":56,"24220":56,"24224":56,"24227":56,"24231":56,"24234":56,"24238":56,"24241":56,"24245":56,"24248":56,"24252":56,"24255":56,"24259":56,"24262":56,"24266":56,"24269":56,"24273":56,"24276":56,"24280":56,"24283":56,"24287":56,"24290":56,"24294":56,"24297":56,"24301":56,"24304":56,"24308":56,"24311":56,"24315":56,"24318":56,"24322":56,"24325":56,"24329":56,"24332":56,"24336":56,"24339":56,"24343":56,"24346":56,"24350":56,"24353":56,"24357":56,"24360":56,"24364":56,"24367":56,"24371":56,"24374":56,"24378":56,"24381":56,"24385":56,"24388":56,"24392":56,"24395":56,"24399":56,"24402":56,"24406":56,"24409":56,"24413":56,"24416":56,"24420":56,"24423":56,"24427":56,"24430":56,"24434":56,"24437":56,"24441":56,"24444":56,"24448":56,"24451":23,"24453":23,"24459":50,"24460":23,"24462":56,"24466":43,"24519":23,"24521":56,"24525":43,"24529":3,"24533":3,"24537":3,"24542":50,"24543":50,"24544":23,"24546":56,"24550":36,"24553":36,"24556":36,"24559":36,"24562":36,"24565":36,"24568":36,"24571":36,"24574":36,"24577":36,"24580":36,"24583":36,"24586":36,"24589":36,"24592":36,"24595":36,"24598":36,"24601":36,"24604":36,"24607":36,"24610":36,"24613":36,"24616":36,"24619":36,"24622":36,"24625":36,"24628":36,"24631":36,"24634":36,"24637":36,"24640":36,"24643":36,"24646":36,"24649":36,"24652":36,"24655":36,"24658":36,"24661":36,"24664":36,"24667":36,"24670":36,"24673":36,"24676":36,"24679":36,"24682":36,"24685":36,"24688":36,"24691":36,"24694":36,"24697":36,"24700":36,"24703":36,"24706":36,"24709":36,"24712":36,"24715":36,"24719":36,"24735":36,"24754":13,"24757":13,"24760":13,"24763":13,"24766":13,"24769":13,"24772":13,"24775":13,"24778":13,"24781":13,"24784":13,"24787":13,"24790":13,"24793":13,"24796":13,"24799":13,"24802":13,"24805":13,"24808":13,"24811":13,"24814":13,"24817":13,"24820":13,"24823":13,"24826":13,"24829":13,"24832":13,"24835":51,"24840":51,"24845":51,"24850":51,"24868":49,"24873":20,"24897":49,"24900":20,"24923":49,"24926":20,"24949":49,"24952":20,"24975":49,"24978":20,"25001":49,"25004":20,"25027":49,"25030":20,"25053":49,"25056":20,"25079":49,"25082":20,"25106":49,"25109":20,"25119":31,"25121":31,"25123":31,"25125":31,"25127":31,"25129":31,"25131":31,"25133":31},"indexesFile":"small.ifc-processed-properties-indexes"}
1 change: 1 addition & 0 deletions resources/small.ifc-processed.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/fragments/FragmentIfcStreamer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@
await loader.load(geometryData, true, propertiesData);
}

// await loadModel(
// "../../../resources/dm1_ark.ifc-processed.json",
// // "../../../resources/small.ifc-processed-properties.json"
// );
await loadModel(
"../../../resources/small.ifc-processed.json",
// "../../../resources/small.ifc-processed-properties.json"
);

// loader.culler.maxHiddenTime = 3000;
// loader.culler.maxLostTime = 10000;
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1799,16 +1799,16 @@ __metadata:
languageName: node
linkType: hard

"bim-fragment@npm:1.3.35":
version: 1.3.35
resolution: "bim-fragment@npm:1.3.35"
"bim-fragment@npm:1.4.0":
version: 1.4.0
resolution: "bim-fragment@npm:1.4.0"
dependencies:
flatbuffers: ^23.3.3
three-mesh-bvh: 0.7.0
unzipit: 1.4.3
peerDependencies:
three: ^0.160.1
checksum: 9863c6cf0af8d8d7ebfb2d7f694de3c0bae05f69af144ead442c0b2058f8652f49f731241ce60bd27230714035d9f188c254a81d91f4bfde9c940cb159d3e45a
checksum: eb7e4001b96d60e9fdb85d5cf750d88e0b6808340170cda133778caa1760138fcf23ab753cac9ed1d257b8d6b60c2e63fbb12f383975d0a1788d85d2383a16fb
languageName: node
linkType: hard

Expand Down Expand Up @@ -5876,7 +5876,7 @@ __metadata:
"@types/three": 0.160.0
"@typescript-eslint/eslint-plugin": ^4.27.0
"@typescript-eslint/parser": ^4.27.0
bim-fragment: 1.3.35
bim-fragment: 1.4.0
camera-controls: 2.7.3
cpy-cli: ^3.1.1
dexie: ^3.2.3
Expand Down Expand Up @@ -5905,7 +5905,7 @@ __metadata:
unzipit: ^1.4.3
web-ifc: 0.0.51
peerDependencies:
bim-fragment: 1.3.35
bim-fragment: 1.4.0
three: ^0.160.1
web-ifc: 0.0.51
languageName: unknown
Expand Down

0 comments on commit 32a188e

Please sign in to comment.