jsdk-offical
Version:
JSDK is the most comprehensive TypeScript framework, like JDK.
83 lines (77 loc) • 2.63 kB
HTML
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Cache-Control" content="no-cache,no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>JSDK Example</title>
<link rel="shortcut icon" href="#" />
<link href="anim.css" rel="stylesheet" type="text/css" />
<script src="/jsdk/dist/jscore.js?_=34"></script>
<script src="/jsdk/dist/jsdk-config.js"></script>
</head>
<body>
<div class="content">
<section class="pane demos">
<header>
<h2 class="demos-title">TWEEN ANIMATION</h2>
</header>
<div id="demo" class="demo">
<div class="demo-content">
<pre class="battery-log"></pre>
</div>
</div>
</section>
<section class="pane demo-info">
<header>
<h2>Targets: object</h2>
</header>
<div class="info-output">
<p>A JavaScript Object with at least one property containing a numerical value.</p>
<table>
<thead>
<tr>
<td>Type</td>
<td>Default</td>
<td>Example</td>
</tr>
</thead>
<tbody>
<tr>
<td>Object</td>
<td>null</td>
<td><code class="hljs javascript">.targets(myObj)</code>
</td>
</tr>
</tbody>
</table>
<div class="code-preview">
<h2>CODE EXAMPLE</h2>
<pre><code class="hljs javascript">let logEl = $1('.battery-log');
let battery = {
charged: '0%',
cycles: 120
};
new TweenAnim({
keys: {
charged: '100%',
cycles: 130
},
round: 0,
on: {
updated: function () {
logEl.innerHTML = Jsons.stringify(battery);
}
}
}).targets(battery);</code></pre>
</div>
</div>
</section>
</div>
<script src="../env.js"></script>
<script src="tween_targets_object.js"></script>
</body>
</html>