Update external libraries.
This commit is contained in:
parent
e9f989ffea
commit
27c308e308
2
libs/loaders/fflate.min.js
vendored
2
libs/loaders/fflate.min.js
vendored
File diff suppressed because one or more lines are too long
54082
libs/loaders/web-ifc-api-browser.js
Normal file
54082
libs/loaders/web-ifc-api-browser.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -26,10 +26,10 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@simonwep/pickr": "1.8.2",
|
"@simonwep/pickr": "1.8.2",
|
||||||
"draco3d": "1.5.0",
|
"draco3d": "1.5.0",
|
||||||
"fflate": "0.7.1",
|
"fflate": "0.7.2",
|
||||||
"rhino3dm": "7.11.1",
|
"rhino3dm": "7.11.1",
|
||||||
"three": "0.135.0",
|
"three": "0.135.0",
|
||||||
"web-ifc": "0.0.30"
|
"web-ifc": "0.0.32"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"env": {
|
"env": {
|
||||||
@ -45,7 +45,7 @@
|
|||||||
"THREE": "readonly",
|
"THREE": "readonly",
|
||||||
"DracoDecoderModule": "readonly",
|
"DracoDecoderModule": "readonly",
|
||||||
"rhino3dm": "readonly",
|
"rhino3dm": "readonly",
|
||||||
"IfcAPI2": "readonly"
|
"WebIFC": "readonly"
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 12
|
"ecmaVersion": 12
|
||||||
|
|||||||
@ -31,8 +31,8 @@ OV.ImporterIfc = class extends OV.ImporterBase
|
|||||||
ImportContent (fileContent, onFinish)
|
ImportContent (fileContent, onFinish)
|
||||||
{
|
{
|
||||||
if (this.ifc === null) {
|
if (this.ifc === null) {
|
||||||
OV.LoadExternalLibrary ('loaders/web-ifc-api.js').then (() => {
|
OV.LoadExternalLibrary ('loaders/web-ifc-api-browser.js').then (() => {
|
||||||
this.ifc = new IfcAPI2 ();
|
this.ifc = new WebIFC.IfcAPI ();
|
||||||
this.ifc.Init ().then (() => {
|
this.ifc.Init ().then (() => {
|
||||||
this.ImportIfcContent (fileContent);
|
this.ImportIfcContent (fileContent);
|
||||||
onFinish ();
|
onFinish ();
|
||||||
@ -109,9 +109,7 @@ OV.ImporterIfc = class extends OV.ImporterBase
|
|||||||
|
|
||||||
ImportProperties (modelID)
|
ImportProperties (modelID)
|
||||||
{
|
{
|
||||||
// TODO: var IFCRELDEFINESBYPROPERTIES = 4186316022;
|
const lines = this.ifc.GetLineIDsWithType (modelID, WebIFC.IFCRELDEFINESBYPROPERTIES);
|
||||||
// TODO: var IFCBUILDING = 4031249490;
|
|
||||||
const lines = this.ifc.GetLineIDsWithType (modelID, 4186316022);
|
|
||||||
for (let i = 0; i < lines.size (); i++) {
|
for (let i = 0; i < lines.size (); i++) {
|
||||||
const relID = lines.get (i);
|
const relID = lines.get (i);
|
||||||
const rel = this.ifc.GetLine (modelID, relID);
|
const rel = this.ifc.GetLine (modelID, relID);
|
||||||
@ -122,7 +120,7 @@ OV.ImporterIfc = class extends OV.ImporterBase
|
|||||||
let element = this.expressIDToMesh[objectRelID.value];
|
let element = this.expressIDToMesh[objectRelID.value];
|
||||||
if (element === undefined) {
|
if (element === undefined) {
|
||||||
let propSetOwner = this.ifc.GetLine (modelID, objectRelID.value, true);
|
let propSetOwner = this.ifc.GetLine (modelID, objectRelID.value, true);
|
||||||
if (propSetOwner.type === 4031249490) {
|
if (propSetOwner.type === WebIFC.IFCBUILDING) {
|
||||||
element = this.model;
|
element = this.model;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -38,7 +38,7 @@ fflateFileMap = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
webIfcFileMap = [
|
webIfcFileMap = [
|
||||||
[os.path.join ('web-ifc', 'web-ifc-api.js'), os.path.join ('loaders', 'web-ifc-api.js')],
|
[os.path.join ('web-ifc', 'web-ifc-api-browser.js'), os.path.join ('loaders', 'web-ifc-api-browser.js')],
|
||||||
[os.path.join ('web-ifc', 'web-ifc.wasm'), os.path.join ('loaders', 'web-ifc.wasm')],
|
[os.path.join ('web-ifc', 'web-ifc.wasm'), os.path.join ('loaders', 'web-ifc.wasm')],
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -55,11 +55,6 @@ def UpdateModule (fileMap, moduleDir, libsDir):
|
|||||||
PrintInfo ('Copying file ' + os.path.split (src)[1])
|
PrintInfo ('Copying file ' + os.path.split (src)[1])
|
||||||
shutil.copy2 (src, dst)
|
shutil.copy2 (src, dst)
|
||||||
|
|
||||||
def FixWebIfcExport (libsDir):
|
|
||||||
apiFilePath = os.path.join (libsDir, 'loaders', 'web-ifc-api.js')
|
|
||||||
regex = re.compile (r'export \{.*\};', re.DOTALL)
|
|
||||||
Tools.ReplaceRegexInFile (apiFilePath, regex, '')
|
|
||||||
|
|
||||||
def Main (argv):
|
def Main (argv):
|
||||||
toolsDir = os.path.dirname (os.path.abspath (__file__))
|
toolsDir = os.path.dirname (os.path.abspath (__file__))
|
||||||
rootDir = os.path.dirname (toolsDir)
|
rootDir = os.path.dirname (toolsDir)
|
||||||
@ -74,7 +69,6 @@ def Main (argv):
|
|||||||
UpdateModule (rhino3dmFileMap, nodeModulesDir, libsDir)
|
UpdateModule (rhino3dmFileMap, nodeModulesDir, libsDir)
|
||||||
UpdateModule (fflateFileMap, nodeModulesDir, libsDir)
|
UpdateModule (fflateFileMap, nodeModulesDir, libsDir)
|
||||||
UpdateModule (webIfcFileMap, nodeModulesDir, libsDir)
|
UpdateModule (webIfcFileMap, nodeModulesDir, libsDir)
|
||||||
FixWebIfcExport (libsDir)
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,6 @@ OV.Website = class
|
|||||||
}
|
}
|
||||||
let contentHeight = windowHeight - headerHeight;
|
let contentHeight = windowHeight - headerHeight;
|
||||||
|
|
||||||
console.log (contentWidth);
|
|
||||||
OV.SetDomElementOuterHeight (this.parameters.introDiv, contentHeight);
|
OV.SetDomElementOuterHeight (this.parameters.introDiv, contentHeight);
|
||||||
this.navigator.Resize (contentHeight);
|
this.navigator.Resize (contentHeight);
|
||||||
this.sidebar.Resize (contentHeight);
|
this.sidebar.Resize (contentHeight);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user