Skip to content

Instantly share code, notes, and snippets.

@glaucomorais
Created May 3, 2019 09:18
Show Gist options
  • Save glaucomorais/15eb97215754cbd36ee9065a149210f8 to your computer and use it in GitHub Desktop.
Save glaucomorais/15eb97215754cbd36ee9065a149210f8 to your computer and use it in GitHub Desktop.
DragonBones Phaser plugin typing definitions for TypeScript.
declare namespace Phaser {
interface Scene {
dragonBone: dragonBones.phaser.plugin.DragonBonesScenePlugin;
}
namespace Loader {
interface LoaderPlugin {
dragonbone: (
dragonbonesName: string | object,
textureURL?: string,
atlasURL?: string,
boneURL?: string,
textureXhrSettings?: XHRSettingsObject,
atlasXhrSettings?: XHRSettingsObject,
boneXhrSettings?: XHRSettingsObject) => LoaderPlugin;
}
}
namespace GameObjects {
interface GameObjectFactory {
armature(
armature: string,
dragonBones?: string,
skinName?: string,
atlasTextureName?: string): dragonBones.phaser.display.ArmatureDisplay;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment