Skip to content

Instantly share code, notes, and snippets.

View ghostcode's full-sized avatar
🎯
Focusing

蝎子 ghostcode

🎯
Focusing
  • SH,China
View GitHub Profile
@ghostcode
ghostcode / clipboard.js
Created October 17, 2023 04:04 — forked from viclafouch/clipboard.js
How to copy an image or a text to clipboard in Javascript (new way !) See https://copy-to-clipboard.now.sh/
// @return Promise<boolean>
async function askWritePermission() {
try {
// The clipboard-write permission is granted automatically to pages
// when they are the active tab. So it's not required, but it's more safe.
const { state } = await navigator.permissions.query({ name: 'clipboard-write' })
return state === 'granted'
} catch (error) {
// Browser compatibility / Security error (ONLY HTTPS) ...
return false
@ghostcode
ghostcode / WebGL-WebGPU-frameworks-libraries.md
Created November 30, 2023 05:52 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries

Name Stars Last Commit Description
three.js ![GitHub Rep
{
".123" : "application/vnd.lotus-1-2-3",
".3dml" : "text/vnd.in3d.3dml",
".3g2" : "video/3gpp2",
".3gp" : "video/3gpp",
".a" : "application/octet-stream",
".aab" : "application/x-authorware-bin",
".aac" : "audio/x-aac",
".aam" : "application/x-authorware-map",
".aas" : "application/x-authorware-seg",
@ghostcode
ghostcode / ffmpeg.md
Created January 25, 2025 05:36 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet