How to use the WebAR function from three

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

335
336
337
338
339
340
341
342
343
344
*/
THREE.WebAR.createVRSeeThroughCamera = function(vrDisplay, near, far) {
  var camera = new THREE.PerspectiveCamera( 60, 
    window.innerWidth / window.innerHeight, near, far );
  if (vrDisplay) {
    THREE.WebAR.resizeVRSeeThroughCamera(vrDisplay, camera);
  }
  return camera;
};

fork icon0
star icon2
watch icon0

+ 46 other calls in file

60
61
62
63
64
65
66
67
68
69
var color = new THREE.Color();

for ( var i = 0; i < colors.length; i += 3 ) {
  if (vrDisplay) {
    positions[ i ]     = THREE.WebAR.MAX_FLOAT32_VALUE;
    positions[ i + 1 ] = THREE.WebAR.MAX_FLOAT32_VALUE;
    positions[ i + 2 ] = THREE.WebAR.MAX_FLOAT32_VALUE;
  }
  color.setRGB( 1, 1, 1 );
  colors[ i ]     = color.r;
fork icon0
star icon2
watch icon0

+ 46 other calls in file

Other functions in three

Sorted by popularity

function icon

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