Перейти к содержимому

freedome_editor_comics

Это содержимое пока не доступно на вашем языке.

Dome features run over freedome_client — see doc/migration-to-freedome_client.md.

Flutter library for creating and editing interactive comics with animation, sound and multi-language support.

Russian version: README.ru.md.

Freedome Editor Comics is a Flutter library ported from the C# legacy_comics_editor. It provides everything needed to build interactive comics with:

  • Multi-layer structure - layers made of images
  • Animation - transformations (translate, rotate, scale, alpha)
  • Sound - audio files with time stamps
  • Multiple languages - several languages (EN, RU, HI)
  • Export / import - projects saved and loaded as .comics / .puzzle
class Comics {
int width; // Comics width
int height; // Comics height
List<Layer> layers; // Layers
List<Sound> sounds; // Sounds
}
class Layer {
bool preview; // Preview mode
List<Image> images; // Images for the different languages
List<Animation> animations; // Layer animations
}
class Image {
String file; // Path to the image file
String popup; // Path to the popup image
int width; // Image width
int height; // Image height
bool isTiles; // Whether the image is split into tiles
}
class TranslateAnim extends Animation {
int x; // Offset along X
int y; // Offset along Y
}
class RotateAnim extends PivotAnimation {
double angle; // Rotation angle in degrees
double pivotX; // Pivot X (0.0-1.0)
double pivotY; // Pivot Y (0.0-1.0)
}
class ScaleAnim extends PivotAnimation {
double scaleX; // Scale along X
double scaleY; // Scale along Y
double pivotX; // Scaling pivot X (0.0-1.0)
double pivotY; // Scaling pivot Y (0.0-1.0)
}
class AlphaAnim extends Animation {
double alpha; // Opacity (0.0-1.0)
}
class SoundAnim extends Animation {
// Special animation that plays a sound
}
class Sound {
String file; // Path to the audio file
List<Animation> animations; // Sound animations
}
abstract class Animation {
int start; // Start time
int end; // End time
AnimationType type; // Animation type
// Interpolation between animations
Animation interpolate(Animation current, double scroll);
// Interpolation factor
double factor(double scroll);
}
  • EN - English
  • RU - Russian
  • HI - Hindi
  • Images: JPG, PNG
  • Audio: MP3
  • Projects: .comics, .puzzle
  • Projects: .comics (regular comics), .puzzle (puzzles)
import 'package:freedome_editor_comics/freedome_editor_comics.dart';
// Create a new comics
final comics = Comics(
width: 1080,
height: 2160,
layers: [],
sounds: [],
);
// Add a layer
final layer = Layer.create(
imagePath: '/path/to/image.jpg',
scroll: 0.0,
isPuzzle: false,
);
comics.layers.add(layer);
// Add a sound
final sound = Sound.create(
audioPath: '/path/to/audio.mp3',
scroll: 0.0,
);
comics.sounds.add(sound);
// Add a translation
final translateAnim = TranslateAnim(
start: 0,
end: 1000,
x: 100,
y: 50,
);
layer.animations.add(translateAnim);
// Add a rotation
final rotateAnim = RotateAnim(
start: 500,
end: 1500,
angle: 45.0,
pivotX: 0.5,
pivotY: 0.5,
);
layer.animations.add(rotateAnim);
// Save a comics
await comics.save('/path/to/comics.comics');
// Load a comics
final loadedComics = await Comics.load('/path/to/comics.comics');
// Current animation state
final currentState = layer.getAnimationState(scroll: 500.0);
// Apply the transformations
canvas.translate(currentState.translateX, currentState.translateY);
canvas.rotate(currentState.rotation);
canvas.scale(currentState.scaleX, currentState.scaleY);
canvas.setAlpha(currentState.alpha);

The library follows the MVVM pattern:

  • Models - data models (Comics, Layer, Image, Sound, Animation)
  • ViewModels - presentation logic (ComicsViewModel, LayerViewModel)
  • Utils - utilities (FileManager, ZipUtils, ImageMagick)
  • path_provider - file system access
  • archive - ZIP archives
  • image - image processing
  • audioplayers - sound playback
dependencies:
freedome_editor_comics: ^1.0.0

NativeMindNONC (see LICENSE).

Questions and proposals: issues in the project repository freedome_dart or [email protected].


Licence: NativeMindNONC. Commercial use → NativeMind sales