Skip to content

Commit

Permalink
Use a better looking invalid/missing texture placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
4ian committed Dec 2, 2024
1 parent 066c8cd commit 7e1aca2
Show file tree
Hide file tree
Showing 21 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Extensions/TileMap/helper/TileMapHelper.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Extensions/TileMap/helper/TileMapHelper.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion GDJS/Runtime/pixi-renderers/pixi-image-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ namespace gdjs {
constructor(resourceLoader: gdjs.ResourceLoader) {
this._resourceLoader = resourceLoader;
this._invalidTexture = PIXI.Texture.from(
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAFElEQVQoU2P8z/D/PwMewDgyFAAApMMX8Zi0uXAAAAAASUVORK5CYIIA'
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAAAkFBMVEWdIvr///+hOfrx6v7i0/39/P+eK/rn2v6vbPv7+f/cx/359v/38v7s4v7Wvf3LqvzFnvysY/v18P6jQvrz7P7u5P7ezP3Or/yoV/qlTfrq3v7l1v3hz/2fLvrTuPy0efufMvraxP3YwP3AlPu2fvuuavvRtPy8i/uqXfu5hvvIo/y4gvuxcvugNfq+j/vCmfxfwZ2lAAAF60lEQVR42uzPMQ0AAAjEQPBvmhkBDE+uAppcdXgfAHXY9R4AAAAAAAAAAGAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA/YAQAMNfa2nCoMhmE4HxhcFESggMhGtNa11NLl/d9dO53pQRMklPKn4TllhuEdEjb/CK/WWPXvBTjOOVxvDsvVO3u03e8EnC9BZnNMwNcfYDU728NkLpoDLpmPSQU6Ax5vNsfE0lpbwOs1AYGbroDnBCQyPQH7tQsanpYAqwQVftEQEKWgE9AHtAkIpTV1QBO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PSbAH0kLJnBBlS+wm/PleFiSBIg22PoZiLi/yZ3AkC9zRuG69hLhoCplwHKMMtaOQwu+XR3itfnXOvcOq9VMe8aGp5mNUqUPT9crADyUcyZAgCAAdJSzvwIBgoDEQjlWJu/xWoaVgRfMa+0dAuBg4MUE178xYDuR2t8zAI4MLyfE6fAAvhsxKeN81wDIsYUVbQYGrMZ4QcTvGwBrbGWXX0/XBvDDmOEFQQp3DuARdljEiQa9cf+Y4WWb+289LiLsNB+7uz4RxS7WGbbIKfZO85phD8Y8Ko/bWcJBwt/PdlMzMLDduqDZ/L0zsDcrdJxFNI3dX+JppDuOM8c+oiXV7vXVCB8gO9Ftv/czJJdplOcHuGshLfNEfABiFyKlbEl+gqOoGZKJl484gjLLkEa4HTobfYlxxGrtgWcpzzremf7x2OO4vMoMvBsWnjkQB4gmEd5J8PU5r2nj23yEt1scORAFdCsm0znD4Zg9/eC0a+JuVa0bOARb5BXpor4/v8qdOV7DDstvKQd4kYAfllW/l+Sx+RfzW+XDDy8V8BPnyc511wvHCQPb+F3DDDsIHcfJStc9p5w//zRrL1qazH7ZJ6nP4a8XOI77IlTAld4w4FVu7qqA31SAClABKkAFqAAVoAJUgApQASpABagAFaACVIAKUAH/TcB7e/uA7+03ZsJSaNOuAAAAAElFTkSuQmCC',
{ width: 192, height: 192 }
);
this._loadedThreeTextures = new Hashtable();
this._loadedThreeMaterials = new Hashtable();
Expand Down
2 changes: 1 addition & 1 deletion SharedLibs/TileMapHelper/src/render/ldtk/LDtkPixiHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function getAtlasTexture(
texture = getTexture(tileset.relPath);

// @ts-ignore
if (texture.baseTexture?.cacheId === "res/error48.png") {
if (texture.baseTexture?.cacheId === "res/invalid_texture.png") {
console.error(`The atlas texture "${tileset.relPath}" can't be loaded`);

texture = null;
Expand Down
Binary file removed newIDE/app/public/res/error.png
Binary file not shown.
Binary file removed newIDE/app/public/res/error24.png
Binary file not shown.
Binary file removed newIDE/app/public/res/errorimage.png
Binary file not shown.
Binary file added newIDE/app/public/res/invalid_texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed newIDE/app/public/res/powered-boost.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-cpp.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-gcc.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-js.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-pixijs.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-sfml.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-st.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-tinyxml.png
Binary file not shown.
Binary file removed newIDE/app/public/res/powered-wx.png
Binary file not shown.
Binary file removed newIDE/app/public/res/projectManager24.png
Binary file not shown.
Binary file removed newIDE/app/public/res/projectUpdate24.png
Binary file not shown.
Binary file removed newIDE/app/public/res/quiticon.png
Binary file not shown.
2 changes: 1 addition & 1 deletion newIDE/app/src/ObjectsRendering/PixiResourcesLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type ResourcePromise<T> = { [resourceName: string]: Promise<T> };
let loadedBitmapFonts = {};
let loadedFontFamilies = {};
let loadedTextures = {};
const invalidTexture = PIXI.Texture.from('res/error48.png');
const invalidTexture = PIXI.Texture.from('res/invalid_texture.png');
const loadingTexture = PIXI.Texture.from(
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAAA1BMVEXX19f5cgrAAAAAAXRSTlMz/za5cAAAAApJREFUCNdjQAMAABAAAbSqgB8AAAAASUVORK5CYII='
);
Expand Down

0 comments on commit 7e1aca2

Please sign in to comment.