@eriksonarias/palace-js (1.0.6)
Published 2026-09-07 20:50:17 +00:00 by eriksonarias
Installation
@eriksonarias:registry=npm install @eriksonarias/palace-js@1.0.6"@eriksonarias/palace-js": "1.0.6"About this package
Implementation of Palace using Vite and Three.js, with lobby management and multiplayer connectivity through Peer.js.
Installation
As an npm package
npm config set @eriksonarias:registry https://git.eriksonarias.dev/api/packages/eriksonarias/npm/
npm install @eriksonarias/palace-js
Embedded in a website
Palace.js can be embedded into any webpage by doing the following:
<!-- Import stylesheet into head element -->
<head>
<link rel="stylesheet" href="https://cdn.eriksonarias.dev/eriksonarias_dev/js/palace-js/style.css" />
</head>
<body>
<div id="palace"></div>
<script src="https://cdn.eriksonarias.dev/eriksonarias_dev/js/palace-js/palace.umd.js"></script>
<script>
window.Palace.mountPalace(
document.getElementById("palace"),
{
assetBase: "https://cdn.eriksonarias.dev/eriksonarias_dev/js/palace-js",
peerServerOptions: [
{ name: "0.peer.js" },
{ name: "My Connection Server", config: {host: "peer.mysite.com", port: 443, path: "/peerjs", secure: true}},
]
}
);
</script>
</body>
Keep in mind: the copy from my personal CDN cdn.eriksonarias.dev is always the latest version. Feel free to pull down the source and build to pin to a specific version.
Credits
- Playing card assets made available through Google Code Archive.
- Heritage Display font designed by Daniel Schriër.
- DM Mono font designed by Colophon Foundry.
- Junicode font designed by Peter Baker.
- Fire effect noise maps and post-processing flow developed by Yugam via Codepen.
Dependencies
Dependencies
| ID | Version |
|---|---|
| peerjs | ^1.5.4 |
| three | ^0.169.0 |
Development dependencies
| ID | Version |
|---|---|
| @types/three | ^0.169.0 |
| husky | ^9.1.7 |
| typescript | ^5.6.3 |
| vite | ^5.4.8 |