How to use the Projector function from three
Find comprehensive JavaScript three.Projector code examples handpicked from public code repositorys.
41 42 43 44 45 46 47 48 49 50
parameters = parameters || {}; var _this = this, _renderData, _elements, _lights, _projector = new THREE.Projector(), _canvas = parameters.canvas !== undefined ? parameters.canvas : document.createElement( 'canvas' ),
185
870
40
+ 9 other calls in file
GitHub: hobuinc/usgs-lidar
611 612 613 614 615 616 617 618 619 620
this.orthoCamera = new THREE.OrthographicCamera(-1, 1.0, 1.0, -1.0, 1, 10); this.orthoCamera.position.z = 10; } PointCollector.prototype._2dProj = function(p, proj) { proj = proj || (new THREE.Projector()); var ndc = p.clone(); proj.projectVector(ndc, this.fromCamera); var screen = new THREE.Vector2(this.size[0] * (ndc.x + 1) / 2, this.size[1] - this.size[1] * (ndc.y + 1) / 2);
13
110
0
GitHub: captDaylight/sugar
109 110 111 112 113 114 115 116 117 118
cameraCube = new THREE.PerspectiveCamera( 65, window.innerWidth / window.innerHeight, 1, 100000 ); scene = new THREE.Scene(); sceneCube = new THREE.Scene(); projector = new THREE.Projector(); var hemiLight1 = new THREE.HemisphereLight( 0xffffff, 0xffffff, 1 ); hemiLight1.color.setHSL( 0.6, 1, 0.6 );
0
0
2
three.Vector3 is the most popular function in three (22341 examples)