How to use the CanvasRenderer function from three
Find comprehensive JavaScript three.CanvasRenderer code examples handpicked from public code repositorys.
GitHub: maxogden/stl-obj-viewer
86 87 88 89 90 91 92 93 94 95
// add to the scene scene.add(pointLight) if ("WebGLRenderingContext" in window) renderer = new THREE.WebGLRenderer() else renderer = new THREE.CanvasRenderer() renderer.setSize( width, height ) container.appendChild( renderer.domElement )
6
39
4
+ 14 other calls in file
11 12 13 14 15 16 17 18 19 20
} catch(e) { $('.webgl-error').show(); setTimeout(function() { $('.webgl-error').fadeOut(); }, 6666); this.renderer = new THREE.CanvasRenderer(); this.renderMode = 'canvas'; } this.renderer.setClearColor(0xffffff, 1);
0
0
3
three.Vector3 is the most popular function in three (22341 examples)