24 lines
826 B
HTML
24 lines
826 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<script src="http://play.workadventure.localhost/iframe_api.js"></script>
|
|
</head>
|
|
<body>
|
|
<button id="sendchat">Send chat message</button>
|
|
<script>
|
|
document.getElementById('sendchat').onclick = () => {
|
|
WA.sendChatMessage('Hello world!', 'Mr ROBOT');
|
|
}
|
|
</script>
|
|
<div id="chatSent"></div>
|
|
<script>
|
|
WA.onChatMessage((message => {
|
|
const chatDiv = document.createElement('p');
|
|
chatDiv.innerText = message;
|
|
document.getElementById('chatSent').append(chatDiv);
|
|
}));
|
|
WA.loadTileset('TEST', 'https://gparant.github.io/tcm-client/TCM/paris-map/tileset1.png', 32, 32, 0, 0);
|
|
</script>
|
|
</body>
|
|
</html>
|