Hacker News new | ask | show | jobs
by thecedarprince 2072 days ago
So, to give an example:

In manim, one could do something like this:

  from manimlib.imports import *

  class ReplacementTransformExhibit(Scene):
      def construct(self):
          square = Square().shift(LEFT)
          circle = Circle().shift(RIGHT)
          self.play(ReplacementTransform(square, circle))
To have a square morph to a circle. Currently in Javis, one could do something like this:

  using Javis
  
  astar(args...) = star(O, 50)
  acirc(args...) = circle(Point(100,100), 50)
  
  function ground(args...)
      background("white")
      sethue("black")
  end

  
  video = Video(500, 500)
  javis(video, [
      Action(1:100, ground),
      Action(1:50, morph(astar, acirc)),
      Action(51:100, morph(acirc, astar))
  ], creategif=true, tempdirectory="images",
      pathname="star2circle.gif", deletetemp=true)
As you can see, Javis is, at this stage, a little more verbose. However, for v0.3.0 we are moving away from Action syntax to something more generic and user friendly (this shift based on user feedback).