mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 19:43:28 +00:00
25 lines
2.4 KiB
Markdown
25 lines
2.4 KiB
Markdown
# Phaser 3.60.0 Change Log
|
|
|
|
Return to the [Change Log index](CHANGELOG-v3.60.md).
|
|
|
|
## New Feature - Compressed Texture Support
|
|
|
|
Phaser 3.60 contains support for Compressed Textures. It can parse both KTX and PVR containers and within those has support for the following formats: ETC, ETC1, ATC, ASTC, BPTC, RGTC, PVRTC, S3TC and S3TCSRB. Compressed Textures differ from normal textures in that their structure is optimized for fast GPU data reads and lower memory consumption. Popular tools that can create compressed textures include PVRTexTool, ASTC Encoder and Texture Packer.
|
|
|
|
Compressed Textures are loaded using the new `this.load.texture` method, which takes a texture configuration object that maps the formats to the files. The browser will then download the first file in the object that it knows it can support. You can also provide Texture Atlas JSON data, or Multi Atlas JSON data, too, so you can use compressed texture atlases. Currently, Texture Packer is the best tool for creating these type of files.
|
|
|
|
* `TextureSoure.compressionAlgorithm` is now populated with the compression format used by the texture.
|
|
* `Types.Textures.CompressedTextureData` is the new compressed texture configuration object type.
|
|
* `TextureManager.addCompressedTexture` is a new method that will add a compressed texture, and optionally atlas data into the Texture Manager and return a `Texture` object than any Sprite can use.
|
|
* `Textures.Parsers.KTXParser` is a new parser for the KTX compression container format.
|
|
* `Textures.Parsers.PVRParser` is a new parser for the PVR compression container format.
|
|
* The `WebGLRenderer.compression` property now holds a more in-depth object containing supported compression formats.
|
|
* The `WebGLRenderer.createTextureFromSource` method now accepts the `CompressedTextureData` data objects and creates WebGL textures from them.
|
|
* `WebGLRenderer.getCompressedTextures` is a new method that will populate the `WebGLRenderer.compression` object and return its value. This is called automatically when the renderer boots.
|
|
* `WebGLRenderer.getCompressedTextureName` is a new method that will return a compressed texture format GLenum based on the given format.
|
|
|
|
---------------------------------------
|
|
|
|
Return to the [Change Log index](CHANGELOG-v3.60.md).
|
|
|
|
📖 Read the [Phaser 3 API Docs](https://newdocs.phaser.io/) 💻 Browse 2000+ [Code Examples](https://labs.phaser.io) 🤝 Join the awesome [Phaser Discord](https://discord.gg/phaser)
|