Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/api/en/helpers/AxesHelper.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ <h2>Properties</h2>
<h2>Methods</h2>
<p>See the base [page:LineSegments] class for common methods.</p>

<h3>[method:AxesHelper dispose]()</h3>
<p>
Disposes of the internally-created [page:Line.material material] and [page:Line.geometry geometry] used by this helper.
</p>

<h2>Source</h2>

<p>
Expand Down
4 changes: 4 additions & 0 deletions docs/api/en/helpers/CameraHelper.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ <h3>[property:Object matrixAutoUpdate]</h3>
<h2>Methods</h2>
<p>See the base [page:LineSegments] class for common methods.</p>

<h3>[method:CameraHelper dispose]()</h3>
<p>
Disposes of the internally-created [page:Line.material material] and [page:Line.geometry geometry] used by this helper.
</p>

<h3>[method:null update]()</h3>
<p>Updates the helper based on the projectionMatrix of the camera.</p>
Expand Down
6 changes: 6 additions & 0 deletions docs/api/en/lights/DirectionalLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ <h2>Methods</h2>

<p>See the base [page:Light Light] class for common methods.</p>

<h3>[method:DirectionalLight dispose]()</h3>
<p>
Override of base class's [page:Light.dispose dispose].
Disposes of this light's [page:DirectionalLightShadow shadow].
</p>

<h3>[method:DirectionalLight copy]( [param:DirectionalLight source] )</h3>
<p>
Copies value of all the properties from the [page:DirectionalLight source] to this
Expand Down
4 changes: 4 additions & 0 deletions docs/api/en/lights/Light.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ <h2>Methods</h2>
See the base [page:Object3D Object3D] class for common methods.
</p>

<h3>[method:Light dispose]()</h3>
<p>
Abstract dispose method for lights; implemented by subclasses that have disposable resources.
</p>

<h3>[method:Light copy]( [param:Light source] )</h3>
<p>
Expand Down
6 changes: 6 additions & 0 deletions docs/api/en/lights/PointLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ <h2>Methods</h2>
See the base [page:Light Light] class for common methods.
</p>

<h3>[method:PointLight dispose]()</h3>
<p>
Override of base class's [page:Light.dispose dispose].
Disposes of this light's [page:PointLightShadow shadow].
</p>

<h3>[method:PointLight copy]( [param:PointLight source] )</h3>
<p>
Copies value of all the properties from the [page:PointLight source] to this
Expand Down
6 changes: 6 additions & 0 deletions docs/api/en/lights/SpotLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ <h2>Methods</h2>

<p>See the base [page:Light Light] class for common methods.</p>

<h3>[method:SpotLight dispose]()</h3>
<p>
Override of base class's [page:Light.dispose dispose].
Disposes of this light's [page:SpotLightShadow shadow].
</p>

<h3>[method:SpotLight copy]( [param:SpotLight source] )</h3>
<p>
Copies value of all the properties from the [page:SpotLight source] to this
Expand Down
5 changes: 5 additions & 0 deletions docs/api/en/lights/shadows/LightShadow.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ <h3>[method:number getViewportCount]()</h3>
Used internally by the renderer to get the number of viewports that need to be rendered for this shadow.
</p>

<h3>[method:LightShadow dispose]()</h3>
<p>
Disposes of this shadow's textures ([page:LightShadow.map map] and [page:LightShadow.mapPass mapPass]).
</p>

<h3>[method:LightShadow copy]( [param:LightShadow source] )</h3>
<p>
Copies value of all the properties from the [page:LightShadow source] to this
Expand Down
7 changes: 7 additions & 0 deletions src/helpers/AxesHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ class AxesHelper extends LineSegments {

}

dispose() {

this.geometry.dispose();
this.material.dispose();

}

}


Expand Down
7 changes: 7 additions & 0 deletions src/helpers/CameraHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ class CameraHelper extends LineSegments {

}

dispose() {

this.geometry.dispose();
this.material.dispose();

}

}


Expand Down
6 changes: 6 additions & 0 deletions src/lights/DirectionalLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ class DirectionalLight extends Light {

}

dispose() {

this.shadow.dispose();

}

copy( source ) {

super.copy( source );
Expand Down
6 changes: 6 additions & 0 deletions src/lights/Light.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class Light extends Object3D {

}

dispose() {

// Empty here in base class; some subclasses override.

}

copy( source ) {

super.copy( source );
Expand Down
16 changes: 16 additions & 0 deletions src/lights/LightShadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,22 @@ class LightShadow {

}

dispose() {

if ( this.map ) {

this.map.dispose();

}

if ( this.mapPass ) {

this.mapPass.dispose();

}

}

copy( source ) {

this.camera = source.camera.clone();
Expand Down
6 changes: 6 additions & 0 deletions src/lights/PointLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ class PointLight extends Light {

}

dispose() {

this.shadow.dispose();

}

copy( source ) {

super.copy( source );
Expand Down
6 changes: 6 additions & 0 deletions src/lights/SpotLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ class SpotLight extends Light {

}

dispose() {

this.shadow.dispose();

}

copy( source ) {

super.copy( source );
Expand Down