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
function sceneSetup(){ | |
scene = new THREE.Scene(); | |
container = document.getElementById( 'canvas' ); | |
var width = container.offsetWidth; | |
var height = container.offsetHeight; | |
camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 ); | |
camera.position.z = 2; | |
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 PixiRenderer = function (_BaseRenderer) { | |
inherits(PixiRenderer, _BaseRenderer); | |
function PixiRenderer(element, stroke) { | |
classCallCheck(this, PixiRenderer); | |
var _this = possibleConstructorReturn(this, (PixiRenderer.__proto__ || Object.getPrototypeOf(PixiRenderer)).call(this, element)); | |
_this.stroke = stroke; | |
_this.setColor = false; |
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
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/85/three.min.js"></script> | |
</head> | |
<body> | |
<img id="image" src="crib.jpg"> | |
<script id="fragShader" type="shader-code"> |