Skip to content

Commit

Permalink
Revert "Core.js polishing"
Browse files Browse the repository at this point in the history
This reverts commit 1d6cbb3.
  • Loading branch information
korialis committed Nov 11, 2016
1 parent 1d6cbb3 commit c22e1ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions js/mlj/core/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ MLJ.core.AmbientLight = function (scene, camera, renderer) {
*/
MLJ.core.Headlight = function (scene, camera, renderer) {
/***************debug****************** */
// var geometry = new THREE.BoxGeometry( 1, 1, 1 );
// var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
// var cube1 = new THREE.Mesh( geometry, material );
// var material1 = new THREE.MeshBasicMaterial( {color: 0xFF0000} );
// var cube2 = new THREE.Mesh( geometry, material1 );
var geometry = new THREE.BoxGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
var cube1 = new THREE.Mesh( geometry, material );
var material1 = new THREE.MeshBasicMaterial( {color: 0xFF0000} );
var cube2 = new THREE.Mesh( geometry, material1 );
/*************************************** */

var _on = true;
Expand Down Expand Up @@ -179,7 +179,11 @@ MLJ.core.Headlight = function (scene, camera, renderer) {
* @author Thomas Alderighi
*/
this.setPosition = function (pos) {
_light.position.set(pos.x+1, pos.y-1, pos.z);
// _light.quaternion.set(0,0,0,1);
// _light.updateMatrixWorld(true);
// _lightMesh.lookAt(pos);
// _light.position.set(1 , -1, 15);
_light.position.set(pos.x + 2, pos.y-2, pos.z);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion js/mlj/plugins/rendering/shaders/horBlurFrag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ varying vec2 vUv;

vec3 GaussianBlur(sampler2D tex0, vec2 centreUV, vec2 pixelOffset) {
vec3 colOut = vec3( 0, 0, 0 );
//if (texture2D(tex0, centreUV) == vec4(0.0)) discard;
if (texture2D(tex0, centreUV) == vec4(0.0)) discard;
for( int i = 0; i < stepCount; i++ ) {
vec2 texCoordOffset = gOffsets[i] * pixelOffset;
vec3 col = texture2D(tex0, centreUV + texCoordOffset).xyz +
Expand Down
2 changes: 1 addition & 1 deletion js/mlj/plugins/rendering/shaders/verBlurFrag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ varying vec2 vUv;

vec3 GaussianBlur(sampler2D tex0, vec2 centreUV, vec2 pixelOffset) {
vec3 colOut = vec3( 0, 0, 0 );
// if (texture2D(tex0, centreUV) == vec4(0.0)) discard;
if (texture2D(tex0, centreUV) == vec4(0.0)) discard;

for( int i = 0; i < stepCount; i++ ) {
vec2 texCoordOffset = gOffsets[i] * pixelOffset;
Expand Down

0 comments on commit c22e1ed

Please sign in to comment.