Skip to content

Commit

Permalink
fix: SavePass constructor (three-types#213)
Browse files Browse the repository at this point in the history
* fixed SavePass constructor parameter being optional

* fixed SavePass constructor parameter being optional

* added to contributors table

* added test to tsconfig

* removed savepass from other files
  • Loading branch information
maccesch authored May 3, 2022
1 parent 62c027b commit ffbbd45
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://twitter.com/ggsimm"><img src="https://avatars.githubusercontent.com/u/1862172?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gianmarco</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=gsimone" title="Code">💻</a></td>
<td align="center"><a href="https://davidpeicho.github.io/"><img src="https://avatars.githubusercontent.com/u/8783766?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Peicho</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=DavidPeicho" title="Code">💻</a></td>
<td align="center"><a href="https://subho57.github.io"><img src="https://avatars.githubusercontent.com/u/98544661?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Subhankar Pal</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=subhankar-trisetra" title="Code">💻</a> <a href="https://github.com/three-types/three-ts-types/commits?author=subhankar-trisetra" title="Documentation">📖</a></td>
<td align="center"><a href="https://synphonyte.com"><img src="https://avatars.githubusercontent.com/u/380881?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maccesch</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=maccesch" title="Code">💻</a> <a href="https://github.com/three-types/three-ts-types/commits?author=maccesch" title="Tests">⚠️</a></td>
</tr>
</table>

Expand Down
1 change: 0 additions & 1 deletion types/three/OTHER_FILES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ examples/jsm/postprocessing/OutlinePass.d.ts
examples/jsm/postprocessing/RenderPass.d.ts
examples/jsm/postprocessing/BloomPass.d.ts
examples/jsm/postprocessing/SAOPass.d.ts
examples/jsm/postprocessing/SavePass.d.ts
examples/jsm/postprocessing/SMAAPass.d.ts
examples/jsm/postprocessing/SSAARenderPass.d.ts
examples/jsm/postprocessing/SSAOPass.d.ts
Expand Down
2 changes: 1 addition & 1 deletion types/three/examples/jsm/postprocessing/SavePass.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ShaderMaterial, WebGLRenderTarget } from '../../../src/Three';
import { Pass } from './Pass';

export class SavePass extends Pass {
constructor(renderTarget: WebGLRenderTarget);
constructor(renderTarget?: WebGLRenderTarget);
textureID: string;
renderTarget: WebGLRenderTarget;
uniforms: object;
Expand Down
8 changes: 8 additions & 0 deletions types/three/test/postprocessing/postprocessing-savepass.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as THREE from 'three';
import { SavePass } from 'three/examples/jsm/postprocessing/SavePass';

let pass = new SavePass(); // $ExpectType SavePass
let rt = pass.renderTarget; // $ExpectType WebGLRenderTarget

pass = new SavePass(new THREE.WebGLRenderTarget(128, 128)); // $ExpectType SavePass
rt = pass.renderTarget; // $ExpectType WebGLRenderTarget
1 change: 1 addition & 0 deletions types/three/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"test/misc/misc-gpucomputationrender.ts",
"test/postprocessing/postprocessing-ssr.ts",
"test/postprocessing/postprocessing-effectcomposer-pass.ts",
"test/postprocessing/postprocessing-savepass.ts",
"test/renderers/renderers-renderTarget-multiple.ts",
"test/renderers/renderers-renderTarget-texture2DArray.ts",
"test/renderers/webxr/webxr-vr-cube.ts",
Expand Down

0 comments on commit ffbbd45

Please sign in to comment.