PointLight.rst 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. PointLight - A point light
  2. --------------------------
  3. .. rubric:: Constructor
  4. .. class:: PointLight( hex, intensity, distance )
  5. A point light
  6. Part of scene graph
  7. Inherits from :class:`Light` :class:`Object3D`
  8. Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
  9. :param integer hex: light color
  10. :param float intensity: light intensity
  11. :param float distance: distance affected by light
  12. .. rubric:: Attributes
  13. .. attribute:: PointLight.color
  14. Light :class:`Color`
  15. .. attribute:: PointLight.intensity
  16. Light intensity
  17. ``default 1.0``
  18. .. attribute:: PointLight.position
  19. Position of the light
  20. .. attribute:: PointLight.distance
  21. If non-zero, light will attenuate linearly from maximum intensity at light ``position`` down to zero at ``distance``
  22. .. rubric:: Example
  23. ::
  24. // red point light shining from the front
  25. var pointLight = new THREE.PointLight( 0xff0000 );
  26. pointLight.position.set( 0, 0, 10 );
  27. scene.add( pointLight );
粤ICP备19079148号