1.2.5 • Published 2 years ago

@haizor/rotmg-utils v1.2.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

RotMG Utils

A library for automating parsing of Realm of the Mad God XML & spritesheets.

Basic Usage

	import { AssetManager } from "@haizor/rotmg-utils"

	const manager = new AssetManager();
	
	//Register the loader used to parse the RotMG assets
	manager.registerLoader("rotmg-asset", new RotMGAssetLoader());

	manager.load({
		name: "base",
		default: true,
		containers: [
			{
				loader: "rotmg-asset",
				type: "rotmg",
				sourceLoader: "url-to-text",
				settings: {
					readOnly: true,
					type: "object"
				},
				
				sources: [
					"https://www.haizor.net/rotmg/assets/production/xml/equip.xml"
				]
			}
		]
	}).then(() => {
		//Get takes the type of the asset, and an ID, which can be either the type (number) or the id (string) when referring to RotMG assets.
		const equip = manager.get<Equipment>("rotmg", "Short Sword");
	});
1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago