Skip to content

Commit fdf3437

Browse files
authored
Merge pull request #627 from gkjohnson/remove-exports
Remove unneeded exports
2 parents ed24864 + c2220a2 commit fdf3437

File tree

7 files changed

+10
-289
lines changed

7 files changed

+10
-289
lines changed

example/graphing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as THREE from 'three';
22
import GUI from 'three/examples/jsm/libs/lil-gui.module.min.js';
3-
import { GraphMaterial } from '../src/index.js';
3+
import { GraphMaterial } from '../src/materials/debug/GraphMaterial.js';
44
import * as BSDFGLSL from '../src/shader/bsdf/index.js';
55
import * as CommonGLSL from '../src/shader/common/index.js';
66

example/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { LDrawUtils } from 'three/examples/jsm/utils/LDrawUtils.js';
2424
import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
2525
import Stats from 'three/examples/jsm/libs/stats.module.js';
2626
import { generateRadialFloorTexture } from './utils/generateRadialFloorTexture.js';
27-
import { MaterialReducer, GradientEquirectTexture, WebGLPathTracer } from '../src/index.js';
27+
import { GradientEquirectTexture, WebGLPathTracer } from '../src/index.js';
2828
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
2929
import { getScaledSettings } from './utils/getScaledSettings.js';
3030
import { LoaderElement } from './utils/LoaderElement.js';
@@ -615,8 +615,6 @@ async function updateModel() {
615615
box.setFromObject( model );
616616
floorPlane.position.y = box.min.y;
617617

618-
const reducer = new MaterialReducer();
619-
reducer.process( model );
620618
scene.add( model );
621619

622620
await pathTracer.setSceneAsync( scene, activeCamera, {

example/lkg.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
2424
import Stats from 'three/examples/jsm/libs/stats.module.js';
2525
import { generateRadialFloorTexture } from './utils/generateRadialFloorTexture.js';
2626
import { PathTracingSceneGenerator } from '../src/core/PathTracingSceneGenerator.js';
27-
import { PhysicalPathTracingMaterial, QuiltPathTracingRenderer, MaterialReducer, PhysicalCamera } from '../src/index.js';
27+
import { PhysicalCamera } from '../src/index.js';
2828
import { FullScreenQuad } from 'three/examples/jsm/postprocessing/Pass.js';
2929
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
3030
import { QuiltPreviewMaterial } from './materials/QuiltPreviewMaterial.js';
31+
import { QuiltPathTracingRenderer } from '../src/core/QuiltPathTracingRenderer.js';
3132

3233
import { LookingGlassWebXRPolyfill, LookingGlassConfig } from '@lookingglass/webxr/dist/@lookingglass/webxr.js';
3334
import { VRButton } from 'three/examples/jsm/webxr/VRButton.js';
@@ -135,7 +136,6 @@ async function init() {
135136

136137
// initialize the quilt renderer
137138
ptRenderer = new QuiltPathTracingRenderer( renderer );
138-
ptRenderer.material = new PhysicalPathTracingMaterial();
139139
ptRenderer.tiles.set( params.tiles, params.tiles );
140140
ptRenderer.camera = camera;
141141

@@ -273,10 +273,6 @@ async function init() {
273273
group.add( model, floorPlane );
274274
group.updateMatrixWorld( true );
275275

276-
// dedupe materials
277-
const reducer = new MaterialReducer();
278-
reducer.process( group );
279-
280276
generator = new PathTracingSceneGenerator();
281277
return generator.generate( group, { onProgress: v => {
282278

example/materials/QuiltPreviewMaterial.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Vector2, CustomBlending } from 'three';
2-
import { MaterialBase } from '../../src/index.js';
2+
import { MaterialBase } from '../../src/materials/MaterialBase.js';
33

44
export class QuiltPreviewMaterial extends MaterialBase {
55

example/viewerTest.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.j
1515
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
1616
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
1717
import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
18-
import { MaterialReducer, WebGLPathTracer } from '../src/index.js';
18+
import { WebGLPathTracer } from '../src/index.js';
1919
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
2020
import { ParallelMeshBVHWorker } from 'three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js';
2121
import { LoaderElement } from './utils/LoaderElement.js';
@@ -362,10 +362,6 @@ async function updateModel() {
362362

363363
model = gltf.scene;
364364

365-
// reduce the used materials
366-
const reducer = new MaterialReducer();
367-
reducer.process( model );
368-
369365
const targetsToDisconnect = [];
370366
model.traverse( c => {
371367

src/core/MaterialReducer.js

Lines changed: 0 additions & 256 deletions
This file was deleted.

src/index.js

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// core
2-
export * from './core/PathTracingRenderer.js';
3-
export * from './core/QuiltPathTracingRenderer.js';
42
export * from './core/PathTracingSceneGenerator.js';
5-
export * from './core/MaterialReducer.js';
63
export * from './core/WebGLPathTracer.js';
74

85
// objects
@@ -15,24 +12,14 @@ export * from './objects/ShapedAreaLight.js';
1512
export * from './textures/ProceduralEquirectTexture.js';
1613
export * from './textures/GradientEquirectTexture.js';
1714

18-
// uniforms
19-
export * from './uniforms/MaterialsTexture.js';
20-
export * from './uniforms/RenderTarget2DArray.js';
21-
export * from './uniforms/EquirectHdrInfoUniform.js';
22-
export * from './uniforms/PhysicalCameraUniform.js';
23-
export * from './uniforms/LightsInfoUniformStruct.js';
24-
2515
// utils
2616
export * from './utils/BlurredEnvMapGenerator.js';
27-
export * from './utils/IESLoader.js';
2817

2918
// materials
3019
export * from './materials/fullscreen/DenoiseMaterial.js';
31-
export * from './materials/fullscreen/GradientMapMaterial.js';
32-
export * from './materials/debug/GraphMaterial.js';
33-
export * from './materials/MaterialBase.js';
34-
export * from './materials/pathtracing/PhysicalPathTracingMaterial.js';
3520
export * from './materials/surface/FogVolumeMaterial.js';
3621

37-
// detectors
38-
export * from './detectors/CompatibilityDetector.js';
22+
// deprecated
23+
export * from './utils/IESLoader.js';
24+
export * from './materials/pathtracing/PhysicalPathTracingMaterial.js';
25+
export * from './core/PathTracingRenderer.js';

0 commit comments

Comments
 (0)