Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use literal types for constants #478

Merged
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
12 changes: 12 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,18 @@
"contributions": [
"code"
]
},
{
"login": "OndrejSpanel",
"name": "Ondřej Španěl",
"avatar_url": "https://avatars.githubusercontent.com/u/6927223?v=4",
"profile": "https://github.com/OndrejSpanel",
"contributions": [
"bug",
"code",
"doc",
"maintenance"
]
}
],
"skipCi": true,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/servinlp"><img src="https://avatars.githubusercontent.com/u/7222029?v=4?s=100" width="100px;" alt="Servin Nissen"/><br /><sub><b>Servin Nissen</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=servinlp" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://benpigchu.com/"><img src="https://avatars.githubusercontent.com/u/9023067?v=4?s=100" width="100px;" alt="Ben "Pig" Chu"/><br /><sub><b>Ben "Pig" Chu</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=benpigchu" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://benpigchu.com/"><img src="https://avatars.githubusercontent.com/u/9023067?v=4?s=100" width="100px;" alt="Ben &quot;Pig&quot; Chu"/><br /><sub><b>Ben &quot;Pig&quot; Chu</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=benpigchu" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/woo-cie"><img src="https://avatars.githubusercontent.com/u/24642989?v=4?s=100" width="100px;" alt="Makoto Yamada"/><br /><sub><b>Makoto Yamada</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=woo-cie" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/schwyzl"><img src="https://avatars.githubusercontent.com/u/1556979?v=4?s=100" width="100px;" alt="schwyzl"/><br /><sub><b>schwyzl</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=schwyzl" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Degubi"><img src="https://avatars.githubusercontent.com/u/13366932?v=4?s=100" width="100px;" alt="Degubi"/><br /><sub><b>Degubi</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Degubi" title="Code">💻</a></td>
Expand Down Expand Up @@ -141,6 +141,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mik-pe"><img src="https://avatars.githubusercontent.com/u/5653426?v=4?s=100" width="100px;" alt="Mikael Pettersson"/><br /><sub><b>Mikael Pettersson</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Mik-pe" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/magnostherobot"><img src="https://avatars.githubusercontent.com/u/24718981?v=4?s=100" width="100px;" alt="Tom Harley"/><br /><sub><b>Tom Harley</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Mik-pe" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/OndrejSpanel"><img src="https://avatars.githubusercontent.com/u/6927223?v=4?s=100" width="100px;" alt="Ondřej Španěl"/><br /><sub><b>Ondřej Španěl</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/issues?q=author%3AOndrejSpanel" title="Bug reports">🐛</a> <a href="https://github.com/three-types/three-ts-types/commits?author=OndrejSpanel" title="Code">💻</a> <a href="https://github.com/three-types/three-ts-types/commits?author=OndrejSpanel" title="Documentation">📖</a> <a href="#maintenance-OndrejSpanel" title="Maintenance">🚧</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions types/three/src/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export const RGIntegerFormat: 1031;
*/
export const RGBAIntegerFormat: 1033;

export const _SRGBAFormat = 1035; // fallback for WebGL 1
export const _SRGBAFormat: 1035; // fallback for WebGL 1

/**
* Texture Pixel Formats Modes. Compatible only with {@link WebGLRenderingContext | WebGL 1 Rendering Context}.
Expand Down Expand Up @@ -709,7 +709,7 @@ export type NormalMapTypes = typeof TangentSpaceNormalMap | typeof ObjectSpaceNo
export const NoColorSpace: '';
export const SRGBColorSpace: 'srgb';
export const LinearSRGBColorSpace: 'srgb-linear';
export const DisplayP3ColorSpace = 'display-p3';
export const DisplayP3ColorSpace: 'display-p3';
export type ColorSpace =
| typeof NoColorSpace
| typeof SRGBColorSpace
Expand Down