Skip to content

Commit

Permalink
Discard materialLibrary (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
turner authored Nov 4, 2024
1 parent c2efbf5 commit eaae9ac
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 207 deletions.
10 changes: 0 additions & 10 deletions glsl/diffuse_cube.frag

This file was deleted.

21 changes: 0 additions & 21 deletions glsl/diffuse_cube.vert

This file was deleted.

17 changes: 0 additions & 17 deletions glsl/show_st.frag

This file was deleted.

7 changes: 0 additions & 7 deletions glsl/show_st.vert

This file was deleted.

61 changes: 0 additions & 61 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,67 +45,6 @@
<!-- Google Platform JS -->
<script src="https://apis.google.com/js/platform.js"></script>

<!-- helpful shaders -->
<script type="x-shader/x-vertex" id="diffuse_cube_vert">

vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}

// vNormalWorldSpace - world space
varying vec3 vNormalWorldSpace;

// vNormalEyeSpace - the eye space normal
varying vec3 vNormalEyeSpace;
void main() {

// Use the normalMatrix to convert the world space normal eye space
// normalMatrix = transpose( inverse( modelViewMatrix ) )
vNormalEyeSpace = normalMatrix * vec4(normal, 1.0).xyz;

vNormalWorldSpace = inverseTransformDirection(vNormalEyeSpace, viewMatrix);

gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4( position, 1.0 );
}
</script>

<script type="x-shader/x-fragment" id="diffuse_cube_frag">
uniform samplerCube cubicMap;
varying vec3 vNormalWorldSpace;
varying vec3 vNormalEyeSpace;
void main() {
vec3 index = vec3(-vNormalWorldSpace.x, vNormalWorldSpace.y, vNormalWorldSpace.z);
vec3 rgb = textureCube(cubicMap, index).rgb;
gl_FragColor = vec4(rgb, 1.0);
}
</script>

<script type="x-shader/x-vertex" id="show_st_vert">
varying vec2 vST;
void main() {
vST = uv;
gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4( position, 1.0 );
}
</script>

<script type="x-shader/x-fragment" id="show_st_frag">
uniform int showS;
uniform int showT;
varying vec2 vST;
void main() {

if (showS == 1 && showT == 1) {
gl_FragColor = vec4(vST.s, vST.t, 0.0, 1.0);
} else if (showS == 1 && showT == 0) {
gl_FragColor = vec4(vST.s, 0.0, 0.0, 1.0);
} else if (showS == 0 && showT == 1){
gl_FragColor = vec4(0.0, vST.t, 0.0, 1.0);
} else {
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}
}
</script>

<!-- Spacewalk app entrypoint -->
<script type="module" src="./js/app.js"></script>
</head>
Expand Down
3 changes: 0 additions & 3 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import IGVPanel from "./IGVPanel.js";
import JuiceboxPanel from "./juicebox/juiceboxPanel.js";
import { appleCrayonColorRGB255, appleCrayonColorThreeJS, highlightColor } from "./utils/colorUtils.js";
import {getUrlParams, toJSON, loadSession, uncompressSessionURL} from "./spacewalkSession.js"
import { initializeMaterialLibrary } from "./utils/materialLibrary.js";
import RenderContainerController from "./renderContainerController.js";
import {createSpacewalkFileLoaders} from './spacewalkFileLoad.js'
import BallHighlighter from "./ballHighlighter.js";
Expand Down Expand Up @@ -124,8 +123,6 @@ const initializationHelper = async container => {
$('.popover-dismiss').popover({ trigger: 'focus' })


await initializeMaterialLibrary()

pointCloud = new PointCloud({ pickHighlighter: new PointCloudHighlighter(), deemphasizedColor: appleCrayonColorThreeJS('magnesium') })

ribbon = new Ribbon();
Expand Down
1 change: 0 additions & 1 deletion js/sceneManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import GroundPlane, { groundPlaneConfigurator } from './groundPlane.js'
import Gnomon, { gnomonConfigurator } from './gnomon.js'
import {getMouseXY, setMaterialProvider, unsetDataMaterialProviderCheckbox} from "./utils/utils.js"
import { appleCrayonColorThreeJS } from "./utils/colorUtils.js"
import { sceneBackgroundTexture, sceneBackgroundDiagnosticTexture } from "./utils/materialLibrary.js"
import Ribbon from './ribbon.js'
import {degrees} from "./utils/mathUtils.js"
import {configureColorPicker, updateColorPicker} from "./guiManager.js"
Expand Down
87 changes: 0 additions & 87 deletions js/utils/materialLibrary.js

This file was deleted.

0 comments on commit eaae9ac

Please sign in to comment.