MCPcopy Create free account
hub / github.com/melonjs/melonJS / makeCollectionWithSubRect

Function makeCollectionWithSubRect

packages/melonjs/tests/tmxtileset.spec.js:880–899  ·  view source on GitHub ↗
(tileData)

Source from the content-addressed store, hash-verified

878 // ==============================================================
879 describe("tile sub-rectangles (Tiled 1.9+)", () => {
880 function makeCollectionWithSubRect(tileData) {
881 fakeImage("subrect", 64, 64);
882 return new TMXTileset({
883 firstgid: 1,
884 name: "subcollection",
885 tilewidth: 32,
886 tileheight: 32,
887 tilecount: 1,
888 columns: 0,
889 tiles: [
890 {
891 id: 0,
892 image: "subrect.png",
893 imagewidth: 64,
894 imageheight: 64,
895 ...tileData,
896 },
897 ],
898 });
899 }
900
901 it("should store sub-rectangle from tile entry", () => {
902 const ts = makeCollectionWithSubRect({

Callers 1

tmxtileset.spec.jsFile · 0.85

Calls 1

fakeImageFunction · 0.70

Tested by

no test coverage detected