Skip to content

Commit

Permalink
Merge pull request #627 from gkjohnson/remove-exports
Browse files Browse the repository at this point in the history
Remove unneeded exports
  • Loading branch information
gkjohnson authored Apr 16, 2024
2 parents ed24864 + c2220a2 commit fdf3437
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 289 deletions.
2 changes: 1 addition & 1 deletion example/graphing.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as THREE from 'three';
import GUI from 'three/examples/jsm/libs/lil-gui.module.min.js';
import { GraphMaterial } from '../src/index.js';
import { GraphMaterial } from '../src/materials/debug/GraphMaterial.js';
import * as BSDFGLSL from '../src/shader/bsdf/index.js';
import * as CommonGLSL from '../src/shader/common/index.js';

Expand Down
4 changes: 1 addition & 3 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { LDrawUtils } from 'three/examples/jsm/utils/LDrawUtils.js';
import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
import Stats from 'three/examples/jsm/libs/stats.module.js';
import { generateRadialFloorTexture } from './utils/generateRadialFloorTexture.js';
import { MaterialReducer, GradientEquirectTexture, WebGLPathTracer } from '../src/index.js';
import { GradientEquirectTexture, WebGLPathTracer } from '../src/index.js';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
import { getScaledSettings } from './utils/getScaledSettings.js';
import { LoaderElement } from './utils/LoaderElement.js';
Expand Down Expand Up @@ -615,8 +615,6 @@ async function updateModel() {
box.setFromObject( model );
floorPlane.position.y = box.min.y;

const reducer = new MaterialReducer();
reducer.process( model );
scene.add( model );

await pathTracer.setSceneAsync( scene, activeCamera, {
Expand Down
8 changes: 2 additions & 6 deletions example/lkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
import Stats from 'three/examples/jsm/libs/stats.module.js';
import { generateRadialFloorTexture } from './utils/generateRadialFloorTexture.js';
import { PathTracingSceneGenerator } from '../src/core/PathTracingSceneGenerator.js';
import { PhysicalPathTracingMaterial, QuiltPathTracingRenderer, MaterialReducer, PhysicalCamera } from '../src/index.js';
import { PhysicalCamera } from '../src/index.js';
import { FullScreenQuad } from 'three/examples/jsm/postprocessing/Pass.js';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
import { QuiltPreviewMaterial } from './materials/QuiltPreviewMaterial.js';
import { QuiltPathTracingRenderer } from '../src/core/QuiltPathTracingRenderer.js';

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

// initialize the quilt renderer
ptRenderer = new QuiltPathTracingRenderer( renderer );
ptRenderer.material = new PhysicalPathTracingMaterial();
ptRenderer.tiles.set( params.tiles, params.tiles );
ptRenderer.camera = camera;

Expand Down Expand Up @@ -273,10 +273,6 @@ async function init() {
group.add( model, floorPlane );
group.updateMatrixWorld( true );

// dedupe materials
const reducer = new MaterialReducer();
reducer.process( group );

generator = new PathTracingSceneGenerator();
return generator.generate( group, { onProgress: v => {

Expand Down
2 changes: 1 addition & 1 deletion example/materials/QuiltPreviewMaterial.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Vector2, CustomBlending } from 'three';
import { MaterialBase } from '../../src/index.js';
import { MaterialBase } from '../../src/materials/MaterialBase.js';

export class QuiltPreviewMaterial extends MaterialBase {

Expand Down
6 changes: 1 addition & 5 deletions example/viewerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.j
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
import { MaterialReducer, WebGLPathTracer } from '../src/index.js';
import { WebGLPathTracer } from '../src/index.js';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
import { ParallelMeshBVHWorker } from 'three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js';
import { LoaderElement } from './utils/LoaderElement.js';
Expand Down Expand Up @@ -362,10 +362,6 @@ async function updateModel() {

model = gltf.scene;

// reduce the used materials
const reducer = new MaterialReducer();
reducer.process( model );

const targetsToDisconnect = [];
model.traverse( c => {

Expand Down
256 changes: 0 additions & 256 deletions src/core/MaterialReducer.js

This file was deleted.

21 changes: 4 additions & 17 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// core
export * from './core/PathTracingRenderer.js';
export * from './core/QuiltPathTracingRenderer.js';
export * from './core/PathTracingSceneGenerator.js';
export * from './core/MaterialReducer.js';
export * from './core/WebGLPathTracer.js';

// objects
Expand All @@ -15,24 +12,14 @@ export * from './objects/ShapedAreaLight.js';
export * from './textures/ProceduralEquirectTexture.js';
export * from './textures/GradientEquirectTexture.js';

// uniforms
export * from './uniforms/MaterialsTexture.js';
export * from './uniforms/RenderTarget2DArray.js';
export * from './uniforms/EquirectHdrInfoUniform.js';
export * from './uniforms/PhysicalCameraUniform.js';
export * from './uniforms/LightsInfoUniformStruct.js';

// utils
export * from './utils/BlurredEnvMapGenerator.js';
export * from './utils/IESLoader.js';

// materials
export * from './materials/fullscreen/DenoiseMaterial.js';
export * from './materials/fullscreen/GradientMapMaterial.js';
export * from './materials/debug/GraphMaterial.js';
export * from './materials/MaterialBase.js';
export * from './materials/pathtracing/PhysicalPathTracingMaterial.js';
export * from './materials/surface/FogVolumeMaterial.js';

// detectors
export * from './detectors/CompatibilityDetector.js';
// deprecated
export * from './utils/IESLoader.js';
export * from './materials/pathtracing/PhysicalPathTracingMaterial.js';
export * from './core/PathTracingRenderer.js';

0 comments on commit fdf3437

Please sign in to comment.