Add method to clear caches

This commit is contained in:
AlexandreSi
2023-10-09 17:51:28 +02:00
parent 69f2d52977
commit 9f82842a79
17 changed files with 63 additions and 59 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
import { LDtkTileMap } from '../load/ldtk/LDtkFormat';
import { TiledTileMap } from '../load/tiled/TiledFormat';
export declare type TileMapFileContent =
export type TileMapFileContent =
| {
kind: 'tiled';
data: TiledTileMap;

View File

@@ -1 +1 @@
{"version":3,"file":"TileMapFileContent.d.ts","sourceRoot":"","sources":["../../src/load/TileMapFileContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,oBAAY,kBAAkB,GAC1B;IACE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC"}
{"version":3,"file":"TileMapFileContent.d.ts","sourceRoot":"","sources":["../../src/load/TileMapFileContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC"}

View File

@@ -2,7 +2,7 @@ import { integer } from '../../model/CommonTypes';
/**
* version 1.1.3 - https://github.com/deepnight/ldtk/blob/66fff7199932357f3ab9b044c2fc2a856f527831/docs/JSON_SCHEMA.json
*/
export declare type LDtkTileMap = {
export type LDtkTileMap = {
/** LDtk application build identifier.<br/> This is only used to identify the LDtk version that generated this particular project file, which can be useful for specific bug fixing. Note that the build identifier is just the date of the release, so it's not unique to each user (one single global ID per LDtk public release), and as a result, completely anonymous. */
appBuildId: number;
/** Number of backup files to keep, if the `backupOnSave` is TRUE */
@@ -72,7 +72,7 @@ export declare type LDtkTileMap = {
| null;
};
/** Auto-layer rule group */
declare type LDtkAutoLayerRuleGroup = {
type LDtkAutoLayerRuleGroup = {
/** */
active: boolean;
/** *This field was removed in 1.0.0 and should no longer be used.* */
@@ -87,9 +87,9 @@ declare type LDtkAutoLayerRuleGroup = {
uid: integer;
};
/** This complex section isn't meant to be used by game devs at all, as these rules are completely resolved internally by the editor before any saving. You should just ignore this part. */
declare type LDtkAutoRuleDef = {};
type LDtkAutoRuleDef = {};
/** If you're writing your own LDtk importer, you should probably just ignore *most* stuff in the `defs` section, as it contains data that are mostly important to the editor. To keep you away from the `defs` section and avoid some unnecessary JSON parsing, important data from definitions is often duplicated in fields prefixed with a double underscore (eg. `__identifier` or `__type`). The 2 only definition types you might need here are **Tilesets** and **Enums**. */
declare type LDtkDefinition = {
type LDtkDefinition = {
/** All entities definitions, including their custom fields */
entities: LDtkEntityDef[];
/** All internal enums */
@@ -104,7 +104,7 @@ declare type LDtkDefinition = {
tilesets: LDtkTilesetDef[];
};
/** Entity definition */
declare type LDtkEntityDef = {
type LDtkEntityDef = {
/** Base entity color */
color: string;
/** Array of field definitions */
@@ -166,7 +166,7 @@ declare type LDtkEntityDef = {
width: integer;
};
/** Entity instance */
declare type LDtkEntityInstance = {
type LDtkEntityInstance = {
/** Grid-based coordinates (`[x,y]` format) */
__grid: integer[];
/** Entity definition identifier */
@@ -193,7 +193,7 @@ declare type LDtkEntityInstance = {
width: integer;
};
/** Enum definition */
declare type LDtkEnumDef = {
type LDtkEnumDef = {
/** */
externalFileChecksum: string | null;
/** Relative path to the external file providing this Enum */
@@ -210,7 +210,7 @@ declare type LDtkEnumDef = {
values: LDtkEnumDefValues[];
};
/** Enum value definition */
declare type LDtkEnumDefValues = {
type LDtkEnumDefValues = {
/** An array of 4 Int values that refers to the tile in the tileset image: `[ x, y, width, height ]` */
__tileSrcRect: integer[] | null;
/** Optional color */
@@ -221,14 +221,14 @@ declare type LDtkEnumDefValues = {
tileId: integer | null;
};
/** In a tileset definition, enum based tag infos */
declare type LDtkEnumTagValue = {
type LDtkEnumTagValue = {
/** */
enumValueId: string;
/** */
tileIds: integer[];
};
/** This section is mostly only intended for the LDtk editor app itself. You can safely ignore it. */
declare type LDtkFieldDef = {
type LDtkFieldDef = {
/** Human readable value type. Possible values: `Int, Float, String, Bool, Color, ExternEnum.XXX, LocalEnum.XXX, Point, FilePath`.<br/> If the field is an array, this field will look like `Array<...>` (eg. `Array<Int>`, `Array<Point>` etc.)<br/> NOTE: if you enable the advanced option **Use Multilines type**, you will have \"*Multilines*\" instead of \"*String*\" when relevant. */
__type: string;
/** Optional list of accepted file extensions for FilePath value type. Includes the dot: `.ext` */
@@ -310,7 +310,7 @@ declare type LDtkFieldDef = {
useForSmartColor: boolean;
};
/** Field instance */
declare type LDtkFieldInstance = {
type LDtkFieldInstance = {
/** Field definition identifier */
__identifier: string;
/** Optional TilesetRect used to display this field (this can be the field own Tile, or some other Tile guessed from the value, like an Enum). */
@@ -324,7 +324,7 @@ declare type LDtkFieldInstance = {
/** Editor internal raw values */
realEditorValues: any[];
};
declare type LDtkFlag =
type LDtkFlag =
| 'DiscardPreCsvIntGrid'
| 'ExportPreCsvIntGridFormat'
| 'IgnoreBackupSuggest'
@@ -332,7 +332,7 @@ declare type LDtkFlag =
| 'MultiWorlds'
| 'UseMultilinesType';
/** IntGrid value definition */
declare type LDtkIntGridValueDef = {
type LDtkIntGridValueDef = {
/** */
color: string;
/** User defined unique identifier */
@@ -341,14 +341,14 @@ declare type LDtkIntGridValueDef = {
value: integer;
};
/** IntGrid value instance */
declare type LDtkIntGridValueInstance = {
type LDtkIntGridValueInstance = {
/** Coordinate ID in the layer grid */
coordId: integer;
/** IntGrid value */
v: integer;
};
/** Layer definition */
declare type LDtkLayerDef = {
type LDtkLayerDef = {
/** Type of the layer (*IntGrid, Entities, Tiles or AutoLayer*) */
__type: string;
/** Contains all the auto-layer rule definitions. */
@@ -401,7 +401,7 @@ declare type LDtkLayerDef = {
uid: integer;
};
/** Layer instance */
declare type LDtkLayerInstance = {
type LDtkLayerInstance = {
/** Grid-based height */
__cHei: integer;
/** Grid-based width */
@@ -452,7 +452,7 @@ declare type LDtkLayerInstance = {
visible: boolean;
};
/** This section contains all the level data. It can be found in 2 distinct forms, depending on Project current settings: - If \"*Separate level files*\" is **disabled** (default): full level data is *embedded* inside the main Project JSON file, - If \"*Separate level files*\" is **enabled**: level data is stored in *separate* standalone `.ldtkl` files (one per level). In this case, the main Project JSON file will still contain most level data, except heavy sections, like the `layerInstances` array (which will be null). The `externalRelPath` string points to the `ldtkl` file. A `ldtkl` file is just a JSON file containing exactly what is described below. */
declare type LDtkLevel = {
type LDtkLevel = {
/** Background color of the level (same as `bgColor`, except the default value is automatically used here if its value is `null`) */
__bgColor: string;
/** Position informations of the background image, if there is one. */
@@ -497,7 +497,7 @@ declare type LDtkLevel = {
worldY: integer;
};
/** Level background image position info */
declare type LDtkLevelBgPosInfos = {
type LDtkLevelBgPosInfos = {
/** An array of 4 float values describing the cropped sub-rectangle of the displayed background image. This cropping happens when original is larger than the level bounds. Array format: `[ cropX, cropY, cropWidth, cropHeight ]` */
cropRect: number[];
/** An array containing the `[scaleX,scaleY]` values of the **cropped** background image, depending on `bgPos` option. */
@@ -506,7 +506,7 @@ declare type LDtkLevelBgPosInfos = {
topLeftPx: integer[];
};
/** Nearby level info */
declare type LDtkNeighbourLevel = {
type LDtkNeighbourLevel = {
/** A single lowercase character tipping on the level location (`n`orth, `s`outh, `w`est, `e`ast). */
dir: string;
/** Neighbour Instance Identifier */
@@ -515,7 +515,7 @@ declare type LDtkNeighbourLevel = {
levelUid: integer;
};
/** This structure represents a single tile from a given Tileset. */
declare type LDtkTile = {
type LDtkTile = {
/** Internal data used by the editor.<br/> For auto-layer tiles: `[ruleId, coordId]`.<br/> For tile-layer tiles: `[coordId]`. */
d: integer[];
/** \"Flip bits\", a 2-bits integer to represent the mirror transformations of the tile.<br/> - Bit 0 = X flip<br/> - Bit 1 = Y flip<br/> Examples: f=0 (no flip), f=1 (X flip only), f=2 (Y flip only), f=3 (both flips) */
@@ -528,7 +528,7 @@ declare type LDtkTile = {
t: integer;
};
/** The `Tileset` definition is the most important part among project definitions. It contains some extra informations about each integrated tileset. If you only had to parse one definition section, that would be the one. */
export declare type LDtkTilesetDef = {
export type LDtkTilesetDef = {
/** Grid-based height */
__cHei: integer;
/** Grid-based width */
@@ -565,14 +565,14 @@ export declare type LDtkTilesetDef = {
uid: integer;
};
/** In a tileset definition, user defined meta-data of a tile. */
declare type LDtkTileCustomMetadata = {
type LDtkTileCustomMetadata = {
/** */
data: string;
/** */
tileId: integer;
};
/** This object represents a custom sub rectangle in a Tileset image. */
declare type LDtkTilesetRect = {
type LDtkTilesetRect = {
/** Height in pixels */
h: integer;
/** UID of the tileset */
@@ -584,6 +584,6 @@ declare type LDtkTilesetRect = {
/** Y pixels coordinate of the top-left corner in the Tileset image */
y: integer;
};
declare type LDtkWorld = {};
type LDtkWorld = {};
export {};
//# sourceMappingURL=LDtkFormat.d.ts.map

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@ import { float, integer } from '../../model/CommonTypes';
/**
* Tiled JSON format (https://github.com/mapeditor/tiled/blob/master/docs/reference/json-map-format.rst).
*/
export declare type TiledTileMap = {
export type TiledTileMap = {
/** Hex-formatted color (#RRGGBB or #AARRGGBB) (optional) */
backgroundcolor?: string;
/** The compression level to use for tile layer data (defaults to -1, which means to use the algorithm default) */
@@ -44,7 +44,7 @@ export declare type TiledTileMap = {
/** Number of tile columns */
width: integer;
};
export declare type TiledLayer = {
export type TiledLayer = {
/** Array of {@link TiledChunk} (optional). `tilelayer` only. */
chunks?: Array<TiledChunk>;
/** `zlib`, `gzip`, `zstd` (since Tiled 1.3) or empty (default). `tilelayer` only. */
@@ -98,7 +98,7 @@ export declare type TiledLayer = {
/** Vertical layer offset in tiles. Always 0. */
y: integer;
};
export declare type TiledChunk = {
export type TiledChunk = {
/** Array of `unsigned` `integer` (GIDs) or base64-encoded data */
data: Array<integer> | string;
/** Height in tiles */
@@ -110,7 +110,7 @@ export declare type TiledChunk = {
/** Y coordinate in tiles */
y: integer;
};
export declare type TiledObject = {
export type TiledObject = {
/** The class of the object (was saved as class in 1.9, optional) */
type?: string;
/** The class of the object (used only in 1.9, optional) */
@@ -148,7 +148,7 @@ export declare type TiledObject = {
/** Y coordinate in pixels */
y: float;
};
export declare type TiledText = {
export type TiledText = {
/** Whether to use a bold font (default: `false`) */
bold: boolean;
/** Hex-formatted color (#RRGGBB or #AARRGGBB) (default: `#000000`) */
@@ -174,7 +174,7 @@ export declare type TiledText = {
/** Whether the text is wrapped within the object bounds (default: `false`) */
wrap: boolean;
};
export declare type TiledTileset = {
export type TiledTileset = {
/** Hex-formatted color (#RRGGBB or #AARRGGBB) (optional) */
backgroundcolor?: string;
/** The number of tile columns in the tileset */
@@ -226,7 +226,7 @@ export declare type TiledTileset = {
/** Array of {@link TiledWangSet} (since 1.1.5) */
wangsets?: Array<TiledWangSet>;
};
export declare type TiledGrid = {
export type TiledGrid = {
/** Cell height of tile grid */
height: integer;
/** `orthogonal` (default) or `isometric` */
@@ -234,13 +234,13 @@ export declare type TiledGrid = {
/** Cell width of tile grid */
width: integer;
};
export declare type TileOffset = {
export type TileOffset = {
/** Horizontal offset in pixels */
x: integer;
/** Vertical offset in pixels (positive is down) */
y: integer;
};
export declare type TiledTransformations = {
export type TiledTransformations = {
/** Tiles can be flipped horizontally */
hflip: boolean;
/** Tiles can be flipped vertically */
@@ -250,7 +250,7 @@ export declare type TiledTransformations = {
/** Whether untransformed tiles remain preferred, otherwise transformed tiles are used to produce more variations */
preferuntransformed: boolean;
};
export declare type TiledTileDefinition = {
export type TiledTileDefinition = {
/** Array of {@link TiledTiles} */
animation?: Array<TiledTileDefinition>;
/** The class of the object (was saved as class in 1.9, optional) */
@@ -274,13 +274,13 @@ export declare type TiledTileDefinition = {
/** Index of terrain for each corner of tile (optional) */
terrain?: Array<integer>;
};
export declare type TiledFrame = {
export type TiledFrame = {
/** Frame duration in milliseconds */
duration: integer;
/** Local tile ID representing this frame */
tileid: integer;
};
export declare type TiledTerrain = {
export type TiledTerrain = {
/** Name of terrain */
name: string;
/** Array of {@link TiledProperty} */
@@ -288,7 +288,7 @@ export declare type TiledTerrain = {
/** Local ID of tile representing terrain */
tile: integer;
};
export declare type TiledWangSet = {
export type TiledWangSet = {
/** Array of {@link TiledWangColor} */
colors: Array<TiledWangColor>;
/** Name of the Wang set */
@@ -300,7 +300,7 @@ export declare type TiledWangSet = {
/** Array of {@link TiledWangTile} */
wangtiles: Array<TiledWangTile>;
};
export declare type TiledWangColor = {
export type TiledWangColor = {
/** Hex-formatted color (#RRGGBB or #AARRGGBB) */
color: string;
/** Name of the Wang color */
@@ -312,13 +312,13 @@ export declare type TiledWangColor = {
/** Local ID of tile representing the Wang color */
tile: integer;
};
export declare type TiledWangTile = {
export type TiledWangTile = {
/** Local ID of tile */
tileid: integer;
/** Array of Wang color indexes (`uchar[8]`) */
wangid: Array<integer>;
};
export declare type TiledObjectTemplate = {
export type TiledObjectTemplate = {
/** `template` */
type: string;
/** External tileset used by the template (optional) */
@@ -326,7 +326,7 @@ export declare type TiledObjectTemplate = {
/** The object instantiated by this template */
object: Object;
};
export declare type TiledProperty = {
export type TiledProperty = {
/** Name of the property */
name: string;
/** type of the property (`string` (default), `integer`, `float`, `boolean`, `color` or `file` (since 0.16, with `color` and `file` added in 0.17)) */
@@ -334,7 +334,7 @@ export declare type TiledProperty = {
/** Value of the property */
value: string | number;
};
export declare type TiledPoint = {
export type TiledPoint = {
/** X coordinate in pixels */
x: float;
/** Y coordinate in pixels */

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,7 @@ export declare const decodeBase64LayerData: (
pako: any,
tiledLayer: TiledLayer
) => number[];
export declare type TiledGID = {
export type TiledGID = {
id: integer;
flippedHorizontally: boolean;
flippedVertically: boolean;

View File

@@ -1 +1 @@
{"version":3,"file":"TiledTileMapLoaderHelper.d.ts","sourceRoot":"","sources":["../../../src/load/tiled/TiledTileMapLoaderHelper.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,SAAU,GAAG,cAAc,UAAU,aAgDtE,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,mBAAmB,EAAE,OAAO,CAAC;IAC7B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,kBACvB,OAAO,KACrB,QAmBF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,GAAG,SAAS,CAEpB"}
{"version":3,"file":"TiledTileMapLoaderHelper.d.ts","sourceRoot":"","sources":["../../../src/load/tiled/TiledTileMapLoaderHelper.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,SAAU,GAAG,cAAc,UAAU,aAgDtE,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,mBAAmB,EAAE,OAAO,CAAC;IAC7B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,kBACvB,OAAO,KACrB,QAmBF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,GAAG,SAAS,CAEpB"}

View File

@@ -1,5 +1,5 @@
export declare type integer = number;
export declare type float = number;
export declare type FloatPoint = [float, float];
export declare type PolygonVertices = FloatPoint[];
export type FloatPoint = [float, float];
export type PolygonVertices = FloatPoint[];
//# sourceMappingURL=CommonTypes.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"CommonTypes.d.ts","sourceRoot":"","sources":["../../src/model/CommonTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,OAAO,GAAG,MAAM,CAAC;AACrC,MAAM,CAAC,OAAO,MAAM,KAAK,GAAG,MAAM,CAAC;AACnC,oBAAY,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAExC,oBAAY,eAAe,GAAG,UAAU,EAAE,CAAC"}
{"version":3,"file":"CommonTypes.d.ts","sourceRoot":"","sources":["../../src/model/CommonTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,OAAO,GAAG,MAAM,CAAC;AACrC,MAAM,CAAC,OAAO,MAAM,KAAK,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAExC,MAAM,MAAM,eAAe,GAAG,UAAU,EAAE,CAAC"}

View File

@@ -65,5 +65,6 @@ export declare class TileMapManager {
levelIndex: number,
callback: (textureCache: TileTextureCache | null) => void
): void;
clearCaches(): void;
}
//# sourceMappingURL=TileMapManager.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"TileMapManager.d.ts","sourceRoot":"","sources":["../../src/render/TileMapManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAA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Q,EAAE,CAAC,YAAY,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,GACxD,IAAI;IAwCP,WAAW,IAAI,IAAI;CAIpB"}

View File

@@ -1,9 +1,7 @@
import { TileTextureCache } from '../TileTextureCache';
import { LDtkTileMap } from '../../load/ldtk/LDtkFormat';
declare type Texture = PIXI.BaseTexture<PIXI.Resource>;
declare type TextureLoader = (
textureName: string
) => PIXI.BaseTexture<PIXI.Resource>;
type Texture = PIXI.BaseTexture<PIXI.Resource>;
type TextureLoader = (textureName: string) => PIXI.BaseTexture<PIXI.Resource>;
export declare namespace LDtkPixiHelper {
/**
* Split an atlas image into Pixi textures.

View File

@@ -1 +1 @@
{"version":3,"file":"LDtkPixiHelper.d.ts","sourceRoot":"","sources":["../../../src/render/ldtk/LDtkPixiHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAkB,MAAM,4BAA4B,CAAC;AAGzE,aAAK,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC/C,aAAK,aAAa,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAmC9E,yBAAiB,cAAc,CAAC;IAC9B;;;;;;;;OAQG;IACH,SAAgB,UAAU,CACxB,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,OAAO,GAAG,IAAI,EAC5B,UAAU,EAAE,aAAa,GACxB,gBAAgB,GAAG,IAAI,CAoFzB;CACF"}
{"version":3,"file":"LDtkPixiHelper.d.ts","sourceRoot":"","sources":["../../../src/render/ldtk/LDtkPixiHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAkB,MAAM,4BAA4B,CAAC;AAGzE,KAAK,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC/C,KAAK,aAAa,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAmC9E,yBAAiB,cAAc,CAAC;IAC9B;;;;;;;;OAQG;IACH,SAAgB,UAAU,CACxB,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,OAAO,GAAG,IAAI,EAC5B,UAAU,EAAE,aAAa,GACxB,gBAAgB,GAAG,IAAI,CAoFzB;CACF"}

View File

@@ -177,4 +177,9 @@ export class TileMapManager {
callback
);
}
clearCaches(): void {
this._tileMapCache = new ResourceCache<EditableTileMap>();
this._textureCacheCaches = new ResourceCache<TileTextureCache>();
}
}