How to use the PCFShadowMap function from three
Find comprehensive JavaScript three.PCFShadowMap code examples handpicked from public code repositorys.
111 112 113 114 115 116 117 118 119 120
createRenderer(); // Signals signals.editorCleared.add(function () { currentRenderer.physicallyCorrectLights = false; currentRenderer.shadowMap.enabled = true; currentRenderer.shadowMap.type = THREE.PCFShadowMap; currentRenderer.toneMapping = THREE.NoToneMapping; currentRenderer.toneMappingExposure = 1; physicallyCorrectLightsBoolean.setValue(currentRenderer.physicallyCorrectLights); shadowsBoolean.setValue(currentRenderer.shadowMap.enabled);
1
3
0
18 19 20 21 22 23 24 25 26 27
renderer.setClearColor(0xf0f0f0); renderer.setPixelRatio(window.devicePixelRatio); renderer.setSize(width, height); renderer.shadowMapEnabled = true; renderer.shadowMapSoft = true; renderer.shadowMapType = THREE.PCFShadowMap; document.body.appendChild(renderer.domElement); var camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 10000); // var camera = new THREE.OrthographicCamera(width / - 2, width / 2, height / 2, height / - 2, 1, 10000);
0
3
2
+ 5 other calls in file
GitHub: Siroko/SpringGPU
17 18 19 20 21 22 23 24 25 26
this.scene = new THREE.Scene(); this.renderer = new THREE.WebGLRenderer( { antialias: true } ); this.renderer.shadowMap.enabled = true; this.renderer.shadowMap.type = THREE.PCFShadowMap; this.cameraControl = new CameraControl( this.camera, this.scene.position ); this.simulator = new Simulator({
0
1
6
+ 3 other calls in file
139 140 141 142 143 144 145 146 147 148
light.shadowBias = 0.0001; light.shadowMapCullFace = THREE.CullFaceBack; light.shadowDarkness = 0.3; //light.shadowCameraVisible = true; // only for debugging light.shadowMapType = THREE.PCFShadowMap; light.shadowMapSoft = true; light.shadowCameraNear = 400 * world.tileSize; light.shadowCameraFar = 800 * world.tileSize;
0
1
2
GitHub: bjnortier/trip.three
61 62 63 64 65 66 67 68 69
} renderer.autoClear = false; renderer.setSize(this.width, this.height); if (options.enableShadowMap) { renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFShadowMap; renderer.shadowMap.cullFace = THREE.CullFaceBack; } $container[0].appendChild(renderer.domElement);
0
0
2
+ 3 other calls in file
three.Vector3 is the most popular function in three (22341 examples)