This file contains hidden or 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
http://www.shaderific.com/glsl-functions/ |
This file contains hidden or 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
let customMaterial = new THREE.RawShaderMaterial( { | |
uniforms: { | |
color: { type: "c", value: new THREE.Color( 0x00ff00 ) }, | |
tex: { type: "t", value: new THREE.TextureLoader().load( "./imgs/toto.jpg" ) } | |
}, | |
vertexShader: vsBasic, | |
fragmentShader: fsBasic | |
} ) | |
this.meshSmall = new THREE.Mesh( geometry, customMaterial ) | |
this.meshSmall.scale.set( 1, 1, 1 ) |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>accueil</title> | |
<link href="style.css" rel="nofollow" type="text/css"> | |
<style type="text/css"> | |
#container { | |
position: relative; | |
margin: 0 auto; | |
width: 1024px; |
This file contains hidden or 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 interactions = require( "fz/events/interactions" ) | |
const stage = require( "fz/core/stage" ) | |
const dgui = require( "fz/utils/dgui" ) | |
const timeout = require( "fz/utils/timeout" ) | |
class OrbitControls { | |
// camera = THREE.Camera | |
// target = THREE.Vector3 | |
constructor( camera, target, radius ) { |
This file contains hidden or 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
var gulp = require( "gulp" ); | |
var gutil = require( "gulp-util" ); | |
var plumber = require( "gulp-plumber" ); | |
var browserify = require( "browserify" ); | |
var source = require( "vinyl-source-stream" ); | |
var watchify = require( "watchify" ); | |
gulp.task( "scripts", function() { | |
watchify.args.paths = [ "./site/scripts/" ]; | |
var b = browserify( "./site/scripts/main.js", watchify.args ); |
This file contains hidden or 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
/** | |
* @author Mat Groves http://matgroves.com/ @Doormat23 | |
*/ | |
/** | |
* The AlphaMaskFilter2 class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. | |
* You can use this filter to apply all manor of crazy warping effects | |
* Currently the r property of the texture is used to offset the x and the g property of the texture is used to offset the y. | |
* | |
* @class AlphaMaskFilter2 |
This file contains hidden or 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
/* | |
** Copyright (c) 2012, Romain Dura [email protected] | |
** | |
** Permission to use, copy, modify, and/or distribute this software for any | |
** purpose with or without fee is hereby granted, provided that the above | |
** copyright notice and this permission notice appear in all copies. | |
** | |
** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
This file contains hidden or 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
# if engine.isWebGL() | |
# PIXI.updateWebGLTexture @_texture.baseTexture, engine.getRenderer().gl |
This file contains hidden or 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
/* | |
* Natural Sort algorithm for Javascript - Version 0.6 - Released under MIT license | |
* Author: Jim Palmer (based on chunking idea from Dave Koelle) | |
* Contributors: Mike Grier (mgrier.com), Clint Priest, Kyle Adams, guillermo | |
*/ | |
function naturalSort(a, b) { | |
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi, | |
sre = /(^[ ]*|[ ]*$)/g, | |
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, | |
hre = /^0x[0-9a-f]+$/i, |
This file contains hidden or 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
baseImg = "../img/" | |
img( url ) | |
background transparent url( baseImg + url ) no-repeat | |
imgImportant( url ) | |
background transparent url( baseImg + url ) !important | |
imgRepeat( url ) | |
background transparent url( baseImg + url ) |