RetroWeb Components is a library of WebComponents for working with JavaScript-based emulators.
This library was created by splitting up the functionality of the RetroWeb Vintage Computer Museum into smaller stand-alone components. These components are meant to be simple enough to be incorporated into other websites or used with other JavaScript emulators.
|
|
inline-svgThe inline-svg tag inserts SVG images into the document where they may be styled or animated using CSS rules.
<style>
inline-svg:hover {
--path-color: green;
}
</style>
<inline-svg src="test.svg"></inline-svg>
Element Attributes:
CSS Attributes:
|
|---|---|
|
emulator-skin
Surrond the
<emulator-skin name="macplus">
<canvas id="screen-area"></canvas>
<div id="sidebar">
Additional content can go here
</div>
</emulator-skin>
Element Attributes:
JavaScript Methods:
|
|
animated-zoom
Surrounding an emulator's <animated-zoom> <canvas></canvas> </animated-zoom>
This element provides no controls for triggering the action. Use this element alone if you intend to build your own user interface, otherwise combine it with JavaScript Methods:
|
|
emulator-buttons (for use with animated-zoom)
Surround an element with
<animated-zoom>
<emulator-buttons>
<canvas></canvas>
</emulator-buttons>
</animated-zoom>
The buttons will be shown on the emulator's screen when the user hovers over it. The buttons do the following actions:
emulator-buttons will also add two buttons to the full-screen mode, allowing the user to exit full screen mode or restart the emulator.
JavaScript Methods:
Credits:Modern UI Icons for interface icons. |
|
emulator-popupsShows dialog and status boxes over the emulator. <div style="position: relative"> <canvas></canvas> <emulator-popups></emulator-popups> </div> The various dialog boxes can be triggered by JavaScript and will provide results via callbacks. JavaScript Methods:
|
|
|
file-iconsShows icons for mounting disks or triggering actions.
<file-icons>
<a data-type="type" href="resource-url" data-json="{ ... }"></a>
</file-icons>
Anchor Attributes:
Data-Type Values:
Credits:Crystal Clear icon set by Everaldo Coelho |
|
|
serial-modemUses peer.js to establish a simulated dial up connection through WebRTC between two browser windows (possibly across the world). Automatically assigns a virtual phone number for the user, implements the Hayes command set for control and supports a terminal widget for interaction.
<serial-modem peer-config='{"key":"your-peerjs-cloud-key"}'>
</serial-modem>
JavaScript Methods:
Element Attributes:
|
Additional Examples |
|