Skip to content

Instantly share code, notes, and snippets.

@lian
Created February 23, 2009 02:07
Show Gist options
  • Select an option

  • Save lian/68747 to your computer and use it in GitHub Desktop.

Select an option

Save lian/68747 to your computer and use it in GitHub Desktop.
$vm = CameronSpaces::VM.new("../../hydra-vm.git").load
$vm.users["lian"]["macbook"].connect
$vm.spaces["hydra"].attach_session $vm.users["lian"]["macbook"]
$vm.spaces["hydra"].add_object WorkspaceObject::CoreVideo.new "video_test"
$vm.spaces["hydra"]["video_test"].load_movie "testmovie.mp4", :autostart => true
250.times do
sleep 0.2
$vm.spaces["hydra"]["video_test"].set :width => rand(600), :height => rand(400),
:position => { :x => rand(400), :y => rand(400), :z => 0 },
:color => { :r => rand(255), :g => rand(255), :b => rand(255) }
end
#
# ___ __ __
# __ /\_ \ /\ \ /\ \
# /\_\ \//\ \ ___ __ __ __ _ __ __ __\ \ \____ __ __\ \ \
# \/\ \ \ \ \ / __`\/\ \/\ \ /'__`\ /\`'__\/\ \/\ \\ \ '__`\/\ \/\ \\ \ \
# \ \ \ \_\ \_/\ \L\ \ \ \_/ |/\ __/ \ \ \/ \ \ \_\ \\ \ \L\ \ \ \_\ \\ \_\
# \ \_\ /\____\ \____/\ \___/ \ \____\ \ \_\ \ \____/ \ \_,__/\/`____ \\/\_\
# \/_/ \/____/\/___/ \/__/ \/____/ \/_/ \/___/ \/___/ `/___/> \\/_/
# /\___/
# \/__/ !!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment