Skip to content

Instantly share code, notes, and snippets.

View superguigui's full-sized avatar

Guillaume Gouessan superguigui

View GitHub Profile
@superguigui
superguigui / . dotfiles
Last active March 31, 2020 08:43
Install new Computer
My Dotfiles
See README.md for instructions
@superguigui
superguigui / MeshLine.js
Created February 29, 2016 13:35
THREE.Meshline from spite in ES6 with update method
import THREE from 'three';
export default class MeshLine {
constructor() {
this.attributes = {};
this.positions = [];
this.geometry = new THREE.BufferGeometry();
this.widthCallback = null;
}
@superguigui
superguigui / README.md
Last active December 13, 2022 21:38
Three-orbit-controls with rotation set methods

I added a few methods to three-orbit-controls to be able to manually define phi or theta and be able to rotate to a given point.

// rotation in Y
controls.setAzimuthalAngle(theta);

// rotation in X
controls.setPolarAngle(phi);
@superguigui
superguigui / Basics Laravel.md
Last active March 16, 2022 11:15
Laravel memo

Laravel help

Basics

Create controller

php artisan make:controller NameOfTheController --plain

Connect to Homestead VM

@superguigui
superguigui / index.js
Last active August 29, 2015 14:20
requirebin sketch
var Color = require('color');
var c = Color('#123456');
console.log(c.saturationv(), c.hexString());
// -> 79 #123456
c.saturationv(79);
console.log(c.saturationv(), c.hexString());
// -> 79 #123457
@superguigui
superguigui / fitIntoScreen.js
Created October 29, 2012 11:37
Fit image/content to your window so that the ratio is respected and your image is moved to the center.
// FIT INTO SCREEN
// Your image or content size
var contentWidth = 1024;
var contentHeight= 768;
// The resize function, to be impletemented however you need it
function resize(){
var w, h, ws, hs, rs, rc, r;