mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[ts][canvas] Improve examples
This commit is contained in:
parent
3ca76acdca
commit
6d4b8e68bc
@ -6,7 +6,7 @@
|
||||
<script src="../dist/iife/spine-canvas.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="margin: 0; padding: 0;">
|
||||
<body style="margin: 0; padding: 0; background: #333">
|
||||
<canvas id="canvas" style="width: 100%; height: 100vh;"></canvas>
|
||||
</body>
|
||||
|
||||
@ -45,6 +45,9 @@
|
||||
animationStateData.defaultMix = 0.2;
|
||||
animationState = new spine.AnimationState(animationStateData);
|
||||
|
||||
// Set the run animation, looping.
|
||||
animationState.setAnimation(0, "run", true);
|
||||
|
||||
// Start rendering.
|
||||
requestAnimationFrame(render);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<script src="../dist/iife/spine-canvas.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="margin: 0; padding: 0;">
|
||||
<body style="margin: 0; padding: 0; background: #333">
|
||||
<canvas id="canvas" style="width: 100%; height: 100vh;"></canvas>
|
||||
</body>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user