I am trying to create a spritesheet and use it in code to set texture for a element
Any help?
Hi @Yathiraj_Karkera and welcome,
Take a look at the following engine example, it showcases how to do that fully in code:
<!DOCTYPE html>
<html>
<head>
<title>PlayCanvas Sprite Button</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="icon" type="image/png" href="../playcanvas-favicon.png" />
<script src="../lib/playcanvas.js"></script>
<script src="../lib/playcanvas-extras.js"></script>
<style>
body {
margin: 0;
overflow-y: hidden;
}
</style>
</head>
<body>
<!-- The canvas element -->
<canvas id="application-canvas"></canvas>
This file has been truncated. show original
Thank you for the response.
but i already created the UI using the editor and used images, Now i want convert those images in to spritesheet and use it.