How to use the WebGL1Renderer function from three
Find comprehensive JavaScript three.WebGL1Renderer code examples handpicked from public code repositorys.
GitHub: shaungt1/sketch-threejs
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();
260
0
0
+ 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);
7
21
7
+ 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');
0
0
1
+ 8 other calls in file
three.Vector3 is the most popular function in three (22341 examples)