three.js - how to apply shadow on full object in threejs -


i want apply shadow on full object using threejs, if rotate object shadow must object, meaning want apply shadow hole object, tried spotlight, no luck doesn't changes on object, here below code

light = new three.spotlight( 0xffffff ); light.position.set( 200, 200, -200 ); light.castshadow = true; light.shadowmapwidth = 1024;    // power of 2 light.shadowmapheight = 1024;  light.shadowcameranear = 200;   // keep near , far planes tight possible light.shadowcamerafar = 500;    // shadows not cast past far plane light.shadowcamerafov = 20; light.shadowbias = -0.00022;    // parameter can tweak if there artifacts light.shadowdarkness = 0.5;  light.shadowcameravisible = true; scene.add( light );  

did tried set object.receiveshadow = true; on object on shadows should rendered ?


Comments

Popular posts from this blog

java - How to print docx and pdf? -

qml - Is it possible to implement SystemTrayIcon functionality in Qt Quick application -

java - IntelliJ to move a class along with conflicted classes to a new package? -