Update external libs.
This commit is contained in:
parent
5a73dd6f41
commit
d7ecd3790f
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
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
The MIT License
|
The MIT License
|
||||||
|
|
||||||
Copyright © 2010-2021 three.js authors
|
Copyright © 2010-2022 three.js authors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
4
libs/three.min.js
vendored
4
libs/three.min.js
vendored
File diff suppressed because one or more lines are too long
@ -110,7 +110,8 @@
|
|||||||
|
|
||||||
case 'use':
|
case 'use':
|
||||||
style = parseStyle( node, style );
|
style = parseStyle( node, style );
|
||||||
const usedNodeId = node.href.baseVal.substring( 1 );
|
const href = node.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ) || '';
|
||||||
|
const usedNodeId = href.substring( 1 );
|
||||||
const usedNode = node.viewportElement.getElementById( usedNodeId );
|
const usedNode = node.viewportElement.getElementById( usedNodeId );
|
||||||
|
|
||||||
if ( usedNode ) {
|
if ( usedNode ) {
|
||||||
@ -560,7 +561,9 @@
|
|||||||
|
|
||||||
for ( let j = 0; j < selectorList.length; j ++ ) {
|
for ( let j = 0; j < selectorList.length; j ++ ) {
|
||||||
|
|
||||||
stylesheets[ selectorList[ j ] ] = Object.assign( stylesheets[ selectorList[ j ] ] || {}, stylesheet.style );
|
// Remove empty rules
|
||||||
|
const definitions = Object.fromEntries( Object.entries( stylesheet.style ).filter( ( [ , v ] ) => v !== '' ) );
|
||||||
|
stylesheets[ selectorList[ j ] ] = Object.assign( stylesheets[ selectorList[ j ] ] || {}, definitions );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1166,6 +1166,7 @@
|
|||||||
color.r = value;
|
color.r = value;
|
||||||
color.g = value;
|
color.g = value;
|
||||||
color.b = value;
|
color.b = value;
|
||||||
|
color.a = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEXTURE_TYPE.INTENSITY_ALPHA:
|
case TEXTURE_TYPE.INTENSITY_ALPHA:
|
||||||
@ -1182,6 +1183,7 @@
|
|||||||
color.r = parseInt( '0x' + hex.substring( 2, 4 ) );
|
color.r = parseInt( '0x' + hex.substring( 2, 4 ) );
|
||||||
color.g = parseInt( '0x' + hex.substring( 4, 6 ) );
|
color.g = parseInt( '0x' + hex.substring( 4, 6 ) );
|
||||||
color.b = parseInt( '0x' + hex.substring( 6, 8 ) );
|
color.b = parseInt( '0x' + hex.substring( 6, 8 ) );
|
||||||
|
color.a = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEXTURE_TYPE.RGBA:
|
case TEXTURE_TYPE.RGBA:
|
||||||
@ -1247,10 +1249,8 @@
|
|||||||
const width = fieldValues[ 0 ];
|
const width = fieldValues[ 0 ];
|
||||||
const height = fieldValues[ 1 ];
|
const height = fieldValues[ 1 ];
|
||||||
const num_components = fieldValues[ 2 ];
|
const num_components = fieldValues[ 2 ];
|
||||||
const useAlpha = num_components === 2 || num_components === 4;
|
|
||||||
const textureType = getTextureType( num_components );
|
const textureType = getTextureType( num_components );
|
||||||
const size = ( useAlpha === true ? 4 : 3 ) * ( width * height );
|
const data = new Uint8Array( 4 * width * height );
|
||||||
const data = new Uint8Array( size );
|
|
||||||
const color = {
|
const color = {
|
||||||
r: 0,
|
r: 0,
|
||||||
g: 0,
|
g: 0,
|
||||||
@ -1261,27 +1261,15 @@
|
|||||||
for ( let j = 3, k = 0, jl = fieldValues.length; j < jl; j ++, k ++ ) {
|
for ( let j = 3, k = 0, jl = fieldValues.length; j < jl; j ++, k ++ ) {
|
||||||
|
|
||||||
parseHexColor( fieldValues[ j ], textureType, color );
|
parseHexColor( fieldValues[ j ], textureType, color );
|
||||||
|
const stride = k * 4;
|
||||||
if ( useAlpha === true ) {
|
data[ stride + 0 ] = color.r;
|
||||||
|
data[ stride + 1 ] = color.g;
|
||||||
const stride = k * 4;
|
data[ stride + 2 ] = color.b;
|
||||||
data[ stride + 0 ] = color.r;
|
data[ stride + 3 ] = color.a;
|
||||||
data[ stride + 1 ] = color.g;
|
|
||||||
data[ stride + 2 ] = color.b;
|
|
||||||
data[ stride + 3 ] = color.a;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
const stride = k * 3;
|
|
||||||
data[ stride + 0 ] = color.r;
|
|
||||||
data[ stride + 1 ] = color.g;
|
|
||||||
data[ stride + 2 ] = color.b;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
texture = new THREE.DataTexture( data, width, height, useAlpha === true ? THREE.RGBAFormat : THREE.RGBFormat );
|
texture = new THREE.DataTexture( data, width, height );
|
||||||
texture.needsUpdate = true;
|
texture.needsUpdate = true;
|
||||||
texture.__type = textureType; // needed for material modifications
|
texture.__type = textureType; // needed for material modifications
|
||||||
|
|
||||||
|
|||||||
32
package.json
32
package.json
@ -5,19 +5,6 @@
|
|||||||
"repository": "github:kovacsv/Online3DViewer",
|
"repository": "github:kovacsv/Online3DViewer",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
|
||||||
"clean-css-cli": "^5.5.0",
|
|
||||||
"docdash": "^1.2.0",
|
|
||||||
"esbuild": "^0.14.11",
|
|
||||||
"eslint": "^8.5.0",
|
|
||||||
"eslint-plugin-unused-imports": "^2.0.0",
|
|
||||||
"fantasticon": "^1.2.2",
|
|
||||||
"http-server": "^14.0.0",
|
|
||||||
"jsdoc": "^3.6.7",
|
|
||||||
"mocha": "^9.1.3",
|
|
||||||
"oslllo-svg-fixer": "^1.4.0",
|
|
||||||
"svgo": "^2.3.1"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "http-server",
|
"start": "http-server",
|
||||||
"test": "mocha test",
|
"test": "mocha test",
|
||||||
@ -35,13 +22,26 @@
|
|||||||
"build_website_dev": "esbuild source/website/index.js --bundle --minify --global-name=OV --sourcemap --outfile=build/o3dv.website.min-dev.js",
|
"build_website_dev": "esbuild source/website/index.js --bundle --minify --global-name=OV --sourcemap --outfile=build/o3dv.website.min-dev.js",
|
||||||
"build_website_prod": "esbuild source/website/index.js --bundle --minify --global-name=OV --outfile=build/o3dv.website.min.js"
|
"build_website_prod": "esbuild source/website/index.js --bundle --minify --global-name=OV --outfile=build/o3dv.website.min.js"
|
||||||
},
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"clean-css-cli": "^5.5.2",
|
||||||
|
"docdash": "^1.2.0",
|
||||||
|
"esbuild": "^0.14.18",
|
||||||
|
"eslint": "^8.8.0",
|
||||||
|
"eslint-plugin-unused-imports": "^2.0.0",
|
||||||
|
"fantasticon": "^1.2.2",
|
||||||
|
"http-server": "^14.0.0",
|
||||||
|
"jsdoc": "^3.6.10",
|
||||||
|
"mocha": "^9.2.0",
|
||||||
|
"oslllo-svg-fixer": "^2.0.1",
|
||||||
|
"svgo": "^2.3.1"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@simonwep/pickr": "1.8.2",
|
"@simonwep/pickr": "1.8.2",
|
||||||
"draco3d": "1.5.0",
|
"draco3d": "1.5.0",
|
||||||
"fflate": "0.7.2",
|
"fflate": "0.7.3",
|
||||||
"rhino3dm": "7.11.1",
|
"rhino3dm": "7.11.1",
|
||||||
"three": "0.136.0",
|
"three": "0.137.5",
|
||||||
"web-ifc": "0.0.32"
|
"web-ifc": "0.0.33"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"env": {
|
"env": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user