Goanimate Wrapper 2.0.0 -
from goanimate import CustomAction class TauntAction(CustomAction): def apply(self, character, timeline): character.set_expression("angry") character.play_gesture("finger_wag") timeline.add_keyframe(character, "hand_angle", 45, at=0.5)
git clone https://github.com/yourorg/goanimate-wrapper.git cd goanimate-wrapper pip install -e . Create your first animated scene:
scene2 = Scene(8.0, "chart_background") chart = Prop("bar_chart_growth", position=(400,300)) scene2.add_prop(chart) scene2.add_dialog(jane, "We grew 20% this quarter.", start=0, end=3) scene2.camera.zoom(1.8, duration=2.0) project.add_scene(scene2) goanimate wrapper 2.0.0
from goanimate import Action Action.WAVE_HAND Action.NOD_HEAD Action.SHRUG Action.POINT_UP Action.JUMP Action.WALK_TO(x, y, duration) scene.add_dialog( character=bob, text="Hello world!", start=1.0, end=3.5, tts_voice="en-US_JamesV3", # IBM Watson / Azure style auto_lipsync=True ) If auto_lipsync=True , the wrapper generates mouth shape keyframes based on phonemes. 5. Advanced Usage 5.1 Camera Controls camera = scene.camera camera.pan_to(x=200, y=300, duration=2.0) camera.zoom(level=1.5, duration=1.0) camera.shake(intensity=0.2, duration=0.5) 5.2 Props and Assets from goanimate import Prop laptop = Prop( asset_id="laptop_01", position=(500, 400), layer="foreground"|"midground"|"background" ) scene.add_prop(laptop) scene.animate_prop(laptop, "rotate", angle=45, duration=1.0) 5.3 Conditional Logic & Variables Use variable substitution to create dynamic videos:
char = Character( id=str, # unique per scene style="business_female"|"casual_male"|etc, position=(x, y), # screen percentage or px scale=1.0, facing="left"|"right" ) char.set_expression("happy"|"sad"|"angry"|"surprised") char.set_pose("standing"|"sitting"|"walking") char.look_at(target_x, target_y) 4.4 Actions & Timeline Events Actions are timed behaviors. Advanced Usage 5
project.set_variable("customer_name", "Alice") scene.add_dialog(bob, "Hello, customer_name!", start=0, end=2) greeting_template = Scene.from_template("greeting.json", variables="name": "User") project.add_scene(greeting_template) 6. Export & Rendering 6.1 JSON Export (for Vyond Studio) project.save_json("import_me.json") # Manually upload to Vyond Studio's JSON importer 6.2 Direct MP4 Rendering Requires Node.js and Puppeteer:
Register it:
project.add_scene(scene1) project.save_json("output/project.json") project.render_mp4("output/video.mp4") # if puppeteer available 4. Core Concepts 4.1 Project Top-level container. Manages scenes, assets, and output settings.
project = Project( title=str, fps=int (default 24), resolution=(width, height), theme="light"|"dark" ) A continuous timeline segment. Core Concepts 4
scene = Scene( duration=float, # seconds background=str|dict, # asset id or color music=str, # background audio asset id transition="fade"|"cut"|"wipe" ) Represents a Vyond character with rigging.
from goanimate import Project, Character, Scene, Action project = Project(title="My First Video", fps=24) Create a character bob = Character(id="bob", style="modern_business", position=(100, 300)) Define a scene scene1 = Scene(duration=5.0, background="office_desk") scene1.add_character(bob) scene1.add_action(bob, Action.WAVE_HAND, start=0.5, end=1.5) scene1.add_dialog(bob, "Hello, world!", start=1.0, end=3.0)