fix(viewer): fixed three.js imports to hopefully fix fe2 (#1660)
* fix(viewer): fixed three.js imports to hopefully fix fe2 * undoing viewer changes that break preview service
This commit is contained in:
committed by
GitHub
parent
4bea65909d
commit
8f0af9efbd
@@ -14,7 +14,7 @@ const config = {
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
babelOptions: {
|
||||
configFile: path.resolve(__dirname, './babel.config.js')
|
||||
configFile: path.resolve(__dirname, './babel.config.cjs')
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
@@ -8,10 +8,19 @@
|
||||
"url": "https://github.com/specklesystems/speckle-server.git",
|
||||
"directory": "packages/viewer"
|
||||
},
|
||||
"main": "dist/index.cjs.js",
|
||||
"main": "dist/index.cjs",
|
||||
"module": "dist/index.js",
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
"./dist/assets/*": "./dist/assets/*",
|
||||
"./assets/*": "./dist/assets/*"
|
||||
},
|
||||
@@ -59,6 +68,7 @@
|
||||
"@babel/eslint-parser": "^7.18.2",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@rollup/plugin-babel": "^5.3.1",
|
||||
"@types/babel__core": "^7.20.1",
|
||||
"@types/three": "^0.136.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.39.0",
|
||||
"@typescript-eslint/parser": "^5.39.0",
|
||||
|
||||
@@ -20,7 +20,7 @@ const config = {
|
||||
sourcemap
|
||||
},
|
||||
{
|
||||
file: 'dist/index.cjs.js',
|
||||
file: 'dist/index.cjs',
|
||||
format: 'cjs',
|
||||
sourcemap
|
||||
}
|
||||
@@ -38,7 +38,8 @@ const config = {
|
||||
}),
|
||||
babel({
|
||||
extensions: [...DEFAULT_EXTENSIONS, '.ts', '.tsx'],
|
||||
babelHelpers: 'bundled'
|
||||
babelHelpers: 'bundled',
|
||||
configFile: './babel.config.cjs'
|
||||
}),
|
||||
...(isProd ? [terser()] : [])
|
||||
],
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
Vector2,
|
||||
Vector4
|
||||
} from 'three'
|
||||
import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2'
|
||||
import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial.js'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2.js'
|
||||
import { SpeckleRaycaster } from './objects/SpeckleRaycaster'
|
||||
import { ObjectLayers } from './SpeckleRenderer'
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
Vector2,
|
||||
Vector3
|
||||
} from 'three'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2'
|
||||
import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2.js'
|
||||
import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry.js'
|
||||
import MeshBatch from './batching/MeshBatch'
|
||||
import { Geometry } from './converter/Geometry'
|
||||
import SpeckleGhostMaterial from './materials/SpeckleGhostMaterial'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as THREE from 'three'
|
||||
import Stats from 'three/examples/jsm/libs/stats.module'
|
||||
import Stats from 'three/examples/jsm/libs/stats.module.js'
|
||||
|
||||
import ViewerObjectLoader from './ViewerObjectLoader'
|
||||
import EventEmitter from './EventEmitter'
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
Vector4,
|
||||
WebGLRenderer
|
||||
} from 'three'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2'
|
||||
import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2.js'
|
||||
import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry.js'
|
||||
import { Geometry } from '../converter/Geometry'
|
||||
import SpeckleLineMaterial from '../materials/SpeckleLineMaterial'
|
||||
import { ObjectLayers } from '../SpeckleRenderer'
|
||||
|
||||
@@ -16,9 +16,9 @@ import {
|
||||
Vector2,
|
||||
Vector3
|
||||
} from 'three'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2'
|
||||
import { LineSegments2 } from 'three/examples/jsm/lines/LineSegments2.js'
|
||||
import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry.js'
|
||||
import { ObjectLayers } from '../SpeckleRenderer'
|
||||
import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeometry'
|
||||
import { Geometry } from '../converter/Geometry'
|
||||
import SpeckleLineMaterial from '../materials/SpeckleLineMaterial'
|
||||
import { SpeckleText } from '../objects/SpeckleText'
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Texture,
|
||||
ZeroFactor
|
||||
} from 'three'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass.js'
|
||||
import { speckleApplyAoFrag } from '../materials/shaders/speckle-apply-ao-frag'
|
||||
import { speckleApplyAoVert } from '../materials/shaders/speckle-apply-ao-vert'
|
||||
import { Pipeline, RenderType } from './Pipeline'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NoBlending, ShaderMaterial, Texture, UniformsUtils } from 'three'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass.js'
|
||||
import { CopyShader } from 'three/examples/jsm/shaders/CopyShader.js'
|
||||
import { speckleCopyOutputFrag } from '../materials/shaders/speckle-copy-output-frag'
|
||||
import { speckleCopyOutputVert } from '../materials/shaders/speckle-copy-output-vert'
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Vector2,
|
||||
WebGLRenderTarget
|
||||
} from 'three'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass.js'
|
||||
import { speckleSaoFrag } from '../materials/shaders/speckle-sao-frag'
|
||||
import { speckleSaoVert } from '../materials/shaders/speckle-sao-vert'
|
||||
import { SAOShader } from 'three/examples/jsm/shaders/SAOShader.js'
|
||||
|
||||
@@ -19,11 +19,11 @@ import {
|
||||
Vector4,
|
||||
WebGLRenderTarget
|
||||
} from 'three'
|
||||
import { FullScreenQuad } from 'three/examples/jsm/postprocessing/Pass'
|
||||
import { FullScreenQuad } from 'three/examples/jsm/postprocessing/Pass.js'
|
||||
import {
|
||||
BlurShaderUtils,
|
||||
DepthLimitedBlurShader
|
||||
} from 'three/examples/jsm/shaders/DepthLimitedBlurShader'
|
||||
} from 'three/examples/jsm/shaders/DepthLimitedBlurShader.js'
|
||||
import SpeckleDepthMaterial from '../materials/SpeckleDepthMaterial'
|
||||
import SpeckleShadowcatcherMaterial from '../materials/SpeckleShadowcatcherMaterial'
|
||||
import { DefaultShadowcatcherConfig, ShadowcatcherConfig } from '../Shadowcatcher'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Camera, Plane, Scene, Texture } from 'three'
|
||||
import { Pass } from 'three/examples/jsm/postprocessing/Pass'
|
||||
import { Pass } from 'three/examples/jsm/postprocessing/Pass.js'
|
||||
import { ObjectLayers } from '../SpeckleRenderer'
|
||||
import { RenderType } from './Pipeline'
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
WebGLRenderer,
|
||||
WebGLRenderTarget
|
||||
} from 'three'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass'
|
||||
import { FullScreenQuad, Pass } from 'three/examples/jsm/postprocessing/Pass.js'
|
||||
|
||||
import { speckleStaticAoGenerateVert } from '../materials/shaders/speckle-static-ao-generate-vert'
|
||||
import { speckleStaticAoGenerateFrag } from '../materials/shaders/speckle-static-ao-generate-frag'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2019",
|
||||
"module": "es2020",
|
||||
"lib": ["DOM"],
|
||||
"moduleResolution": "Node",
|
||||
"module": "es2020",
|
||||
"moduleResolution": "Bundler",
|
||||
"strict": false,
|
||||
"sourceMap": true,
|
||||
"isolatedModules": true,
|
||||
|
||||
@@ -11508,6 +11508,7 @@ __metadata:
|
||||
"@babel/preset-env": ^7.20.2
|
||||
"@rollup/plugin-babel": ^5.3.1
|
||||
"@speckle/objectloader": "workspace:^"
|
||||
"@types/babel__core": ^7.20.1
|
||||
"@types/flat": ^5.0.2
|
||||
"@types/three": ^0.136.0
|
||||
"@typescript-eslint/eslint-plugin": ^5.39.0
|
||||
@@ -14808,6 +14809,19 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/babel__core@npm:^7.20.1":
|
||||
version: 7.20.1
|
||||
resolution: "@types/babel__core@npm:7.20.1"
|
||||
dependencies:
|
||||
"@babel/parser": ^7.20.7
|
||||
"@babel/types": ^7.20.7
|
||||
"@types/babel__generator": "*"
|
||||
"@types/babel__template": "*"
|
||||
"@types/babel__traverse": "*"
|
||||
checksum: 9fcd9691a33074802d9057ff70b0e3ff3778f52470475b68698a0f6714fbe2ccb36c16b43dc924eb978cd8a81c1f845e5ff4699e7a47606043b539eb8c6331a8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/babel__generator@npm:*":
|
||||
version: 7.6.4
|
||||
resolution: "@types/babel__generator@npm:7.6.4"
|
||||
|
||||
Reference in New Issue
Block a user