+ 3

Three.js problem [ solved ]

This was my first try with three.js. I came to know about a element which is pointlight. I tried to create a cube and pointlight object. But as it is shown everywhere on web I didn't got the result. Here is code. What is the thing I am doing wrong ? https://code.sololearn.com/W1uJmfBEQoCp/?ref=app

6th Feb 2022, 11:49 AM
Ayush Kumar
Ayush Kumar - avatar
8 Answers
6th Feb 2022, 12:29 PM
Shobhit :)
Shobhit :) - avatar
+ 3
What exactly you want to do using PointLight?
6th Feb 2022, 12:13 PM
Shobhit :)
Shobhit :) - avatar
+ 2
Ooh sorry Shobhit :) can you please explain in detail. I am not getting my fault still.
6th Feb 2022, 1:09 PM
Ayush Kumar
Ayush Kumar - avatar
+ 1
Well I think it will create some lighting effect as normal light do. That's what I want Shobhit :) Ok let me tell what type of effect I acctuly want https://threejs.org/examples/#webgl_lights_pointlights
6th Feb 2022, 12:18 PM
Ayush Kumar
Ayush Kumar - avatar
+ 1
Well I thought about shadow and the lighted portion of cube Runtime Terror If the point light is on any side then it should make that face lighten and opposite face darken
6th Feb 2022, 3:47 PM
Ayush Kumar
Ayush Kumar - avatar
+ 1
Ooh Runtime Terror problem is solved now acctuly all elements do not interact with light so I need to to crete such element
7th Feb 2022, 6:22 AM
Ayush Kumar
Ayush Kumar - avatar