How to use the CanvasRenderer function from three

Find comprehensive JavaScript three.CanvasRenderer code examples handpicked from public code repositorys.

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 )
fork icon6
star icon39
watch icon4

+ 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);
fork icon0
star icon0
watch icon3

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)