2021-03-04 19:00:00 +01:00
|
|
|
<!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 = () => {
|
2021-05-19 09:36:11 +02:00
|
|
|
WA.sendChatMessage('Hello world!', 'Mr ROBOT');
|
2021-03-04 19:00:00 +01:00
|
|
|
}
|
|
|
|
</script>
|
2021-03-06 15:26:07 +01:00
|
|
|
<div id="chatSent"></div>
|
|
|
|
<script>
|
2021-05-20 08:58:05 +02:00
|
|
|
WA.onChatMessage((message => {
|
|
|
|
const chatDiv = document.createElement('p');
|
|
|
|
chatDiv.innerText = message;
|
|
|
|
document.getElementById('chatSent').append(chatDiv);
|
|
|
|
}));
|
2021-05-20 17:09:10 +02:00
|
|
|
WA.loadTileset('TEST', 'https://gparant.github.io/tcm-client/TCM/paris-map/tileset1.png', 32, 32, 0, 0);
|
2021-05-12 14:30:12 +02:00
|
|
|
</script>
|
2021-03-04 19:00:00 +01:00
|
|
|
</body>
|
|
|
|
</html>
|