-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
86 lines (68 loc) · 4.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Scratch-Animation by cwillisf</title>
</head>
<body>
<header>
<div class="inner">
<h1>Scratch-Animation</h1>
<h2>Skeletal Animation for Scratch</h2>
<a href="https://github.com/cwillisf/scratch-animation" class="button"><small>View project on</small> GitHub</a>
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
<h3>
<a id="skeletal-animation" class="anchor" href="#skeletal-animation" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Skeletal Animation?</h3>
<p><a href="https://en.wikipedia.org/wiki/Skeletal_animation">Skeletal animation</a> is a common animation technique in computer graphics. The name of the technique comes from using invisible "bones" to control the visible graphics.</p>
<p>In skeletal animation, bones may be arranged in a hierarchy so that the motion of one bone automatically affects another. For example, there may be a "hand" bone connected to an "arm" bone as its parent, so that when the arm moves the hand automatically stays attached.</p>
<h3>
<a id="skeletal-animation-in-scratch" class="anchor" href="#skeletal-animation-in-scratch" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Skeletal Animation in Scratch</h3>
<p>The extension includes only a few blocks:</p>
<ul>
<li>
<strong>start animation [wave hello]</strong>: Start playing an animation. From now on, the position and direction of each bone will be calculated based on this animation.</li>
<li>
<strong>set dance speed to [120] beats per minute</strong>: Synchronize the "dance" animation to a particular tempo.</li>
<li>
<strong>set [body] offset to [0] [0]</strong>: Set the offset of a bone relative to its parent. For example, the head bone will usually have a positive <em>y</em> offset since it's usually above the body bone.</li>
<li>
<strong>get current animation name</strong>: Get the name of the animation that is currently playing.</li>
<li>
<strong>get [body] [direction]</strong>: Get the position or direction of a bone. Use <strong>set position</strong> and <strong>set direction</strong> blocks to apply the animation to your sprites.</li>
</ul>
<h3>
<a id="try-it-out" class="anchor" href="#try-it-out" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Try it out!</h3>
<p>Visit <a href="http://scratchx.org/?url=https://cwillisf.github.io/scratch-animation/AnimateYourFriend.sbx">http://scratchx.org/?url=https://cwillisf.github.io/scratch-animation/AnimateYourFriend.sbx</a> to try out the extension!</p>
<h3>
<a id="view-the-code" class="anchor" href="#view-the-code" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>View the code!</h3>
<p>Visit <a href="https://github.com/cwillisf/scratch-animation/blob/gh-pages/animation.js">https://github.com/cwillisf/scratch-animation/blob/gh-pages/animation.js</a> to see the code for the extension, or <a href="https://github.com/cwillisf/scratch-animation/">https://github.com/cwillisf/scratch-animation/</a> to see the GitHub repository which contains the extension. </p>
</section>
<aside id="sidebar">
<a href="https://github.com/cwillisf/scratch-animation/zipball/master" class="button">
<small>Download</small>
.zip file
</a>
<a href="https://github.com/cwillisf/scratch-animation/tarball/master" class="button">
<small>Download</small>
.tar.gz file
</a>
<p class="repo-owner"><a href="https://github.com/cwillisf/scratch-animation"></a> is maintained by <a href="https://github.com/cwillisf">cwillisf</a>.</p>
<p>This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the Architect theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.</p>
</aside>
</div>
</div>
</body>
</html>