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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>WebGL 3D model viewer using three.js</title> | |
<script src="viewer/three.js"></script> | |
<script src="viewer/TrackballControls.js"></script> | |
<script src="viewer/OBJLoader.js"></script> | |
<script src="viewer/Detector.js"></script> | |
</head> |
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
var container; | |
var camera, scene, renderer; | |
var mouseX = 0, mouseY = 0; | |
var windowHalfX = window.innerWidth / 2; | |
var windowHalfY = window.innerHeight / 2; | |
init(); | |
animate(); |
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
using UnityEngine; | |
using System.Collections; | |
public class AnimateMaterial : MonoBehaviour { | |
public float scrollSpeedU = 0.0f; | |
public float scrollSpeedV = 0.25f; | |
public float amplitudeU = 0.0f; | |
public float amplitudeV = 0.0f; |
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
import Jimp from 'jimp'; | |
import { palette as quant } from 'neuquant-js'; | |
const input = 'kapadokya.jpg'; | |
function findClosest(palette, r, g, b) { | |
let minPos = 0; | |
let minD = Number.MAX_SAFE_INTEGER; | |
for (let i = 0, l = palette.length; i < l;) { |