Skip to content

Instantly share code, notes, and snippets.

Avatar
🐌

Marco Pompili marcopompili

🐌
View GitHub Profile
@marcopompili
marcopompili / Globe.js
Last active Jul 15, 2021
THREE.js - Loading multiple textures
View Globe.js
var Globe = function (radius, segments) {
THREE.Object3D.call(this);
this.name = "Globe";
var that = this;
// instantiate a loader
var loader = new THREE.TextureLoader();
@marcopompili
marcopompili / index.html
Last active Nov 24, 2017
Three.js basic texture loading
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Texture loading 01</title>
<style media="screen">
html, body {
margin: 0;
padding: 0;
}
View TrackballControls.js
/**
* @author Eberhard Graether / http://egraether.com/
*/
THREE.TrackballControls = function ( object, domElement ) {
var _this = this;
var STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM: 4, TOUCH_PAN: 5 };
this.object = object;