Documentation
¶
Index ¶
- type FrameDefinition
- type FrameValidationError
- type FrameValidator
- func (fv *FrameValidator) ValidateDimensions(frames []FrameDefinition, expectedWidth, expectedHeight int) error
- func (fv *FrameValidator) ValidateFrame(frame *FrameDefinition, frameIndex int) error
- func (fv *FrameValidator) ValidateFramesConsistency(frames []FrameDefinition) error
- func (fv *FrameValidator) ValidateStateConfig(config *StateConfig) error
- type StateAddResult
- type StateConfig
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrameDefinition ¶
type FrameDefinition struct {
// Pattern code lines for this frame
Lines []string
// Optional custom frame name (if not using default naming)
CustomName string
}
FrameDefinition defines a single animation frame
type FrameValidationError ¶
FrameValidationError represents an error in frame validation
func (*FrameValidationError) Error ¶
func (e *FrameValidationError) Error() string
type FrameValidator ¶
type FrameValidator struct {
// contains filtered or unexported fields
}
FrameValidator validates frame definitions
func NewFrameValidator ¶
func NewFrameValidator() *FrameValidator
NewFrameValidator creates a new frame validator
func (*FrameValidator) ValidateDimensions ¶
func (fv *FrameValidator) ValidateDimensions(frames []FrameDefinition, expectedWidth, expectedHeight int) error
ValidateDimensions validates frame dimensions match expected width/height
func (*FrameValidator) ValidateFrame ¶
func (fv *FrameValidator) ValidateFrame(frame *FrameDefinition, frameIndex int) error
ValidateFrame validates a single frame definition
func (*FrameValidator) ValidateFramesConsistency ¶
func (fv *FrameValidator) ValidateFramesConsistency(frames []FrameDefinition) error
ValidateFramesConsistency checks that all frames in a set have consistent dimensions
func (*FrameValidator) ValidateStateConfig ¶
func (fv *FrameValidator) ValidateStateConfig(config *StateConfig) error
ValidateStateConfig validates the entire state configuration
type StateAddResult ¶
type StateAddResult struct {
// Characters that were successfully updated
UpdatedCharacters []string
// Characters that failed to update
FailedCharacters map[string]error
// Total frames added
FramesAdded int
// Documentation files updated
DocsUpdated []string
// Whether any height changes were made
HeightChanged bool
}
StateAddResult contains the results of adding a state
type StateConfig ¶
type StateConfig struct {
// Name of the state (e.g., "arise", "sleeping")
Name string
// Description of what the state represents
Description string
// Number of frames in the animation
FrameCount int
// Required height for the character (0 means no change)
RequiredHeight int
// Frame definitions (pattern code lines)
Frames []FrameDefinition
// Target characters ("all" or specific names)
Targets []string
// Template name (optional)
Template string
// Skip confirmation prompts
SkipConfirmation bool
// Skip documentation updates
SkipDocs bool
// Preview only (no changes)
Preview bool
// Dry run (show what would change)
DryRun bool
// Allow height updates
AllowHeightUpdate bool
// Custom CHANGELOG message
ChangelogMessage string
// Position where to insert frames ("after_base" or specific frame name)
InsertPosition string
}
StateConfig defines the configuration for adding a new state to characters
type ValidationError ¶
ValidationError represents a validation error with context
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string