Skip to main content

Samples

Set Icon

Set icon of user.

Example banner

index.html
<!DOCTYPE html>
<html lang="ja">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Spacha Sample</title>
</head>

<body>
<div id="spc-div"></div>
<img id="icon" src="https://github.com/bonychops.png" style="display: none;">
<script src="js/spacha.min.js"></script>
<script>
var spc = document.getElementById("spc-div");
var icon = document.getElementById("icon");
icon.onload = function(){
new Spacha(spc, {
message: "Hello, Spacha!",
price: 2000,
user: {
name: "Bony_Chops",
img: icon
}
});
}
</script>
</body>

</html>

Export as image

EXport as image with feature of canvas.

caution

HTML version is not incompatible