From ffa231f36cde6105dbbf9d44a690b8c92a254d90 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Wed, 14 Mar 2012 22:53:08 -0600 Subject: [PATCH] Docs: More lights progress. --- docs/api/cameras/OrthographicCamera.html | 2 +- docs/api/cameras/PerspectiveCamera.html | 2 +- docs/api/core/Rectangle.html | 4 +- docs/api/lights/AmbientLight.html | 23 +++--- docs/api/lights/AmbientLight.rst | 37 --------- docs/api/lights/DirectionalLight.html | 95 ++++++++++++++++++++++-- docs/api/lights/Light.rst | 23 ------ docs/api/lights/PointLight.html | 33 ++++++-- docs/api/lights/PointLight.rst | 56 -------------- docs/api/lights/SpotLight.html | 2 +- 10 files changed, 128 insertions(+), 149 deletions(-) delete mode 100644 docs/api/lights/AmbientLight.rst delete mode 100644 docs/api/lights/Light.rst delete mode 100644 docs/api/lights/PointLight.rst diff --git a/docs/api/cameras/OrthographicCamera.html b/docs/api/cameras/OrthographicCamera.html index b263727ca0..93bcec8934 100644 --- a/docs/api/cameras/OrthographicCamera.html +++ b/docs/api/cameras/OrthographicCamera.html @@ -7,7 +7,7 @@

Example

-var camera = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, 1, 1000 ); +var camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 ); scene.add( camera ); diff --git a/docs/api/cameras/PerspectiveCamera.html b/docs/api/cameras/PerspectiveCamera.html index dc21fce472..60ded8a777 100644 --- a/docs/api/cameras/PerspectiveCamera.html +++ b/docs/api/cameras/PerspectiveCamera.html @@ -7,7 +7,7 @@

Example

-var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 ); +var camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 ); scene.add( camera ); diff --git a/docs/api/core/Rectangle.html b/docs/api/core/Rectangle.html index 0c3374900a..a6e4d01cd9 100644 --- a/docs/api/core/Rectangle.html +++ b/docs/api/core/Rectangle.html @@ -1,6 +1,8 @@

[name]

-
2D rectangle. Used by [page:CanvasRenderer] for 2D clipping.
+
+ Mainly used internaly by [page:CanvasRenderer] for 2D clipping. +

Constructor

diff --git a/docs/api/lights/AmbientLight.html b/docs/api/lights/AmbientLight.html index 571989feb6..d1a988d781 100644 --- a/docs/api/lights/AmbientLight.html +++ b/docs/api/lights/AmbientLight.html @@ -1,26 +1,21 @@ -[page:Light] → +[page:Object3D] → [page:Light] →

[name]

-
todo
- - -

Constructor

- -

[name]()

+
+ This light's color gets applied to all the object in the scene globally. +
-

Properties

+

Example

-

.[page:Vector3 todo]

+var light = new THREE.AmbientLight( 0xff0000 ); +scene.add( light ); -

Methods

+

Constructor

-

.todo( [page:Vector3 todo] )

-
-todo — todo
-
+

[name]( [page:Float hex] )

Source

diff --git a/docs/api/lights/AmbientLight.rst b/docs/api/lights/AmbientLight.rst deleted file mode 100644 index 5ca65e7610..0000000000 --- a/docs/api/lights/AmbientLight.rst +++ /dev/null @@ -1,37 +0,0 @@ -AmbientLight - An ambient light -------------------------------- - -.. ............................................................................... -.. rubric:: Constructor -.. ............................................................................... - -.. class:: AmbientLight( hex ) - - An ambient light - - Inherits from :class:`Light` :class:`Object3D` - - Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial` - - :param integer hex: light color - - -.. ............................................................................... -.. rubric:: Attributes -.. ............................................................................... - -.. attribute:: AmbientLight.color - - Light :class:`Color` - - Material's ambient color gets multiplied by this color. - - -.. ............................................................................... -.. rubric:: Example -.. ............................................................................... - -:: - - var ambientLight = new THREE.AmbientLight( 0x333333 ); - scene.add( ambientLight ); diff --git a/docs/api/lights/DirectionalLight.html b/docs/api/lights/DirectionalLight.html index 571989feb6..44f1000f4a 100644 --- a/docs/api/lights/DirectionalLight.html +++ b/docs/api/lights/DirectionalLight.html @@ -1,27 +1,108 @@ -[page:Light] → +[page:Object3D] → [page:Light] →

[name]

-
todo
+
+ Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial]. +
+ + +

Example

+ +// White directional light at half intensity shining from the top. + +var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 ); +directionalLight.position.set( 0, 1, 0 ); +scene.add( directionalLight );

Constructor

-

[name]()

+

[name]( [page:Float hex], [page:Float intensity], [page:Float distance] )

Properties

-

.[page:Vector3 todo]

+

.[page:Vector3 position]

+
+ Direction of the light is normalized vector from *position* to *(0,0,0)*.
+ Default — *new THREE.Vector3()*. +
+ +

.[page:Object3D target]

+ +

.[page:Float intensity]

+
+ Light's intensity.
+ Default — *1.0*. +
+

.[page:Float distance]

+
+ If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.
+ Default — *0.0*. +
-

Methods

+

.[page:Boolean castShadow]

+
+ If set to *true* light will cast dynamic shadows. *Warning*: This is expensive and requires tweaking to get shadows looking right.
+ Default — *false*. +
-

.todo( [page:Vector3 todo] )

+

.[page:Boolean onlyShadow]

-todo — todo
+ If set to *true* light will only cast shadow but not contribute any lighting (as if *intensity* was 0 but cheaper to compute).
+ Default — *false*.
+

.[page:Float shadowCameraNear]

+ +

.[page:Float shadowCameraFar]

+ +

.[page:Float shadowCameraLeft]

+ +

.[page:Float shadowCameraRight]

+ +

.[page:Float shadowCameraTop]

+ +

.[page:Float shadowCameraBottom]

+ +

.[page:Boolean shadowCameraVisible]

+ +

.[page:Float shadowBias]

+ +

.[page:Float shadowDarkness]

+ +

.[page:Integer shadowMapWidth]

+ +

.[page:Integer shadowMapHeight]

+ +

.[page:Boolean shadowCascade]

+ +

.[page:Vector3 shadowCascadeOffset]

+ +

.[page:Integer shadowCascadeCount]

+ +

.[page:Array shadowCascadeBias]

+ +

.[page:Array shadowCascadeWidth]

+ +

.[page:Array shadowCascadeHeight]

+ +

.[page:Array shadowCascadeNearZ]

+ +

.[page:Array shadowCascadeFarZ]

+ +

.[page:Array shadowCascadeArray]

+ +

.[page:RenderTarget shadowMap]

+ +

.[page:Integer shadowMapSize]

+ +

.[page:Camera shadowCamera]

+ +

.[page:Matrix shadowMatrix]

+

Source

diff --git a/docs/api/lights/Light.rst b/docs/api/lights/Light.rst deleted file mode 100644 index da3632d4bf..0000000000 --- a/docs/api/lights/Light.rst +++ /dev/null @@ -1,23 +0,0 @@ -Light - Abstract base class for lights --------------------------------------- - -.. ............................................................................... -.. rubric:: Constructor -.. ............................................................................... - -.. class:: Light( hex ) - - Abstract base class for lights - - Inherits from :class:`Object3D` - - :param integer hex: light color - - -.. ............................................................................... -.. rubric:: Attributes -.. ............................................................................... - -.. attribute:: Light.color - - Light :class:`Color` diff --git a/docs/api/lights/PointLight.html b/docs/api/lights/PointLight.html index 571989feb6..9b9773cd9c 100644 --- a/docs/api/lights/PointLight.html +++ b/docs/api/lights/PointLight.html @@ -1,25 +1,42 @@ -[page:Light] → +[page:Object3D] → [page:Light] →

[name]

-
todo
+
+ Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial]. +
+ + +

Example

+ +var light = new THREE.PointLight( 0xff0000, 1, 100 ); +light.position.set( 50, 50, 50 ); +scene.add( light );

Constructor

-

[name]()

+

[name]( [page:Float color], [page:Float intensity], [page:Float distance] )

Properties

-

.[page:Vector3 todo]

- +

.[page:Vector3 position]

+
+ Light's position.
+ Default — *new THREE.Vector3()*. +
-

Methods

+

.[page:Float intensity]

+
+ Light's intensity.
+ Default - *1.0*. +
-

.todo( [page:Vector3 todo] )

+

.[page:Float distance]

-todo — todo
+ If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.
+ Default — *0.0*.
diff --git a/docs/api/lights/PointLight.rst b/docs/api/lights/PointLight.rst deleted file mode 100644 index 17c43c0eee..0000000000 --- a/docs/api/lights/PointLight.rst +++ /dev/null @@ -1,56 +0,0 @@ -PointLight - A point light --------------------------- - -.. ............................................................................... -.. rubric:: Constructor -.. ............................................................................... - -.. class:: PointLight( hex, intensity, distance ) - - A point light - - Part of scene graph - - Inherits from :class:`Light` :class:`Object3D` - - Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial` - - :param integer hex: light color - :param float intensity: light intensity - :param float distance: distance affected by light - - -.. ............................................................................... -.. rubric:: Attributes -.. ............................................................................... - -.. attribute:: PointLight.color - - Light :class:`Color` - -.. attribute:: PointLight.intensity - - Light intensity - - ``default 1.0`` - -.. attribute:: PointLight.position - - Position of the light - -.. attribute:: PointLight.distance - - If non-zero, light will attenuate linearly from maximum intensity at light ``position`` down to zero at ``distance`` - - -.. ............................................................................... -.. rubric:: Example -.. ............................................................................... - -:: - - // red point light shining from the front - - var pointLight = new THREE.PointLight( 0xff0000 ); - pointLight.position.set( 0, 0, 10 ); - scene.add( pointLight ); diff --git a/docs/api/lights/SpotLight.html b/docs/api/lights/SpotLight.html index 571989feb6..63c265e450 100644 --- a/docs/api/lights/SpotLight.html +++ b/docs/api/lights/SpotLight.html @@ -1,4 +1,4 @@ -[page:Light] → +[page:Object3D] → [page:Light] →

[name]

-- GitLab