[英]Why isn't three.PointLightHelper working in my code?
The line scene.add(new THREE.PointLightHelper(bluePoint, 3));
行
scene.add(new THREE.PointLightHelper(bluePoint, 3));
does not work in my code, which is below: 在我的代码中不起作用,如下所示:
var bluePoint = new THREE.PointLight(0x0033ff, 100, 500);
bluePoint.position.set( 500, -500, 25 );
scene.addLight(bluePoint);
scene.add(new THREE.PointLightHelper(bluePoint, 3));
I have added the libraries: Projector.js
, CanvasRenderer.js
, stats.min.js
and three.min.js
我添加了以下库:
Projector.js
, CanvasRenderer.js
, stats.min.js
和three.min.js
But it does work if I remove the line: 但是,如果我删除该行,它确实可以工作:
scene.add(new THREE.PointLightHelper(bluePoint, 3));
Why? 为什么? Is there another way to increase the PointLight size in three.js without the
THREE.PointLightHelper
? 有另一种方式来增加three.js所的点光源的尺寸没有
THREE.PointLightHelper
?
Did you check your console? 您检查控制台了吗?
scene.addLight
is not a function. scene.addLight
不是函数。
You want scene.add(bluePoint)
你想要
scene.add(bluePoint)
This runs for me on r71. 这为我在r71上运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.