Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@agence-webup/rgb-panel-frontend
Advanced tools
Frontend for the RGB Panel project.
Written in vanilla JS & HTML/CSS.
Uses a rgb-panel-api
endpoint to send drawings and text for display on an RGB panel.
npm install
npm run dev
If your project already uses npm
you can simply add the frontend library to your dependencies
npm i @agence-webup/rgb-panel-frontend
Copy the dist/
folder to your public web directory, either using a build tool such as Gulp or manually.
Now we need to set up a page to use the library. The following code is merely an example:
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>rgb-panel-frontend</title>
<link rel="stylesheet" href="webup-rgb-panel.css">
<style>
html {
font-size: 62.5%;
font-size: calc(1em * 0.625);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.ma {
margin-top: 2rem;
}
</style>
</head>
<body>
<h1>Webup RGB Panel</h1>
<div class="rgbpanel">
<div class="rgbpanel__tools" data-rgbpanel-tools></div>
<canvas id="panel" width="832" height="416" class="rgbpanel__canvas"
data-rgbpanel></canvas>
</div>
<div class="ma">
<button data-send>Envoyer</button>
<button data-clear>Effacer</button>
</div>
<script src="webup-rgb-panel.js"></script>
<script>
let webupRGBPanel = new WebupRGBPanel(
document.querySelector('[data-rgbpanel]'),
document.querySelector('[data-rgbpanel-tools]'),
64,
32,
"https://example.com/api"
)
document.querySelector('[data-send]').addEventListener('click', () => {
webupRGBPanel.send()
})
document.querySelector('[data-clear]').addEventListener('click', () => {
webupRGBPanel.clear()
})
</script>
</body>
</html>
Note: If you've deployed rgb-panel-worker using ZEIT functions, don't forget to specify
/api
at the end of the URL you provide. If you're using the Express server, you can simply specify the URL. Notice there should not be any trailing slash.
FAQs
Frontend for the RGB Panel project.
The npm package @agence-webup/rgb-panel-frontend receives a total of 2 weekly downloads. As such, @agence-webup/rgb-panel-frontend popularity was classified as not popular.
We found that @agence-webup/rgb-panel-frontend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.