How to use the WebGL1Renderer function from three

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

11
12
13
14
15
16
17
18
19
20
const ForceHemisphereLight = require('../../old/ForceHemisphereLight');
const ForcePointLight = require('../../old/ForcePointLight');
const ForceCamera = require('../../old/ForceCamera');

const canvas = document.getElementById('canvas-webgl');
const renderer = new THREE.WebGL1Renderer({
  antialias: true,
  canvas: canvas,
});
const scene = new THREE.Scene();
fork icon260
star icon0
watch icon0

+ 3 other calls in file

950
951
952
953
954
955
956
957
958
959
    })
  );
});

// setup render
this.renderer = new THREE.WebGL1Renderer({
  antialias: true // to get smoother output
});
this.renderer.setClearColor(this.backgroundColor, 1);
this.renderer.setSize(this.WIDTH, this.HEIGHT);
fork icon7
star icon21
watch icon7

+ 3 other calls in file

274
275
276
277
278
279
280
281
282
283
/**
 * @private
 */
Simulation.prototype.initRenderer = function () {
    // TODO(ian): Upgrade to webgl 2. See https://discourse.threejs.org/t/webgl2-breaking-custom-shader/16603/4
    var renderer = new THREE.WebGL1Renderer({
        antialias: true
    });
    console.info('Max texture resolution:', renderer.capabilities.maxTextureSize);
    var maxPrecision = renderer.capabilities.getMaxPrecision('highp');
fork icon0
star icon0
watch icon1

+ 8 other calls in file

Other functions in three

Sorted by popularity

function icon

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