content: String
SpineFile
Implementation of Spine's FileHandle interface for Ceramic.
This class provides a simple in-memory file representation that the Spine runtime can use to access file content. It's used internally when loading Spine assets to provide the Spine runtime with access to atlas files and other text-based resources.
The SpineFile acts as an adapter between Ceramic's asset loading system and Spine's file handling expectations, storing file content in memory as a string.
// This is typically used internally by SpineAsset
var atlasContent = assets.text("hero.atlas").content;
var spineFile = new SpineFile("hero.atlas", atlasContent);
// The Spine runtime can then use this file handle
var atlas = new TextureAtlas(spineFile, ...);
Instance Members
The path or identifier of this file. This is typically the asset path or filename, used for identification purposes within the Spine runtime.
The text content of the file stored in memory. This contains the actual file data that will be returned when the Spine runtime requests the file content.
Gets the content of this file.
This method is required by the FileHandle interface and is called by the Spine runtime when it needs to read the file data.
Returns | Description |
---|---|
String | The complete file content as a string |
Creates a new SpineFile instance with the specified path and content.
Name | Type | Description |
---|---|---|
path |
String | The file path or identifier |
content |
String | The text content of the file |