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
|
||||
|
||||
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
|
||||
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':
|
||||
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 );
|
||||
|
||||
if ( usedNode ) {
|
||||
@ -560,7 +561,9 @@
|
||||
|
||||
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.g = value;
|
||||
color.b = value;
|
||||
color.a = 1;
|
||||
break;
|
||||
|
||||
case TEXTURE_TYPE.INTENSITY_ALPHA:
|
||||
@ -1182,6 +1183,7 @@
|
||||
color.r = parseInt( '0x' + hex.substring( 2, 4 ) );
|
||||
color.g = parseInt( '0x' + hex.substring( 4, 6 ) );
|
||||
color.b = parseInt( '0x' + hex.substring( 6, 8 ) );
|
||||
color.a = 1;
|
||||
break;
|
||||
|
||||
case TEXTURE_TYPE.RGBA:
|
||||
@ -1247,10 +1249,8 @@
|
||||
const width = fieldValues[ 0 ];
|
||||
const height = fieldValues[ 1 ];
|
||||
const num_components = fieldValues[ 2 ];
|
||||
const useAlpha = num_components === 2 || num_components === 4;
|
||||
const textureType = getTextureType( num_components );
|
||||
const size = ( useAlpha === true ? 4 : 3 ) * ( width * height );
|
||||
const data = new Uint8Array( size );
|
||||
const data = new Uint8Array( 4 * width * height );
|
||||
const color = {
|
||||
r: 0,
|
||||
g: 0,
|
||||
@ -1261,27 +1261,15 @@
|
||||
for ( let j = 3, k = 0, jl = fieldValues.length; j < jl; j ++, k ++ ) {
|
||||
|
||||
parseHexColor( fieldValues[ j ], textureType, color );
|
||||
|
||||
if ( useAlpha === true ) {
|
||||
|
||||
const stride = k * 4;
|
||||
data[ stride + 0 ] = color.r;
|
||||
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;
|
||||
|
||||
}
|
||||
const stride = k * 4;
|
||||
data[ stride + 0 ] = color.r;
|
||||
data[ stride + 1 ] = color.g;
|
||||
data[ stride + 2 ] = color.b;
|
||||
data[ stride + 3 ] = color.a;
|
||||
|
||||
}
|
||||
|
||||
texture = new THREE.DataTexture( data, width, height, useAlpha === true ? THREE.RGBAFormat : THREE.RGBFormat );
|
||||
texture = new THREE.DataTexture( data, width, height );
|
||||
texture.needsUpdate = true;
|
||||
texture.__type = textureType; // needed for material modifications
|
||||
|
||||
|
||||
32
package.json
32
package.json
@ -5,19 +5,6 @@
|
||||
"repository": "github:kovacsv/Online3DViewer",
|
||||
"license": "MIT",
|
||||
"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": {
|
||||
"start": "http-server",
|
||||
"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_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": {
|
||||
"@simonwep/pickr": "1.8.2",
|
||||
"draco3d": "1.5.0",
|
||||
"fflate": "0.7.2",
|
||||
"fflate": "0.7.3",
|
||||
"rhino3dm": "7.11.1",
|
||||
"three": "0.136.0",
|
||||
"web-ifc": "0.0.32"
|
||||
"three": "0.137.5",
|
||||
"web-ifc": "0.0.33"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user