Skip to content

Commit 77ac034

Browse files
committed
rename sculptToMinimalGlitchRenderer -> sculptToMinimalRenderer and sculpToMinimalRenderer to sculpToMinimalHTMLRenderer
1 parent a0d5004 commit 77ac034

8 files changed

+263
-261
lines changed

converters/convertMinimalRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ const fileName = pieces[pieces.length-1].split('.')[0];
1111

1212
//factor out and make version for each target
1313

14-
fs.writeFileSync('./out/' + fileName + '.html', converters.sculptToMinimalRenderer(src));
14+
fs.writeFileSync('./out/' + fileName + '.html', converters.sculptToMinimalHTMLRenderer(src));

dist/shader-park-core.cjs.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67903,7 +67903,7 @@ function sculptToOfflineRenderer(source) {
6790367903
* output - a fully self-contained lightweight html file which renders the sculpture
6790467904
**/
6790567905

67906-
function sculptToMinimalRenderer(source) {
67906+
function sculptToMinimalHTMLRenderer(source) {
6790767907
var minimalHeader = "\nprecision highp float;\n#define GLSL_NEED_ROUND\nuniform float w_width;\nuniform float w_height;\nuniform mat4 projectionMatrix;\n#define cameraPosition vec3(0.0,0.0,-1.0)\n#define vUv vec2(0.0)\n#define worldPos vec4(vec2((gl_FragCoord.x/w_width-0.5)*(w_width/w_height),gl_FragCoord.y/w_height-0.5)*1.75,0.0,0.0)\n";
6790867908
var generatedGLSL = sculptToGLSL(source);
6790967909
var fullFrag = minimalHeader + usePBRHeader + useHemisphereLight + uniformsToGLSL(generatedGLSL.uniforms) + 'const float STEP_SIZE_CONSTANT = ' + generatedGLSL.stepSizeConstant + ';\n' + sculptureStarterCode + generatedGLSL.geoGLSL + '\n' + generatedGLSL.colorGLSL + '\n' + fragFooter;
@@ -67916,12 +67916,12 @@ function sculptToMinimalRenderer(source) {
6791667916
* output - a fully self-contained lightweight html file which renders the sculpture
6791767917
**/
6791867918

67919-
function sculptToMinimalGlitchRenderer(canvas, source) {
67919+
function sculptToMinimalRenderer(canvas, source) {
6792067920
if (typeof source === "function") {
6792167921
source = source.toString();
6792267922
source = source.slice(source.indexOf("{") + 1, source.lastIndexOf("}"));
6792367923
} else if (!(typeof source === "string")) {
67924-
throw "sculptToMinimalGlitchRenderer requires the source code to be a function, or a string";
67924+
throw "sculptToMinimalRenderer requires the source code to be a function, or a string";
6792567925
}
6792667926

6792767927
var minimalHeader = "\nprecision highp float;\n#define GLSL_NEED_ROUND\nuniform float w_width;\nuniform float w_height;\nuniform mat4 projectionMatrix;\n#define cameraPosition vec3(0.0,0.0,-1.0)\n#define vUv vec2(0.0)\n#define worldPos vec4(vec2((gl_FragCoord.x/w_width-0.5)*(w_width/w_height),gl_FragCoord.y/w_height-0.5)*1.75,0.0,0.0)\n";
@@ -68057,7 +68057,7 @@ function sculptToTouchDesignerShaderSource(source) {
6805768057
};
6805868058
}
6805968059

68060-
console.log('using shader-park version: 0.0.13'); /// Generate code for various targets
68060+
console.log('using shader-park version: 0.0.14'); /// Generate code for various targets
6806168061

6806268062
exports.createSculpture = createSculpture;
6806368063
exports.createSculptureWithGeometry = createSculptureWithGeometry;
@@ -68067,7 +68067,7 @@ exports.glslToThreeJSMaterial = glslToThreeJSMaterial;
6806768067
exports.glslToThreeJSMesh = glslToThreeJSMesh;
6806868068
exports.glslToThreeJSShaderSource = glslToThreeJSShaderSource;
6806968069
exports.glslToTouchDesignerShaderSource = glslToTouchDesignerShaderSource;
68070-
exports.sculptToMinimalGlitchRenderer = sculptToMinimalGlitchRenderer;
68070+
exports.sculptToMinimalHTMLRenderer = sculptToMinimalHTMLRenderer;
6807168071
exports.sculptToMinimalRenderer = sculptToMinimalRenderer;
6807268072
exports.sculptToOfflineRenderer = sculptToOfflineRenderer;
6807368073
exports.sculptToRawSDF4Meshing = sculptToRawSDF4Meshing;

dist/shader-park-core.esm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67899,7 +67899,7 @@ function sculptToOfflineRenderer(source) {
6789967899
* output - a fully self-contained lightweight html file which renders the sculpture
6790067900
**/
6790167901

67902-
function sculptToMinimalRenderer(source) {
67902+
function sculptToMinimalHTMLRenderer(source) {
6790367903
var minimalHeader = "\nprecision highp float;\n#define GLSL_NEED_ROUND\nuniform float w_width;\nuniform float w_height;\nuniform mat4 projectionMatrix;\n#define cameraPosition vec3(0.0,0.0,-1.0)\n#define vUv vec2(0.0)\n#define worldPos vec4(vec2((gl_FragCoord.x/w_width-0.5)*(w_width/w_height),gl_FragCoord.y/w_height-0.5)*1.75,0.0,0.0)\n";
6790467904
var generatedGLSL = sculptToGLSL(source);
6790567905
var fullFrag = minimalHeader + usePBRHeader + useHemisphereLight + uniformsToGLSL(generatedGLSL.uniforms) + 'const float STEP_SIZE_CONSTANT = ' + generatedGLSL.stepSizeConstant + ';\n' + sculptureStarterCode + generatedGLSL.geoGLSL + '\n' + generatedGLSL.colorGLSL + '\n' + fragFooter;
@@ -67912,12 +67912,12 @@ function sculptToMinimalRenderer(source) {
6791267912
* output - a fully self-contained lightweight html file which renders the sculpture
6791367913
**/
6791467914

67915-
function sculptToMinimalGlitchRenderer(canvas, source) {
67915+
function sculptToMinimalRenderer(canvas, source) {
6791667916
if (typeof source === "function") {
6791767917
source = source.toString();
6791867918
source = source.slice(source.indexOf("{") + 1, source.lastIndexOf("}"));
6791967919
} else if (!(typeof source === "string")) {
67920-
throw "sculptToMinimalGlitchRenderer requires the source code to be a function, or a string";
67920+
throw "sculptToMinimalRenderer requires the source code to be a function, or a string";
6792167921
}
6792267922

6792367923
var minimalHeader = "\nprecision highp float;\n#define GLSL_NEED_ROUND\nuniform float w_width;\nuniform float w_height;\nuniform mat4 projectionMatrix;\n#define cameraPosition vec3(0.0,0.0,-1.0)\n#define vUv vec2(0.0)\n#define worldPos vec4(vec2((gl_FragCoord.x/w_width-0.5)*(w_width/w_height),gl_FragCoord.y/w_height-0.5)*1.75,0.0,0.0)\n";
@@ -68053,6 +68053,6 @@ function sculptToTouchDesignerShaderSource(source) {
6805368053
};
6805468054
}
6805568055

68056-
console.log('using shader-park version: 0.0.13'); /// Generate code for various targets
68056+
console.log('using shader-park version: 0.0.14'); /// Generate code for various targets
6805768057

68058-
export { createSculpture, createSculptureWithGeometry, defaultFragSourceGLSL, glslToOfflineRenderer, glslToThreeJSMaterial, glslToThreeJSMesh, glslToThreeJSShaderSource, glslToTouchDesignerShaderSource, sculptToMinimalGlitchRenderer, sculptToMinimalRenderer, sculptToOfflineRenderer, sculptToRawSDF4Meshing, sculptToThreeJSMaterial, sculptToThreeJSMesh, sculptToThreeJSShaderSource, sculptToTouchDesignerShaderSource };
68058+
export { createSculpture, createSculptureWithGeometry, defaultFragSourceGLSL, glslToOfflineRenderer, glslToThreeJSMaterial, glslToThreeJSMesh, glslToThreeJSShaderSource, glslToTouchDesignerShaderSource, sculptToMinimalHTMLRenderer, sculptToMinimalRenderer, sculptToOfflineRenderer, sculptToRawSDF4Meshing, sculptToThreeJSMaterial, sculptToThreeJSMesh, sculptToThreeJSShaderSource, sculptToTouchDesignerShaderSource };

dist/shader-park-core.umd.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67905,7 +67905,7 @@
6790567905
* output - a fully self-contained lightweight html file which renders the sculpture
6790667906
**/
6790767907

67908-
function sculptToMinimalRenderer(source) {
67908+
function sculptToMinimalHTMLRenderer(source) {
6790967909
var minimalHeader = "\nprecision highp float;\n#define GLSL_NEED_ROUND\nuniform float w_width;\nuniform float w_height;\nuniform mat4 projectionMatrix;\n#define cameraPosition vec3(0.0,0.0,-1.0)\n#define vUv vec2(0.0)\n#define worldPos vec4(vec2((gl_FragCoord.x/w_width-0.5)*(w_width/w_height),gl_FragCoord.y/w_height-0.5)*1.75,0.0,0.0)\n";
6791067910
var generatedGLSL = sculptToGLSL(source);
6791167911
var fullFrag = minimalHeader + usePBRHeader + useHemisphereLight + uniformsToGLSL(generatedGLSL.uniforms) + 'const float STEP_SIZE_CONSTANT = ' + generatedGLSL.stepSizeConstant + ';\n' + sculptureStarterCode + generatedGLSL.geoGLSL + '\n' + generatedGLSL.colorGLSL + '\n' + fragFooter;
@@ -67918,12 +67918,12 @@
6791867918
* output - a fully self-contained lightweight html file which renders the sculpture
6791967919
**/
6792067920

67921-
function sculptToMinimalGlitchRenderer(canvas, source) {
67921+
function sculptToMinimalRenderer(canvas, source) {
6792267922
if (typeof source === "function") {
6792367923
source = source.toString();
6792467924
source = source.slice(source.indexOf("{") + 1, source.lastIndexOf("}"));
6792567925
} else if (!(typeof source === "string")) {
67926-
throw "sculptToMinimalGlitchRenderer requires the source code to be a function, or a string";
67926+
throw "sculptToMinimalRenderer requires the source code to be a function, or a string";
6792767927
}
6792867928

6792967929
var minimalHeader = "\nprecision highp float;\n#define GLSL_NEED_ROUND\nuniform float w_width;\nuniform float w_height;\nuniform mat4 projectionMatrix;\n#define cameraPosition vec3(0.0,0.0,-1.0)\n#define vUv vec2(0.0)\n#define worldPos vec4(vec2((gl_FragCoord.x/w_width-0.5)*(w_width/w_height),gl_FragCoord.y/w_height-0.5)*1.75,0.0,0.0)\n";
@@ -68059,7 +68059,7 @@
6805968059
};
6806068060
}
6806168061

68062-
console.log('using shader-park version: 0.0.13'); /// Generate code for various targets
68062+
console.log('using shader-park version: 0.0.14'); /// Generate code for various targets
6806368063

6806468064
exports.createSculpture = createSculpture;
6806568065
exports.createSculptureWithGeometry = createSculptureWithGeometry;
@@ -68069,7 +68069,7 @@
6806968069
exports.glslToThreeJSMesh = glslToThreeJSMesh;
6807068070
exports.glslToThreeJSShaderSource = glslToThreeJSShaderSource;
6807168071
exports.glslToTouchDesignerShaderSource = glslToTouchDesignerShaderSource;
68072-
exports.sculptToMinimalGlitchRenderer = sculptToMinimalGlitchRenderer;
68072+
exports.sculptToMinimalHTMLRenderer = sculptToMinimalHTMLRenderer;
6807368073
exports.sculptToMinimalRenderer = sculptToMinimalRenderer;
6807468074
exports.sculptToOfflineRenderer = sculptToOfflineRenderer;
6807568075
exports.sculptToRawSDF4Meshing = sculptToRawSDF4Meshing;

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ import {
1414
sculptToOfflineRenderer
1515
} from './targets/offlineRenderer.js'
1616

17+
import {
18+
sculptToMinimalHTMLRenderer
19+
} from './targets/minimalHTMLRenderer.js'
20+
1721
import {
1822
sculptToMinimalRenderer
1923
} from './targets/minimalRenderer.js'
20-
import {
21-
sculptToMinimalGlitchRenderer
22-
} from './targets/glitchMinimalRenderer.js'
2324

2425
import {
2526
sculptToRawSDF4Meshing
@@ -52,7 +53,7 @@ export {
5253
sculptToOfflineRenderer,
5354
glslToTouchDesignerShaderSource,
5455
sculptToTouchDesignerShaderSource,
56+
sculptToMinimalHTMLRenderer,
5557
sculptToMinimalRenderer,
56-
sculptToMinimalGlitchRenderer,
5758
sculptToRawSDF4Meshing
5859
}

targets/glitchMinimalRenderer.js

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

0 commit comments

Comments
 (0)