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);
fork icon1
star icon3
watch icon0

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);
fork icon0
star icon3
watch icon2

+ 5 other calls in file

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({
fork icon0
star icon1
watch icon6

+ 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;
fork icon0
star icon1
watch icon2

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);
fork icon0
star icon0
watch icon2

+ 3 other calls in file

Other functions in three

Sorted by popularity

function icon

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