2.4 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	Phaser 3.60.0 Change Log
Return to the Change Log index.
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.compressionAlgorithmis now populated with the compression format used by the texture.
- Types.Textures.CompressedTextureDatais the new compressed texture configuration object type.
- TextureManager.addCompressedTextureis a new method that will add a compressed texture, and optionally atlas data into the Texture Manager and return a- Textureobject than any Sprite can use.
- Textures.Parsers.KTXParseris a new parser for the KTX compression container format.
- Textures.Parsers.PVRParseris a new parser for the PVR compression container format.
- The WebGLRenderer.compressionproperty now holds a more in-depth object containing supported compression formats.
- The WebGLRenderer.createTextureFromSourcemethod now accepts theCompressedTextureDatadata objects and creates WebGL textures from them.
- WebGLRenderer.getCompressedTexturesis a new method that will populate the- WebGLRenderer.compressionobject and return its value. This is called automatically when the renderer boots.
- WebGLRenderer.getCompressedTextureNameis a new method that will return a compressed texture format GLenum based on the given format.
Return to the Change Log index.
📖 Read the Phaser 3 API Docs 💻 Browse 2000+ Code Examples 🤝 Join the awesome Phaser Discord