Created
February 10, 2017 12:00
-
-
Save elct9620/bf920fbccc1cfa9b1b23f0580f183e92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cat.summon do | |
skin do | |
var :catBody, 'rgb(230, 165, 100)' | |
var :catBelly, 'rgb(240, 190, 120)' | |
var :catTail, 'rgb(190, 130, 80)' | |
var :strokeColor, 'rgb(50, 50, 70)' | |
end | |
skeleton do | |
size(500).center | |
node :body do | |
skin do | |
size(400).fill(:$catBody).ellipse.center.clip | |
stroke 5, color: :$strokeColor | |
end | |
node :belly do | |
clip.size(360).fill(:$catBelly).ellipse | |
position top: '50%', left: '50%' | |
offset(-180, :left) | |
offset(-180, :top) | |
animation | |
node :belly_start_wrapper do | |
size(400).position | |
node :belly_start do | |
mask(50).fill(:$catBody).rotate(125) | |
node :ball_start do | |
size(35).fill(:$catBelly).ellipse | |
position top: 48, right: -14 | |
end | |
end | |
end | |
node :belly_end do | |
mask(50).fill(:$catBody).rotate(-105) | |
node :ball_end do | |
size(35).fill(:$catBelly).ellipse | |
position bottom: -12 | |
end | |
end | |
end | |
node :body_over_belly do | |
size(290).fill(:$catBody).ellipse.center | |
end | |
node :hand_wrapper do | |
animation | |
node :hand do | |
size(400) | |
rotate(27.5) | |
offset(-8, :left) | |
node :left do | |
size(30, 50).fill(:$catBody) | |
position top: '50%', right: 0 | |
stroke 5, color: :$strokeColor, only: [:bottom, :right, :left] | |
rotate(7.5) | |
rounded left: 25, bottom: 25 | |
end | |
node :right do | |
size(30, 50).fill(:$catBody) | |
position top: '50%', right: 50 | |
stroke 5, color: :$strokeColor, only: [:bottom, :right, :left] | |
rotate(9.5) | |
rounded left: 25, bottom: 25 | |
end | |
end | |
end | |
node :mask do | |
size(250).fill(:$bgColor).ellipse.center | |
stroke 5, color: :$strokeColor | |
end | |
end | |
node :clip do | |
size(500).position | |
animation | |
node :clip_1 do | |
mask(50) | |
end | |
node :animate_wrapper_2 do | |
size(500).position | |
node :clip_2 do | |
mask(50).rotate(90) | |
end | |
end | |
node :clip_3 do | |
mask(50).rotate(-90) | |
end | |
end | |
node :head_wrapper_outter do | |
size(500).position | |
animation | |
node :head_wrapper do | |
size(500).position | |
rotate(5) | |
node :head do | |
size(50, 25).fill(:$bgColor).offset(-20, :top) | |
position right: 65, top: '50%' | |
stroke 5, color: :$strokeColor, only: [:bottom] | |
rotate(-2.5) | |
node :eye_left do | |
size(5).fill(:$strokeColor).ellipse | |
position bottom: -25, left: 0 | |
end | |
node :eye_right do | |
size(5).fill(:$strokeColor).ellipse | |
position bottom: -25, right: 5 | |
end | |
node :mustach do | |
rotate(5) | |
position top: 20 | |
(-1..1).each do |index| | |
node "mustach_left_#{index}" do | |
size(20, 3).fill(:$strokeColor) | |
position bottom: -30 + (index * 5), left: -25 | |
rounded top: 3, right: 3, bottom: 3, left: 3 | |
rotate index * 5 | |
end | |
node "mustach_right_#{index}" do | |
size(20, 3).fill(:$strokeColor) | |
position bottom: -30 + (index * 5), left: 50 | |
rounded top: 3, right: 3, bottom: 3, left: 3 | |
rotate index * -5 | |
end | |
end | |
end | |
node :mouth do | |
node :top_left do | |
size(8, 8).ellipse.rotate(-45) | |
stroke 3, color: :$strokeColor, only: [:bottom, :left] | |
position bottom: -40, left:12 | |
end | |
node :top_right do | |
size(8, 8).ellipse.rotate(-45) | |
stroke 3, color: :$strokeColor, only: [:bottom, :left] | |
position bottom: -40, left: 18 | |
end | |
end | |
node :ear_left do | |
size(20).fill(:$bgColor) | |
stroke 5, color: :$strokeColor, only: [:left] | |
rotate(-45).offset(-10, :left).offset(0, :top) | |
node :dot_left do | |
size(5).fill(:$strokeColor).ellipse | |
position top: -2, left: -5 | |
end | |
node :dot_right do | |
size(5).fill(:$strokeColor).ellipse | |
position bottom: -2, left: -5 | |
end | |
end | |
node :ear_right do | |
size(20).fill(:$bgColor) | |
stroke 5, color: :$strokeColor, only: [:right] | |
rotate(35).offset(40, :left).offset(-21, :top) | |
node :dot_left do | |
size(5).fill(:$strokeColor).ellipse | |
position top: -2, right: -5 | |
end | |
node :dot_right do | |
size(5).fill(:$strokeColor).ellipse | |
position bottom: -2, right: -5 | |
end | |
end | |
end | |
end | |
end | |
node :tail_wrapper do | |
size(500).position | |
animation | |
node :tail_mask do | |
size(20, 80).fill(:$bgColor).offset(-20, :left) | |
position left: '50%', bottom: 50 | |
stroke 5, color: :$strokeColor, only: [:right] | |
node :tail do | |
size(30, 80).fill(:$catTail) | |
position top: 0, right: 25 | |
stroke 5, color: :$strokeColor, only: [:bottom, :right, :left] | |
rounded left: 25, bottom: 25 | |
rotate 90 | |
end | |
end | |
node :leg_wrapper do | |
size(500).position | |
rotate(90) | |
node :right do | |
size(30, 50).fill(:$catBody) | |
position top: '50%', right: 50 | |
stroke 5, color: :$strokeColor, only: [:bottom, :right, :left] | |
rounded left: 25, bottom: 25 | |
end | |
node :left do | |
size(30, 50).fill(:$catBody) | |
position top: '50%', right: 100 | |
stroke 5, color: :$strokeColor, only: [:bottom, :right, :left] | |
rounded left: 25, bottom: 25 | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment