skeddles Posted January 14, 2019 Share Posted January 14, 2019 I created a bitmap font using littera I have pixi-tiledmap installed to load maps When I add the .fnt file into my loader, I get an error, which seems to be coming from pixi-tiledmap Loader.add('thintel', '/gurklike/thintel.fnt'); Quote TypeError: o is null pixi-tiledmap.min.js:13 does anyone know why this would happen? it doesn't seem like pixi-tiledmap should be involved at all. I redid the font file with BMFont, and I get the same exact error Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 14, 2019 Share Posted January 14, 2019 Find where it crashes, fix it, make PR: https://github.com/riebel/pixi-tiledmap/blob/master/src/tiledMapLoader.js , or just patch built JS directly. I don't know author of this plugin. Quote Link to comment Share on other sites More sharing options...
skeddles Posted January 14, 2019 Author Share Posted January 14, 2019 Thanks for that link, I was able to fix it by changing !resource.data.children[0].getElementsByTagName('tileset') to resource.extension !== 'tmx' Not sure that that would mess anything up for other people, but it seems like you'd only want .tmx files to be processed by this script. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 14, 2019 Share Posted January 14, 2019 I suggest you make PR for it, at least as an option if (resource.extension !== 'tmx' && !resource.metadata.isTilemap) { next(); return; } Just in case someone renames the file extension. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.