[ts] Attempt to fix incompatibility with Node's ESM implementation. See #2407

This commit is contained in:
Mario Zechner 2023-11-06 12:42:00 +01:00
parent c00ffb2e2d
commit 9d4d86ced3
81 changed files with 349 additions and 339 deletions

3
spine-ts/main.mjs Normal file
View File

@ -0,0 +1,3 @@
import { SkeletonJson } from "./spine-core/dist/index.js";
console.log(new SkeletonJson());

View File

@ -2,6 +2,7 @@
"name": "@esotericsoftware/spine-ts",
"version": "4.1.44",
"description": "The official Spine Runtimes for the web.",
"type": "module",
"files": [
"README.md"
],

View File

@ -4,6 +4,7 @@
"description": "The official Spine Runtimes for the web.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist/**/*",
"README.md",

View File

@ -28,7 +28,7 @@
*****************************************************************************/
import { AssetManagerBase, Downloader } from "@esotericsoftware/spine-core"
import { CanvasTexture } from "./CanvasTexture";
import { CanvasTexture } from "./CanvasTexture.js";
export class AssetManager extends AssetManagerBase {
constructor (pathPrefix: string = "", downloader: Downloader = new Downloader()) {

View File

@ -28,7 +28,7 @@
*****************************************************************************/
import { Utils, Color, Skeleton, RegionAttachment, BlendMode, MeshAttachment, Slot, TextureRegion, TextureAtlasRegion } from "@esotericsoftware/spine-core";
import { CanvasTexture } from "./CanvasTexture";
import { CanvasTexture } from "./CanvasTexture.js";
const worldVertices = Utils.newFloatArray(8);

View File

@ -1,4 +1,4 @@
export * from "./AssetManager";
export * from "./CanvasTexture";
export * from "./SkeletonRenderer";
export * from "./AssetManager.js";
export * from "./CanvasTexture.js";
export * from "./SkeletonRenderer.js";
export * from "@esotericsoftware/spine-core"

View File

@ -4,6 +4,7 @@
"description": "The official Spine Runtimes for the web.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist/**/*",
"README.md",

View File

@ -27,16 +27,16 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { VertexAttachment, Attachment } from "./attachments/Attachment";
import { IkConstraint } from "./IkConstraint";
import { PathConstraint } from "./PathConstraint";
import { Skeleton } from "./Skeleton";
import { Slot } from "./Slot";
import { TransformConstraint } from "./TransformConstraint";
import { StringSet, Utils, MathUtils, NumberArrayLike } from "./Utils";
import { Event } from "./Event";
import { HasTextureRegion } from "./attachments/HasTextureRegion";
import { SequenceMode, SequenceModeValues } from "./attachments/Sequence";
import { VertexAttachment, Attachment } from "./attachments/Attachment.js";
import { IkConstraint } from "./IkConstraint.js";
import { PathConstraint } from "./PathConstraint.js";
import { Skeleton } from "./Skeleton.js";
import { Slot } from "./Slot.js";
import { TransformConstraint } from "./TransformConstraint.js";
import { StringSet, Utils, MathUtils, NumberArrayLike } from "./Utils.js";
import { Event } from "./Event.js";
import { HasTextureRegion } from "./attachments/HasTextureRegion.js";
import { SequenceMode, SequenceModeValues } from "./attachments/Sequence.js";
/** A simple container for a list of timelines and a name. */
export class Animation {

View File

@ -27,12 +27,12 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Animation, MixBlend, AttachmentTimeline, MixDirection, RotateTimeline, DrawOrderTimeline, Timeline, EventTimeline } from "./Animation";
import { AnimationStateData } from "./AnimationStateData";
import { Skeleton } from "./Skeleton";
import { Slot } from "./Slot";
import { StringSet, Pool, Utils, MathUtils } from "./Utils";
import { Event } from "./Event";
import { Animation, MixBlend, AttachmentTimeline, MixDirection, RotateTimeline, DrawOrderTimeline, Timeline, EventTimeline } from "./Animation.js";
import { AnimationStateData } from "./AnimationStateData.js";
import { Skeleton } from "./Skeleton.js";
import { Slot } from "./Slot.js";
import { StringSet, Pool, Utils, MathUtils } from "./Utils.js";
import { Event } from "./Event.js";
/** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Animation } from "./Animation";
import { SkeletonData } from "./SkeletonData";
import { StringMap } from "./Utils";
import { Animation } from "./Animation.js";
import { SkeletonData } from "./SkeletonData.js";
import { StringMap } from "./Utils.js";
/** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Texture } from "./Texture";
import { TextureAtlas } from "./TextureAtlas";
import { Disposable, StringMap } from "./Utils";
import { Texture } from "./Texture.js";
import { TextureAtlas } from "./TextureAtlas.js";
import { Disposable, StringMap } from "./Utils.js";
export class AssetManagerBase implements Disposable {
private pathPrefix: string = "";

View File

@ -27,15 +27,15 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { AttachmentLoader } from "./attachments/AttachmentLoader";
import { BoundingBoxAttachment } from "./attachments/BoundingBoxAttachment";
import { ClippingAttachment } from "./attachments/ClippingAttachment";
import { MeshAttachment } from "./attachments/MeshAttachment";
import { PathAttachment } from "./attachments/PathAttachment";
import { PointAttachment } from "./attachments/PointAttachment";
import { RegionAttachment } from "./attachments/RegionAttachment";
import { Skin } from "./Skin";
import { TextureAtlas } from "./TextureAtlas";
import { AttachmentLoader } from "./attachments/AttachmentLoader.js";
import { BoundingBoxAttachment } from "./attachments/BoundingBoxAttachment.js";
import { ClippingAttachment } from "./attachments/ClippingAttachment.js";
import { MeshAttachment } from "./attachments/MeshAttachment.js";
import { PathAttachment } from "./attachments/PathAttachment.js";
import { PointAttachment } from "./attachments/PointAttachment.js";
import { RegionAttachment } from "./attachments/RegionAttachment.js";
import { Skin } from "./Skin.js";
import { TextureAtlas } from "./TextureAtlas.js";
import { Sequence } from "./attachments/Sequence"
/** An {@link AttachmentLoader} that configures attachments using texture regions from an {@link TextureAtlas}.

View File

@ -27,10 +27,10 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { BoneData, TransformMode } from "./BoneData";
import { Skeleton } from "./Skeleton";
import { Updatable } from "./Updatable";
import { MathUtils, Vector2 } from "./Utils";
import { BoneData, TransformMode } from "./BoneData.js";
import { Skeleton } from "./Skeleton.js";
import { Updatable } from "./Updatable.js";
import { MathUtils, Vector2 } from "./Utils.js";
/** Stores a bone's current pose.
*

View File

@ -27,7 +27,7 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Color } from "./Utils";
import { Color } from "./Utils.js";
/** Stores the setup pose for a {@link Bone}. */
export class BoneData {

View File

@ -27,7 +27,7 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { EventData } from "./EventData";
import { EventData } from "./EventData.js";
/** Stores the current pose values for an {@link Event}.
*

View File

@ -27,12 +27,12 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Bone } from "./Bone";
import { TransformMode } from "./BoneData";
import { IkConstraintData } from "./IkConstraintData";
import { Skeleton } from "./Skeleton";
import { Updatable } from "./Updatable";
import { MathUtils } from "./Utils";
import { Bone } from "./Bone.js";
import { TransformMode } from "./BoneData.js";
import { IkConstraintData } from "./IkConstraintData.js";
import { Skeleton } from "./Skeleton.js";
import { Updatable } from "./Updatable.js";
import { MathUtils } from "./Utils.js";
/** Stores the current pose for an IK constraint. An IK constraint adjusts the rotation of 1 or 2 constrained bones so the tip of
* the last bone is as close to the target bone as possible.

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { BoneData } from "./BoneData";
import { ConstraintData } from "./ConstraintData";
import { BoneData } from "./BoneData.js";
import { ConstraintData } from "./ConstraintData.js";
/** Stores the setup pose for an {@link IkConstraint}.

View File

@ -27,13 +27,13 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { PathAttachment } from "./attachments/PathAttachment";
import { Bone } from "./Bone";
import { PathConstraintData, RotateMode, SpacingMode, PositionMode } from "./PathConstraintData";
import { Skeleton } from "./Skeleton";
import { Slot } from "./Slot";
import { Updatable } from "./Updatable";
import { Utils, MathUtils } from "./Utils";
import { PathAttachment } from "./attachments/PathAttachment.js";
import { Bone } from "./Bone.js";
import { PathConstraintData, RotateMode, SpacingMode, PositionMode } from "./PathConstraintData.js";
import { Skeleton } from "./Skeleton.js";
import { Slot } from "./Slot.js";
import { Updatable } from "./Updatable.js";
import { Utils, MathUtils } from "./Utils.js";
/** Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { BoneData } from "./BoneData";
import { ConstraintData } from "./ConstraintData";
import { SlotData } from "./SlotData";
import { BoneData } from "./BoneData.js";
import { ConstraintData } from "./ConstraintData.js";
import { SlotData } from "./SlotData.js";
/** Stores the setup pose for a {@link PathConstraint}.

View File

@ -27,19 +27,19 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Attachment } from "./attachments/Attachment";
import { MeshAttachment } from "./attachments/MeshAttachment";
import { PathAttachment } from "./attachments/PathAttachment";
import { RegionAttachment } from "./attachments/RegionAttachment";
import { Bone } from "./Bone";
import { IkConstraint } from "./IkConstraint";
import { PathConstraint } from "./PathConstraint";
import { SkeletonData } from "./SkeletonData";
import { Skin } from "./Skin";
import { Slot } from "./Slot";
import { TransformConstraint } from "./TransformConstraint";
import { Updatable } from "./Updatable";
import { Color, Utils, MathUtils, Vector2, NumberArrayLike } from "./Utils";
import { Attachment } from "./attachments/Attachment.js";
import { MeshAttachment } from "./attachments/MeshAttachment.js";
import { PathAttachment } from "./attachments/PathAttachment.js";
import { RegionAttachment } from "./attachments/RegionAttachment.js";
import { Bone } from "./Bone.js";
import { IkConstraint } from "./IkConstraint.js";
import { PathConstraint } from "./PathConstraint.js";
import { SkeletonData } from "./SkeletonData.js";
import { Skin } from "./Skin.js";
import { Slot } from "./Slot.js";
import { TransformConstraint } from "./TransformConstraint.js";
import { Updatable } from "./Updatable.js";
import { Color, Utils, MathUtils, Vector2, NumberArrayLike } from "./Utils.js";
/** Stores the current pose for a skeleton.
*

View File

@ -27,22 +27,22 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Animation, Timeline, AttachmentTimeline, RGBATimeline, RGBTimeline, RGBA2Timeline, RGB2Timeline, AlphaTimeline, RotateTimeline, TranslateTimeline, TranslateXTimeline, TranslateYTimeline, ScaleTimeline, ScaleXTimeline, ScaleYTimeline, ShearTimeline, ShearXTimeline, ShearYTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline, PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline, CurveTimeline1, CurveTimeline2, CurveTimeline, SequenceTimeline } from "./Animation";
import { VertexAttachment, Attachment } from "./attachments/Attachment";
import { AttachmentLoader } from "./attachments/AttachmentLoader";
import { HasTextureRegion } from "./attachments/HasTextureRegion";
import { MeshAttachment } from "./attachments/MeshAttachment";
import { Sequence, SequenceModeValues } from "./attachments/Sequence";
import { BoneData } from "./BoneData";
import { Event } from "./Event";
import { EventData } from "./EventData";
import { IkConstraintData } from "./IkConstraintData";
import { PathConstraintData, PositionMode, SpacingMode } from "./PathConstraintData";
import { SkeletonData } from "./SkeletonData";
import { Skin } from "./Skin";
import { SlotData } from "./SlotData";
import { TransformConstraintData } from "./TransformConstraintData";
import { Color, Utils } from "./Utils";
import { Animation, Timeline, AttachmentTimeline, RGBATimeline, RGBTimeline, RGBA2Timeline, RGB2Timeline, AlphaTimeline, RotateTimeline, TranslateTimeline, TranslateXTimeline, TranslateYTimeline, ScaleTimeline, ScaleXTimeline, ScaleYTimeline, ShearTimeline, ShearXTimeline, ShearYTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline, PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline, CurveTimeline1, CurveTimeline2, CurveTimeline, SequenceTimeline } from "./Animation.js";
import { VertexAttachment, Attachment } from "./attachments/Attachment.js";
import { AttachmentLoader } from "./attachments/AttachmentLoader.js";
import { HasTextureRegion } from "./attachments/HasTextureRegion.js";
import { MeshAttachment } from "./attachments/MeshAttachment.js";
import { Sequence, SequenceModeValues } from "./attachments/Sequence.js";
import { BoneData } from "./BoneData.js";
import { Event } from "./Event.js";
import { EventData } from "./EventData.js";
import { IkConstraintData } from "./IkConstraintData.js";
import { PathConstraintData, PositionMode, SpacingMode } from "./PathConstraintData.js";
import { SkeletonData } from "./SkeletonData.js";
import { Skin } from "./Skin.js";
import { SlotData } from "./SlotData.js";
import { TransformConstraintData } from "./TransformConstraintData.js";
import { Color, Utils } from "./Utils.js";
/** Loads skeleton data in the Spine binary format.
*

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { BoundingBoxAttachment } from "./attachments/BoundingBoxAttachment";
import { Skeleton } from "./Skeleton";
import { NumberArrayLike, Pool, Utils } from "./Utils";
import { BoundingBoxAttachment } from "./attachments/BoundingBoxAttachment.js";
import { Skeleton } from "./Skeleton.js";
import { NumberArrayLike, Pool, Utils } from "./Utils.js";
/** Collects each visible {@link BoundingBoxAttachment} and computes the world vertices for its polygon. The polygon vertices are
* provided along with convenience methods for doing hit detection. */

View File

@ -27,10 +27,10 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { ClippingAttachment } from "./attachments/ClippingAttachment";
import { Slot } from "./Slot";
import { Triangulator } from "./Triangulator";
import { Utils, Color, NumberArrayLike } from "./Utils";
import { ClippingAttachment } from "./attachments/ClippingAttachment.js";
import { Slot } from "./Slot.js";
import { Triangulator } from "./Triangulator.js";
import { Utils, Color, NumberArrayLike } from "./Utils.js";
export class SkeletonClipping {
private triangulator = new Triangulator();

View File

@ -28,13 +28,13 @@
*****************************************************************************/
import { Animation } from "./Animation"
import { BoneData } from "./BoneData";
import { EventData } from "./EventData";
import { IkConstraintData } from "./IkConstraintData";
import { PathConstraintData } from "./PathConstraintData";
import { Skin } from "./Skin";
import { SlotData } from "./SlotData";
import { TransformConstraintData } from "./TransformConstraintData";
import { BoneData } from "./BoneData.js";
import { EventData } from "./EventData.js";
import { IkConstraintData } from "./IkConstraintData.js";
import { PathConstraintData } from "./PathConstraintData.js";
import { Skin } from "./Skin.js";
import { SlotData } from "./SlotData.js";
import { TransformConstraintData } from "./TransformConstraintData.js";
/** Stores the setup pose and all of the stateless data for a skeleton.
*

View File

@ -27,23 +27,23 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Animation, Timeline, AttachmentTimeline, RGBATimeline, RGBTimeline, AlphaTimeline, RGBA2Timeline, RGB2Timeline, RotateTimeline, TranslateTimeline, TranslateXTimeline, TranslateYTimeline, ScaleTimeline, ScaleXTimeline, ScaleYTimeline, ShearTimeline, ShearXTimeline, ShearYTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline, PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline, CurveTimeline1, CurveTimeline2, CurveTimeline } from "./Animation";
import { VertexAttachment, Attachment } from "./attachments/Attachment";
import { AttachmentLoader } from "./attachments/AttachmentLoader";
import { MeshAttachment } from "./attachments/MeshAttachment";
import { BoneData, TransformMode } from "./BoneData";
import { EventData } from "./EventData";
import { Event } from "./Event";
import { IkConstraintData } from "./IkConstraintData";
import { PathConstraintData, PositionMode, SpacingMode, RotateMode } from "./PathConstraintData";
import { SkeletonData } from "./SkeletonData";
import { Skin } from "./Skin";
import { SlotData, BlendMode } from "./SlotData";
import { TransformConstraintData } from "./TransformConstraintData";
import { Utils, Color, NumberArrayLike } from "./Utils";
import { Sequence, SequenceMode } from "./attachments/Sequence";
import { SequenceTimeline } from "./Animation";
import { HasTextureRegion } from "./attachments/HasTextureRegion";
import { Animation, Timeline, AttachmentTimeline, RGBATimeline, RGBTimeline, AlphaTimeline, RGBA2Timeline, RGB2Timeline, RotateTimeline, TranslateTimeline, TranslateXTimeline, TranslateYTimeline, ScaleTimeline, ScaleXTimeline, ScaleYTimeline, ShearTimeline, ShearXTimeline, ShearYTimeline, IkConstraintTimeline, TransformConstraintTimeline, PathConstraintPositionTimeline, PathConstraintSpacingTimeline, PathConstraintMixTimeline, DeformTimeline, DrawOrderTimeline, EventTimeline, CurveTimeline1, CurveTimeline2, CurveTimeline } from "./Animation.js";
import { VertexAttachment, Attachment } from "./attachments/Attachment.js";
import { AttachmentLoader } from "./attachments/AttachmentLoader.js";
import { MeshAttachment } from "./attachments/MeshAttachment.js";
import { BoneData, TransformMode } from "./BoneData.js";
import { EventData } from "./EventData.js";
import { Event } from "./Event.js";
import { IkConstraintData } from "./IkConstraintData.js";
import { PathConstraintData, PositionMode, SpacingMode, RotateMode } from "./PathConstraintData.js";
import { SkeletonData } from "./SkeletonData.js";
import { Skin } from "./Skin.js";
import { SlotData, BlendMode } from "./SlotData.js";
import { TransformConstraintData } from "./TransformConstraintData.js";
import { Utils, Color, NumberArrayLike } from "./Utils.js";
import { Sequence, SequenceMode } from "./attachments/Sequence.js";
import { SequenceTimeline } from "./Animation.js";
import { HasTextureRegion } from "./attachments/HasTextureRegion.js";
/** Loads skeleton data in the Spine JSON format.
*

View File

@ -27,12 +27,12 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Attachment } from "./attachments/Attachment";
import { MeshAttachment } from "./attachments/MeshAttachment";
import { BoneData } from "./BoneData";
import { ConstraintData } from "./ConstraintData";
import { Skeleton } from "./Skeleton";
import { StringMap } from "./Utils";
import { Attachment } from "./attachments/Attachment.js";
import { MeshAttachment } from "./attachments/MeshAttachment.js";
import { BoneData } from "./BoneData.js";
import { ConstraintData } from "./ConstraintData.js";
import { Skeleton } from "./Skeleton.js";
import { StringMap } from "./Utils.js";
/** Stores an entry in the skin consisting of the slot index, name, and attachment **/
export class SkinEntry {

View File

@ -27,11 +27,11 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Attachment, VertexAttachment } from "./attachments/Attachment";
import { Bone } from "./Bone";
import { Skeleton } from "./Skeleton";
import { SlotData } from "./SlotData";
import { Color } from "./Utils";
import { Attachment, VertexAttachment } from "./attachments/Attachment.js";
import { Bone } from "./Bone.js";
import { Skeleton } from "./Skeleton.js";
import { SlotData } from "./SlotData.js";
import { Color } from "./Utils.js";
/** Stores a slot's current pose. Slots organize attachments for {@link Skeleton#drawOrder} purposes and provide a place to store
* state for an attachment. State cannot be stored in an attachment itself because attachments are stateless and may be shared

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { BoneData } from "./BoneData";
import { Color } from "./Utils";
import { BoneData } from "./BoneData.js";
import { Color } from "./Utils.js";
/** Stores the setup pose for a {@link Slot}. */
export class SlotData {

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { AssetManagerBase } from "./AssetManagerBase";
import { TextureFilter, TextureWrap, Texture, TextureRegion } from "./Texture";
import { Disposable, Utils, StringMap } from "./Utils";
import { AssetManagerBase } from "./AssetManagerBase.js";
import { TextureFilter, TextureWrap, Texture, TextureRegion } from "./Texture.js";
import { Disposable, Utils, StringMap } from "./Utils.js";
export class TextureAtlas implements Disposable {
pages = new Array<TextureAtlasPage>();

View File

@ -27,11 +27,11 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Bone } from "./Bone";
import { Skeleton } from "./Skeleton";
import { TransformConstraintData } from "./TransformConstraintData";
import { Updatable } from "./Updatable";
import { Vector2, MathUtils } from "./Utils";
import { Bone } from "./Bone.js";
import { Skeleton } from "./Skeleton.js";
import { TransformConstraintData } from "./TransformConstraintData.js";
import { Updatable } from "./Updatable.js";
import { Vector2, MathUtils } from "./Utils.js";
/** Stores the current pose for a transform constraint. A transform constraint adjusts the world transform of the constrained

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { ConstraintData } from "./ConstraintData";
import { BoneData } from "./BoneData";
import { ConstraintData } from "./ConstraintData.js";
import { BoneData } from "./BoneData.js";
/** Stores the setup pose for a {@link TransformConstraint}.
*

View File

@ -27,7 +27,7 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { NumberArrayLike, Pool } from "./Utils";
import { NumberArrayLike, Pool } from "./Utils.js";
export class Triangulator {
private convexPolygons = new Array<Array<number>>();

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Skeleton } from "./Skeleton";
import { MixBlend } from "./Animation";
import { Skeleton } from "./Skeleton.js";
import { MixBlend } from "./Animation.js";
export interface StringMap<T> {
[key: string]: T;

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Slot } from "../Slot";
import { NumberArrayLike, Utils } from "../Utils";
import { Slot } from "../Slot.js";
import { NumberArrayLike, Utils } from "../Utils.js";
/** The base class for all attachments. */
export abstract class Attachment {

View File

@ -27,14 +27,14 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Skin } from "../Skin";
import { BoundingBoxAttachment } from "./BoundingBoxAttachment";
import { ClippingAttachment } from "./ClippingAttachment";
import { MeshAttachment } from "./MeshAttachment";
import { PathAttachment } from "./PathAttachment";
import { PointAttachment } from "./PointAttachment";
import { RegionAttachment } from "./RegionAttachment";
import { Sequence } from "./Sequence";
import { Skin } from "../Skin.js";
import { BoundingBoxAttachment } from "./BoundingBoxAttachment.js";
import { ClippingAttachment } from "./ClippingAttachment.js";
import { MeshAttachment } from "./MeshAttachment.js";
import { PathAttachment } from "./PathAttachment.js";
import { PointAttachment } from "./PointAttachment.js";
import { RegionAttachment } from "./RegionAttachment.js";
import { Sequence } from "./Sequence.js";
/** The interface which can be implemented to customize creating and populating attachments.
*

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Color } from "../Utils";
import { VertexAttachment, Attachment } from "./Attachment";
import { Color } from "../Utils.js";
import { VertexAttachment, Attachment } from "./Attachment.js";
/** An attachment with vertices that make up a polygon. Can be used for hit detection, creating physics bodies, spawning particle
* effects, and more.

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { SlotData } from "../SlotData";
import { Color } from "../Utils";
import { VertexAttachment, Attachment } from "./Attachment";
import { SlotData } from "../SlotData.js";
import { Color } from "../Utils.js";
import { VertexAttachment, Attachment } from "./Attachment.js";
/** An attachment with vertices that make up a polygon used for clipping the rendering of other attachments. */
export class ClippingAttachment extends VertexAttachment {

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { TextureRegion } from "../Texture"
import { Color } from "../Utils"
import { Sequence } from "./Sequence"
import { TextureRegion } from "../Texture.js"
import { Color } from "../Utils.js"
import { Sequence } from "./Sequence.js"
export interface HasTextureRegion {
/** The name used to find the {@link #region()}. */

View File

@ -27,13 +27,13 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { TextureRegion } from "../Texture";
import { TextureAtlasRegion } from "../TextureAtlas";
import { Color, NumberArrayLike, Utils } from "../Utils";
import { VertexAttachment, Attachment } from "./Attachment";
import { HasTextureRegion } from "./HasTextureRegion";
import { Sequence } from "./Sequence";
import { Slot } from "../Slot";
import { TextureRegion } from "../Texture.js";
import { TextureAtlasRegion } from "../TextureAtlas.js";
import { Color, NumberArrayLike, Utils } from "../Utils.js";
import { VertexAttachment, Attachment } from "./Attachment.js";
import { HasTextureRegion } from "./HasTextureRegion.js";
import { Sequence } from "./Sequence.js";
import { Slot } from "../Slot.js";
/** An attachment that displays a textured mesh. A mesh has hull vertices and internal vertices within the hull. Holes are not
* supported. Each vertex has UVs (texture coordinates) and triangles are used to map an image on to the mesh.

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Color, Utils } from "../Utils";
import { VertexAttachment, Attachment } from "./Attachment";
import { Color, Utils } from "../Utils.js";
import { VertexAttachment, Attachment } from "./Attachment.js";
/** An attachment whose vertices make up a composite Bezier curve.
*

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Bone } from "../Bone";
import { Color, Vector2, MathUtils } from "../Utils";
import { VertexAttachment, Attachment } from "./Attachment";
import { Bone } from "../Bone.js";
import { Color, Vector2, MathUtils } from "../Utils.js";
import { VertexAttachment, Attachment } from "./Attachment.js";
/** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
* used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a

View File

@ -27,13 +27,13 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Bone } from "../Bone";
import { TextureRegion } from "../Texture";
import { Color, NumberArrayLike, Utils } from "../Utils";
import { Attachment } from "./Attachment";
import { HasTextureRegion } from "./HasTextureRegion";
import { Sequence } from "./Sequence";
import { Slot } from "../Slot";
import { Bone } from "../Bone.js";
import { TextureRegion } from "../Texture.js";
import { Color, NumberArrayLike, Utils } from "../Utils.js";
import { Attachment } from "./Attachment.js";
import { HasTextureRegion } from "./HasTextureRegion.js";
import { Sequence } from "./Sequence.js";
import { Slot } from "../Slot.js";
/** An attachment that displays a textured quadrilateral.
*

View File

@ -27,10 +27,10 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { TextureRegion } from "../Texture";
import { Slot } from "../Slot";
import { HasTextureRegion } from "./HasTextureRegion";
import { Utils } from "../Utils";
import { TextureRegion } from "../Texture.js";
import { Slot } from "../Slot.js";
import { HasTextureRegion } from "./HasTextureRegion.js";
import { Utils } from "../Utils.js";
export class Sequence {

View File

@ -1,8 +1,8 @@
export * from './Attachment';
export * from './AttachmentLoader';
export * from './BoundingBoxAttachment';
export * from './ClippingAttachment';
export * from './MeshAttachment';
export * from './PathAttachment';
export * from './PointAttachment';
export * from './RegionAttachment';
export * from './Attachment.js';
export * from './AttachmentLoader.js';
export * from './BoundingBoxAttachment.js';
export * from './ClippingAttachment.js';
export * from './MeshAttachment.js';
export * from './PathAttachment.js';
export * from './PointAttachment.js';
export * from './RegionAttachment.js';

View File

@ -1,39 +1,39 @@
export * from './Animation';
export * from './AnimationState';
export * from './AnimationStateData';
export * from './AtlasAttachmentLoader';
export * from './Bone';
export * from './BoneData';
export * from './ConstraintData';
export * from './AssetManagerBase';
export * from './Event';
export * from './EventData';
export * from './IkConstraint';
export * from './IkConstraintData';
export * from './PathConstraint';
export * from './PathConstraintData';
export * from './Skeleton';
export * from './SkeletonBinary';
export * from './SkeletonBounds';
export * from './SkeletonClipping';
export * from './SkeletonData';
export * from './SkeletonJson';
export * from './Skin';
export * from './Slot';
export * from './SlotData';
export * from './Texture';
export * from './TextureAtlas';
export * from './TransformConstraint';
export * from './TransformConstraintData';
export * from './Triangulator';
export * from './Updatable';
export * from './Utils';
export * from './polyfills';
export * from './attachments/Attachment';
export * from './attachments/AttachmentLoader';
export * from './attachments/BoundingBoxAttachment';
export * from './attachments/ClippingAttachment';
export * from './attachments/MeshAttachment';
export * from './attachments/PathAttachment';
export * from './attachments/PointAttachment';
export * from './attachments/RegionAttachment';
export * from './Animation.js';
export * from './AnimationState.js';
export * from './AnimationStateData.js';
export * from './AtlasAttachmentLoader.js';
export * from './Bone.js';
export * from './BoneData.js';
export * from './ConstraintData.js';
export * from './AssetManagerBase.js';
export * from './Event.js';
export * from './EventData.js';
export * from './IkConstraint.js';
export * from './IkConstraintData.js';
export * from './PathConstraint.js';
export * from './PathConstraintData.js';
export * from './Skeleton.js';
export * from './SkeletonBinary.js';
export * from './SkeletonBounds.js';
export * from './SkeletonClipping.js';
export * from './SkeletonData.js';
export * from './SkeletonJson.js';
export * from './Skin.js';
export * from './Slot.js';
export * from './SlotData.js';
export * from './Texture.js';
export * from './TextureAtlas.js';
export * from './TransformConstraint.js';
export * from './TransformConstraintData.js';
export * from './Triangulator.js';
export * from './Updatable.js';
export * from './Utils.js';
export * from './polyfills.js';
export * from './attachments/Attachment.js';
export * from './attachments/AttachmentLoader.js';
export * from './attachments/BoundingBoxAttachment.js';
export * from './attachments/ClippingAttachment.js';
export * from './attachments/MeshAttachment.js';
export * from './attachments/PathAttachment.js';
export * from './attachments/PointAttachment.js';
export * from './attachments/RegionAttachment.js';

View File

@ -4,6 +4,7 @@
"description": "The official Spine Runtimes for the Phaser.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist/**/*",
"README.md",

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { SPINE_GAME_OBJECT_TYPE } from "./keys";
import { SpinePlugin } from "./SpinePlugin";
import { SPINE_GAME_OBJECT_TYPE } from "./keys.js";
import { SpinePlugin } from "./SpinePlugin.js";
import {
ComputedSizeMixin,
DepthMixin,

View File

@ -28,9 +28,9 @@
*****************************************************************************/
import Phaser from "phaser";
import { SPINE_ATLAS_CACHE_KEY, SPINE_GAME_OBJECT_TYPE, SPINE_SKELETON_DATA_FILE_TYPE, SPINE_ATLAS_FILE_TYPE, SPINE_SKELETON_FILE_CACHE_KEY as SPINE_SKELETON_DATA_CACHE_KEY } from "./keys";
import { SPINE_ATLAS_CACHE_KEY, SPINE_GAME_OBJECT_TYPE, SPINE_SKELETON_DATA_FILE_TYPE, SPINE_ATLAS_FILE_TYPE, SPINE_SKELETON_FILE_CACHE_KEY as SPINE_SKELETON_DATA_CACHE_KEY } from "./keys.js";
import { AtlasAttachmentLoader, GLTexture, SceneRenderer, Skeleton, SkeletonBinary, SkeletonData, SkeletonJson, TextureAtlas } from "@esotericsoftware/spine-webgl"
import { SpineGameObject, SpineGameObjectBoundsProvider } from "./SpineGameObject";
import { SpineGameObject, SpineGameObjectBoundsProvider } from "./SpineGameObject.js";
import { CanvasTexture, SkeletonRenderer } from "@esotericsoftware/spine-canvas";
/**

View File

@ -27,17 +27,17 @@
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
export * from "./require-shim"
export * from "./SpinePlugin"
export * from "./SpineGameObject"
export * from "./mixins"
export * from "./require-shim.js"
export * from "./SpinePlugin.js"
export * from "./SpineGameObject.js"
export * from "./mixins.js"
export * from "@esotericsoftware/spine-core";
export * from "@esotericsoftware/spine-webgl";
import { SpineGameObjectConfig, SpinePlugin } from "./SpinePlugin";
import { SpineGameObjectConfig, SpinePlugin } from "./SpinePlugin.js";
(window as any).spine = { SpinePlugin: SpinePlugin };
(window as any)["spine.SpinePlugin"] = SpinePlugin;
import { SpineGameObject, SpineGameObjectBoundsProvider } from "./SpineGameObject";
import { SpineGameObject, SpineGameObjectBoundsProvider } from "./SpineGameObject.js";
declare global {
namespace Phaser.Loader {

View File

@ -4,6 +4,7 @@
"description": "The official Spine Runtimes for the web.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist/**/*",
"README.md",

View File

@ -27,10 +27,10 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { SpineTexture } from "./SpineTexture";
import { SpineTexture } from "./SpineTexture.js";
import type { BlendMode, NumberArrayLike } from "@esotericsoftware/spine-core";
import { DarkTintMesh } from "./darkTintMesh/DarkTintMesh";
import type { ISlotMesh } from "./Spine";
import { DarkTintMesh } from "./darkTintMesh/DarkTintMesh.js";
import type { ISlotMesh } from "./Spine.js";
export class DarkSlotMesh extends DarkTintMesh implements ISlotMesh {
public name: string = "";

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { SpineTexture } from "./SpineTexture";
import { SpineTexture } from "./SpineTexture.js";
import type { BlendMode, NumberArrayLike } from "@esotericsoftware/spine-core";
import type { ISlotMesh } from "./Spine";
import type { ISlotMesh } from "./Spine.js";
import { Mesh, MeshGeometry, MeshMaterial } from "@pixi/mesh";
import { Texture } from "@pixi/core";

View File

@ -28,7 +28,7 @@
*****************************************************************************/
import { TextureAtlas } from "@esotericsoftware/spine-core";
import { SpineTexture } from "../SpineTexture";
import { SpineTexture } from "../SpineTexture.js";
import type { AssetExtension, Loader } from "@pixi/assets";
import { LoaderParserPriority, checkExtension } from "@pixi/assets";
import type { Texture } from "@pixi/core";

View File

@ -29,8 +29,8 @@
import type { Texture, ColorSource, Renderer, BLEND_MODES } from "@pixi/core";
import { Mesh } from "@pixi/mesh";
import { DarkTintGeometry } from "./DarkTintGeom";
import { DarkTintMaterial } from "./DarkTintMaterial";
import { DarkTintGeometry } from "./DarkTintGeom.js";
import { DarkTintMaterial } from "./DarkTintMaterial.js";
export interface IDarkTintElement {
// eslint-disable-next-line @typescript-eslint/naming-convention

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import type { IDarkTintElement } from "./DarkTintMesh";
import { DarkTintBatchGeometry } from "./DarkTintBatchGeom";
import type { IDarkTintElement } from "./DarkTintMesh.js";
import { DarkTintBatchGeometry } from "./DarkTintBatchGeom.js";
import type { ExtensionMetadata, Renderer, ViewableBuffer } from "@pixi/core";
import { BatchRenderer, ExtensionType, BatchShaderGenerator, Color } from "@pixi/core";

View File

@ -27,19 +27,19 @@
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
export * from './require-shim';
export * from './Spine';
export * from './SpineDebugRenderer';
export * from './SpineTexture';
export * from './SlotMesh';
export * from './DarkSlotMesh';
export * from './assets/atlasLoader';
export * from './assets/skeletonLoader';
export * from './darkTintMesh/DarkTintBatchGeom';
export * from './darkTintMesh/DarkTintGeom';
export * from './darkTintMesh/DarkTintMaterial';
export * from './darkTintMesh/DarkTintMesh';
export * from './darkTintMesh/DarkTintRenderer';
export * from './require-shim.js';
export * from './Spine.js';
export * from './SpineDebugRenderer.js';
export * from './SpineTexture.js';
export * from './SlotMesh.js';
export * from './DarkSlotMesh.js';
export * from './assets/atlasLoader.js';
export * from './assets/skeletonLoader.js';
export * from './darkTintMesh/DarkTintBatchGeom.js';
export * from './darkTintMesh/DarkTintGeom.js';
export * from './darkTintMesh/DarkTintMaterial.js';
export * from './darkTintMesh/DarkTintMesh.js';
export * from './darkTintMesh/DarkTintRenderer.js';
export * from "@esotericsoftware/spine-core";

View File

@ -4,6 +4,7 @@
"description": "The official Spine Runtimes for the web.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist/**/*",
"README.md",

View File

@ -1,3 +1,3 @@
export * from './Player';
export * from './Player.js';
export * from "@esotericsoftware/spine-core";
export * from "@esotericsoftware/spine-webgl";

View File

@ -4,6 +4,7 @@
"description": "The official Spine Runtimes for the web.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist/**/*",
"README.md",

View File

@ -28,7 +28,7 @@
*****************************************************************************/
import { AssetManagerBase, Downloader } from "@esotericsoftware/spine-core"
import { ThreeJsTexture } from "./ThreeJsTexture";
import { ThreeJsTexture } from "./ThreeJsTexture.js";
export class AssetManager extends AssetManagerBase {
constructor (pathPrefix: string = "", downloader: Downloader = new Downloader()) {

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { SkeletonMeshMaterial, SkeletonMeshMaterialParametersCustomizer } from "./SkeletonMesh";
import { SkeletonMeshMaterial, SkeletonMeshMaterialParametersCustomizer } from "./SkeletonMesh.js";
import * as THREE from "three"
import { ThreeJsTexture } from "./ThreeJsTexture";
import { ThreeJsTexture } from "./ThreeJsTexture.js";
import { BlendMode } from "@esotericsoftware/spine-core";
export class MeshBatcher extends THREE.Mesh {

View File

@ -43,9 +43,9 @@ import {
Utils,
Vector2,
} from "@esotericsoftware/spine-core";
import { MeshBatcher } from "./MeshBatcher";
import { MeshBatcher } from "./MeshBatcher.js";
import * as THREE from "three";
import { ThreeJsTexture } from "./ThreeJsTexture";
import { ThreeJsTexture } from "./ThreeJsTexture.js";
export type SkeletonMeshMaterialParametersCustomizer = (
materialParameters: THREE.ShaderMaterialParameters

View File

@ -1,6 +1,6 @@
export * from './require-shim';
export * from './AssetManager';
export * from './MeshBatcher';
export * from './SkeletonMesh';
export * from './ThreeJsTexture';
export * from './require-shim.js';
export * from './AssetManager.js';
export * from './MeshBatcher.js';
export * from './SkeletonMesh.js';
export * from './ThreeJsTexture.js';
export * from "@esotericsoftware/spine-core";

View File

@ -4,6 +4,7 @@
"description": "The official Spine Runtimes for the web.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist/**/*",
"README.md",

View File

@ -28,8 +28,8 @@
*****************************************************************************/
import { AssetManagerBase, Downloader } from "@esotericsoftware/spine-core"
import { ManagedWebGLRenderingContext } from "./WebGL";
import { GLTexture } from "./GLTexture";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
import { GLTexture } from "./GLTexture.js";
export class AssetManager extends AssetManagerBase {

View File

@ -27,8 +27,8 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Matrix4 } from "./Matrix4";
import { Vector3 } from "./Vector3";
import { Matrix4 } from "./Matrix4.js";
import { Vector3 } from "./Vector3.js";
export class OrthoCamera {
position = new Vector3(0, 0, 0);

View File

@ -27,9 +27,9 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Input } from "./Input";
import { OrthoCamera } from "./Camera";
import { Vector3 } from "./Vector3";
import { Input } from "./Input.js";
import { OrthoCamera } from "./Camera.js";
import { Vector3 } from "./Vector3.js";
export class CameraController {
constructor (public canvas: HTMLElement, public camera: OrthoCamera) {

View File

@ -28,7 +28,7 @@
*****************************************************************************/
import { Texture, Disposable, Restorable, TextureFilter, TextureWrap } from "@esotericsoftware/spine-core";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
export class GLTexture extends Texture implements Disposable, Restorable {
context: ManagedWebGLRenderingContext;

View File

@ -28,8 +28,8 @@
*****************************************************************************/
import { BlendMode, Color, Disposable, TimeKeeper } from "@esotericsoftware/spine-core";
import { GLTexture } from "./GLTexture";
import { ResizeMode, SceneRenderer } from "./SceneRenderer";
import { GLTexture } from "./GLTexture.js";
import { ResizeMode, SceneRenderer } from "./SceneRenderer.js";
let spinnerImage: HTMLImageElement;
let logoImage: HTMLImageElement;

View File

@ -27,8 +27,7 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Vector2 } from "@esotericsoftware/spine-core";
import { Vector3 } from "./Vector3";
import { Vector3 } from "./Vector3.js";
export const M00 = 0;
export const M01 = 4;

View File

@ -28,8 +28,8 @@
*****************************************************************************/
import { Disposable, Restorable } from "@esotericsoftware/spine-core";
import { Shader } from "./Shader";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { Shader } from "./Shader.js";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
export class Mesh implements Disposable, Restorable {

View File

@ -28,10 +28,10 @@
*****************************************************************************/
import { BlendMode, Disposable } from "@esotericsoftware/spine-core";
import { GLTexture } from "./GLTexture";
import { Mesh, Position2Attribute, ColorAttribute, TexCoordAttribute, Color2Attribute } from "./Mesh";
import { Shader } from "./Shader";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { GLTexture } from "./GLTexture.js";
import { Mesh, Position2Attribute, ColorAttribute, TexCoordAttribute, Color2Attribute } from "./Mesh.js";
import { Shader } from "./Shader.js";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
const GL_ONE = 1;
const GL_ONE_MINUS_SRC_COLOR = 0x0301;

View File

@ -28,14 +28,14 @@
*****************************************************************************/
import { Color, Disposable, Skeleton, MathUtils, TextureAtlasRegion } from "@esotericsoftware/spine-core";
import { OrthoCamera } from "./Camera";
import { GLTexture } from "./GLTexture";
import { PolygonBatcher } from "./PolygonBatcher";
import { Shader } from "./Shader";
import { ShapeRenderer } from "./ShapeRenderer";
import { SkeletonDebugRenderer } from "./SkeletonDebugRenderer";
import { SkeletonRenderer, VertexTransformer } from "./SkeletonRenderer";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { OrthoCamera } from "./Camera.js";
import { GLTexture } from "./GLTexture.js";
import { PolygonBatcher } from "./PolygonBatcher.js";
import { Shader } from "./Shader.js";
import { ShapeRenderer } from "./ShapeRenderer.js";
import { SkeletonDebugRenderer } from "./SkeletonDebugRenderer.js";
import { SkeletonRenderer, VertexTransformer } from "./SkeletonRenderer.js";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
;
const quad = [

View File

@ -28,7 +28,7 @@
*****************************************************************************/
import { Disposable, Restorable } from "@esotericsoftware/spine-core";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
export class Shader implements Disposable, Restorable {
public static MVP_MATRIX = "u_projTrans";

View File

@ -28,9 +28,9 @@
*****************************************************************************/
import { Disposable, Color, Vector2, MathUtils } from "@esotericsoftware/spine-core";
import { Mesh, Position2Attribute, ColorAttribute } from "./Mesh";
import { Shader } from "./Shader";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { Mesh, Position2Attribute, ColorAttribute } from "./Mesh.js";
import { Shader } from "./Shader.js";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
export class ShapeRenderer implements Disposable {
private context: ManagedWebGLRenderingContext;

View File

@ -28,8 +28,8 @@
*****************************************************************************/
import { Disposable, Color, SkeletonBounds, Utils, Skeleton, RegionAttachment, MeshAttachment, PathAttachment, ClippingAttachment } from "@esotericsoftware/spine-core";
import { ShapeRenderer } from "./ShapeRenderer";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { ShapeRenderer } from "./ShapeRenderer.js";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
export class SkeletonDebugRenderer implements Disposable {
boneLineColor = new Color(1, 0, 0, 1);

View File

@ -28,9 +28,9 @@
*****************************************************************************/
import { NumberArrayLike, Color, SkeletonClipping, Vector2, Utils, Skeleton, BlendMode, RegionAttachment, TextureAtlasRegion, MeshAttachment, ClippingAttachment } from "@esotericsoftware/spine-core";
import { GLTexture } from "./GLTexture";
import { PolygonBatcher } from "./PolygonBatcher";
import { ManagedWebGLRenderingContext } from "./WebGL";
import { GLTexture } from "./GLTexture.js";
import { PolygonBatcher } from "./PolygonBatcher.js";
import { ManagedWebGLRenderingContext } from "./WebGL.js";
class Renderable {

View File

@ -27,7 +27,7 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { TimeKeeper, AssetManager, ManagedWebGLRenderingContext, SceneRenderer, Input, StringMap } from "./";
import { TimeKeeper, AssetManager, ManagedWebGLRenderingContext, SceneRenderer, Input, StringMap } from "./index.js";
/** An app running inside a {@link SpineCanvas}. The app life-cycle
* is as follows:

View File

@ -27,7 +27,7 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
import { Matrix4, M00, M01, M02, M03, M10, M11, M12, M13, M20, M21, M22, M23, M30, M31, M32, M33 } from "./Matrix4";
import { Matrix4, M00, M01, M02, M03, M10, M11, M12, M13, M20, M21, M22, M23, M30, M31, M32, M33 } from "./Matrix4.js";
export class Vector3 {
x = 0;

View File

@ -1,18 +1,18 @@
export * from "./AssetManager";
export * from "./Camera";
export * from "./CameraController";
export * from "./GLTexture";
export * from "./Input";
export * from "./LoadingScreen";
export * from "./Matrix4";
export * from "./Mesh";
export * from "./PolygonBatcher";
export * from "./SceneRenderer";
export * from "./Shader";
export * from "./ShapeRenderer";
export * from "./SkeletonDebugRenderer";
export * from "./SkeletonRenderer";
export * from "./SpineCanvas";
export * from "./Vector3";
export * from "./WebGL";
export * from "./AssetManager.js";
export * from "./Camera.js";
export * from "./CameraController.js";
export * from "./GLTexture.js";
export * from "./Input.js";
export * from "./LoadingScreen.js";
export * from "./Matrix4.js";
export * from "./Mesh.js";
export * from "./PolygonBatcher.js";
export * from "./SceneRenderer.js";
export * from "./Shader.js";
export * from "./ShapeRenderer.js";
export * from "./SkeletonDebugRenderer.js";
export * from "./SkeletonRenderer.js";
export * from "./SpineCanvas.js";
export * from "./Vector3.js";
export * from "./WebGL.js";
export * from "@esotericsoftware/spine-core";

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "es2015",
"target": "ES6",
"target": "ESNext",
"module": "ESNext",
"noImplicitAny": true,
"preserveConstEnums": true,
"inlineSourceMap": true,
@ -14,6 +14,6 @@
"declaration": true,
"composite": true,
"moduleResolution": "node",
"strict": true
"strict": true,
}
}