Skip to content

Instantly share code, notes, and snippets.

View haroldiedema's full-sized avatar

Harold Iedema haroldiedema

  • Exact Bouw7
  • Damwâld, Netherlands
View GitHub Profile
@haroldiedema
haroldiedema / lambert-patch.js
Created December 17, 2017 19:10
Lit both sides equally for double-sided lambert material instances.
THREE.ShaderLib[ 'lambert' ].fragmentShader = THREE.ShaderLib[ 'lambert' ].fragmentShader.replace(
`vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;`,
`
#ifdef DOUBLE_SIDED
reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );
reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );
reflectedLight.directDiffuse = diffuseColor.rgb;
reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();
module.exports = Class('Lente.System.EventEmitter', {
'private string name' : '',
'private object listeners' : {},
'private object last_event' : {},
/**
* @constructor
* @param {String} name
<?php
/**
* Mines data from the battle net API.
*
* Should be used as a console command.
*/
class DataMiner
{
private $base_uri;
<?php
// LICENSE : http://www.wtfpl.net/txt/copying/
/**
* Returns a raw request URI ready to be sent to the battle.net API.
*
* @param string $url
* @param array $parameters
* @return string
*/
[Pathfinding]
bAttemptMovementTransitionAnimations=0
bAttemptTurnToRunAnimations=0
bAvoidBoxTriggersFailure=0
bBackgroundNavmeshUpdate=0
bBackgroundPathing=0
bContinueTweeingAfterTweenerEnd=0
bCreateDebugInfo=0
bCutDoors=0
bDisableUnloadedPaths=0
/**
* Instantiates a Swiper.
*
* Automatically adjusts the height of all slides based on the one slide
* which has the largest height value.
*
* @param string container_class
* @param string slide_class
* @param string pagination_class
*/
@haroldiedema
haroldiedema / Slider snippet
Created August 3, 2014 10:10
Slider snippet -> Function
// Orgineel:
$(window).resize(function() {
// Iterate over slides to find the one with the maximum height.
// Once found, store it in the max_height variable.
max_height = 0;
$(".swiper-container .slide").each(function() {
// First, we get rid of our previously set height, in case
// the content container is getting smaller instead of larger.
$(this).css('height', 'auto');
var WidgetInterface = Interface({
update: 'function'
});
/**
* Abstract Widget class.
*
* Instantiating this will result in an error because 'update'
* isn't implemented as defined in the interface.
*/