8000 Bug: Bitmap font XML not phrased and exported correctly · Issue #88 · pixijs/assetpack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Bug: Bitmap font XML not phrased and exported correctly #88
Open
@furic

Description

@furic

Description

With Cache Buster, Compression and Mipmaps turned on, Bitmap font cannot be correctly phrased in the manifest. This causes error when loading the bundle.

Steps to Reproduce

raw-assets-game-screen-bundle
  • Some basic pipes settings as:
pipes: [
	...pixiPipes({
		resolutions: { high: 3, default: 2, low: 1 },
		manifest: {
			trimExtensions: true
		},
	}),
],
  • Run asset pack
  • Load the generated manifest and bundle, Pixi should pickup and load the Bitmap font from the XML
await PIXI.Assets.init({
	basePath: 'public/assets',
	manifest,
	texturePreference: { resolution: [window.devicePixelRatio, 1], format: ['webp', 'png'] },
});
await PIXI.Assets.loadBundle('game-screen');

Current Behaviour

desyel.png got phrased correctly, exported as all resolutions and formats with hashes, but desyel.xml was not phrased and simply got renamed and copied to the output folder.
public-assets-game-screen-bundle-current

In desyel-xxxxx.png.xml, it still reference the desyel.png:

<font>
    <info  ... />
    <common .../>
    <pages>
        <page id="0" file="desyrel.png"/>
    </pages>

When running PIXI.Assets.loadBundle('game-screen'), PIXI cannot find desyrel.png (because it's phrased to desyrel-xxxxx.png etc), 404 error occurs.

Expected Behaviour

desyel.xml should get phrased into all resolutions, formats with hashes, and each reference to its corresponding texture. Similar to how the spine atlas gets phrased.
public-assets-game-screen-bundle-expected

Checking the Pixi.js Bitmap test-assets, each bitmap texture has its own data file (XML, FNT, etc), although the data files should be almost the same, but with different filename and size values.
pixijs-bitmap-test-files

Pixi's Side Solution?

I think this can also be fixed on Pixi's side. We always have ONE XML with different textures. When Pixi reads the XML and sees desyel.png, for example, it should reference back to the manifest and try to load the correct texture from the manifest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0