Selaa lähdekoodia

Script: Remove usage of glslprep.

Mugen87 4 vuotta sitten
vanhempi
commit
e3fc91b2ba
1 muutettua tiedostoa jossa 3 lisäystä ja 29 poistoa
  1. 3 29
      editor/js/Script.js

+ 3 - 29
editor/js/Script.js

@@ -90,6 +90,7 @@ function Script( editor ) {
 					editor.execute( new SetScriptValueCommand( editor, currentObject, currentScript, 'source', value ) );
 
 				}
+
 				return;
 
 			}
@@ -105,6 +106,7 @@ function Script( editor ) {
 				editor.execute( cmd );
 
 			}
+
 			if ( JSON.stringify( currentObject.material.uniforms ) !== JSON.stringify( json.uniforms ) ) {
 
 				var cmd = new SetMaterialValueCommand( editor, currentObject, 'uniforms', json.uniforms );
@@ -112,6 +114,7 @@ function Script( editor ) {
 				editor.execute( cmd );
 
 			}
+
 			if ( JSON.stringify( currentObject.material.attributes ) !== JSON.stringify( json.attributes ) ) {
 
 				var cmd = new SetMaterialValueCommand( editor, currentObject, 'attributes', json.attributes );
@@ -218,35 +221,6 @@ function Script( editor ) {
 
 				case 'glsl':
 
-					try {
-
-						var shaderType = currentScript === 'vertexShader' ?
-							glslprep.Shader.VERTEX : glslprep.Shader.FRAGMENT;
-
-						glslprep.parseGlsl( string, shaderType );
-
-					} catch ( error ) {
-
-						if ( error instanceof glslprep.SyntaxError ) {
-
-							errors.push( {
-
-								lineNumber: error.line,
-								message: "Syntax Error: " + error.message
-
-							} );
-
-						} else {
-
-							console.error( error.stack || error );
-
-						}
-
-					}
-
-					if ( errors.length !== 0 ) break;
-					if ( renderer instanceof THREE.WebGLRenderer === false ) break;
-
 					currentObject.material[ currentScript ] = string;
 					currentObject.material.needsUpdate = true;
 					signals.materialChanged.dispatch( currentObject.material );