This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float negate( float value ) | |
{ | |
return -1.0 * value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out vec3 vWorldSpaceNormal; | |
void main() | |
{ | |
vec4 worldSpaceNormal = modelMatrix * vec4( normal, 0.0 ); | |
vWorldSpaceNormal = normalize( worldSpaceNormal.xyz ); | |
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* calculate view position of the camera */ | |
out vec3 vViewDirection; | |
void main() | |
{ | |
vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* calculate surface normals shader material three.js */ | |
out vec3 vSurfaceNormal; | |
void main() | |
{ | |
vSurfaceNormal = normalize( normalMatrix * normal ); | |
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1. ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fragment shader | |
// | |
// Screen space | |
// | |
*/ | |
uniform vec2 uResolution; // screen width and height | |
void main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out vec2 vWorldUv; | |
void main() | |
{ | |
vec4 objectSpace = modelMatrix * vec4( position, 1.0 ); | |
vWorldUv = vec2( objectSpace.x, objectSpace.z ); | |
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out vec3 vViewDirection; // varying to send to the fragment shader | |
void main() | |
{ | |
vec4 viewDirection = modelViewMatrix * vec4( position, 1.0 ); | |
vViewDirection = viewDirection.xyz; // set view direction per pixel | |
gl_Position = projectionMatrix * viewDirection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {task, dest, src, watch, series} = require('gulp'); | |
const sass = require('gulp-sass'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const browsersync = require('browser-sync').create(); | |
sass.compiler = require('node-sass'); | |
function style(cb) | |
{ | |
return src('./assets/styles/sass/**/*.scss') | |
.pipe(sourcemaps.init()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class hookSystem | |
{ | |
/** | |
* @abstract Objects array | |
* @access Private | |
*/ | |
private static $objects = array(); | |
/** | |
* @abstract Settings array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$phpExt = ''; | |
$phpLoadedExt = get_loaded_extensions(); | |
foreach($phpLoadedExt as $ext) | |
{ | |
$phpExt .= "${ext}<br />"; | |
} | |
echo $phpExt; |
NewerOlder