WASM Bindgen
Enabled the UsbDevice.forget()
method
diff --git a/random/card/index.html b/random/card/index.html
index 6e6b256..2dc140a 100644
--- a/random/card/index.html
+++ b/random/card/index.html
@@ -5,130 +5,25 @@
G2's Website
-
-
+
-
+
Hi, I'm G2
-
+
+
- Some interesting text about me presented in a very concise manner.
+ I am a software developer specializing in Rust and website design.
+
-
+
+
diff --git a/random/card/style.css b/random/card/style.css
new file mode 100755
index 0000000..e088cf6
--- /dev/null
+++ b/random/card/style.css
@@ -0,0 +1,118 @@
+@import url('https://g2games.dev/assets/fonts/fonts.css');
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ background-color: #111114;
+ color: mintcream;
+ position: relative;
+ height: 100vh;
+ font-family: "Maple Mono";
+ font-size: 16pt;
+ width: 100vw;
+ padding: 5px;
+}
+
+@keyframes fade-in {
+ from {
+ opacity: 0;
+ scale: 90%;
+ }
+ to {
+ opacity: 1;
+ scale: 100%;
+ }
+}
+
+main {
+ animation-name: fade-in;
+ animation-duration: 1s;
+ animation-timing-function: cubic-bezier(.37,1.08,.83,1.12);
+
+ width: 400px;
+ max-width: 100%;
+ display: flex;
+ flex-direction: column;
+ position: relative;
+ left: 50%;
+ top: 50%;
+ translate: -50% -50%;
+ padding: 30px;
+
+ gap: 25px;
+
+ background-color: #26262d;
+ box-shadow: 0px 5px 20px black;
+
+ border-radius: 10px;
+}
+
+img {
+ width: 90px;
+ height: 90px;
+ border-radius: 50%;
+ margin: auto;
+ box-shadow: 4px 5px 2px black;
+}
+
+h1 {
+ height: fit-content;
+ margin: auto;
+ font-family: "Montserrat";
+ font-weight: 400;
+}
+
+hr {
+ border: none;
+ background: mediumaquamarine;
+ height: 2px;
+}
+
+p {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+a {
+ color: #88eaac;
+}
+
+a:visited {
+ color: #e8ea7a;
+}
+
+a:hover {
+ color: #7bc7ea;
+}
+
+li {
+ margin-left: 20px;
+}
+
+.left_corner {
+ height: 20px;
+ width: 20px;
+ border-left: 2px solid mediumaquamarine;
+ border-top: 2px solid mediumaquamarine;
+ margin-bottom: -40px;
+}
+
+.right_corner {
+ height: 20px;
+ width: 20px;
+ border-right: 2px solid gold;
+ border-bottom: 2px solid gold;
+ margin-top: -40px;
+ margin-left: auto;
+}
+
+header, div {
+ padding: 10px;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+}
diff --git a/random/cassettevid/LICENSE b/random/cassettevid/LICENSE
deleted file mode 100644
index b4d701c..0000000
--- a/random/cassettevid/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright 2020 Kris Slyka
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/random/cassettevid/README.md b/random/cassettevid/README.md
deleted file mode 100644
index 7b567ad..0000000
--- a/random/cassettevid/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# Welcome to the world of Cassette Video!
-
-This is the decoder for the cassette video format, a way to turn videos into audio to put them on normal compact audio cassettes.
-
-## Installation
-
-Just put this somewhere and include it in your html. No installation needed. ¯\\\_(ツ)\_/¯
-
-
-## Usage
-Check out the included example index.html file. Just instantiate a new decoder object and pass it the canvas you want to use as output in the options object.
-
-The following additional options are also available
-
-```
- hFreq: 225.0,
- vFreq: 3,
- overScan: 0.82,
- hOffset: 0.06525,
- pulseLength: ( 0.2 / 1000 ),
-```
-Timing parameters. These will be output by the encoder script during encoding.
-
-```
- brightness: 1,
- saturation: 1,
-```
-Brightness and saturation of the image. Increase these if the image looks dull or too dark.
-
-```
- lineWidth: 2.5,
-```
-Width of the lines drawn on screen. Increase this when your video has low vertical resolution, decrease this if you want more of a scan line effect.
-
-```
- clearInterval: 50,
-```
-How often the screen is cleared. Decreasing this will make the image fade faster. Might be needed for higher frame rates to reduce smearing or ghosting.
-
-```
- blend: true,
-```
-Disabling this will reduce ghosting but can also make the image look a little dark and less "CRT-like"
\ No newline at end of file
diff --git a/random/cassettevid/cv-decoder.js b/random/cassettevid/cv-decoder.js
deleted file mode 100644
index 7d70515..0000000
--- a/random/cassettevid/cv-decoder.js
+++ /dev/null
@@ -1,303 +0,0 @@
-class CVDecoder extends AudioWorkletProcessor
-{
- constructor( options )
- {
- super( options );
-
- let config = options.processorOptions;
-
- this.sig =
- {
- LMin: 0.0,
- LMax: 1.0,
-
- CMin: -1.0,
- CMax: 1.0,
- };
-
- this.hPhase = 0;
- this.vPhase = 0;
-
- this.pulse =
- {
- length: 0,
- timeout: 0,
- luma: 0,
- lumaPrev: 0,
- chroma: 0,
- chromaPrev: 0,
- edge: false,
- count: false
- };
-
- this.timing =
- {
- time: 0,
- lastV: 0,
- lastH: 0,
- };
-
- this.field = 0;
- this.chromaField = 0;
-
- this.chromaDelay = [];
- this.chromaDelayIndex = 0;
-
- this.currLine =
- {
- x1: 0,
- y: 0,
- maxPhase: 0,
- colors: []
- };
-
- this.overScan = config.overScan;
- this.hOffset = config.hOffset;
-
- this.pulseLength = config.pulseLength;
-
- this.brightness = config.brightness;
- this.saturation = config.saturation;
-
- this.hPerTarget = 1.0 / config.hFreq * sampleRate;
- this.vPerTarget = 1.0 / config.vFreq * sampleRate;
- this.hPeriod = this.hPerTarget;
- this.vPeriod = this.vPerTarget;
- }
-
- hPhaseToX( hPhase, vPhase, field )
- {
- return ( ( hPhase - this.hOffset ) / this.overScan );
- }
-
- vPhaseToY( hPhase, vPhase, field )
- {
- return ( vPhase + ( field / this.vPeriod ) * this.hPeriod * 0.5 );
- }
-
- YCbCrToRGB( y, cb, cr )
- {
- let r = y + 45 * cr / 32;
- let g = y - ( 11 * cb + 23 * cr ) / 32;
- let b = y + 113 * cb / 64;
-
- return [ r, g, b ]
- }
-
- process( inputs, outputs, parameters )
- {
- if( inputs[ 0 ].length != 2 )
- return;
-
- let lSamples = inputs[ 0 ][ 0 ];
- let cSamples = inputs[ 0 ][ 1 ];
-
- let s = this.sig;
- let p = this.pulse;
- let t = this.timing;
-
- let blank = false;
-
- for( let i = 0; i < lSamples.length; i++ )
- {
- t.time += 1;
-
- let lSample = lSamples[ i ] + Math.random() * 0.01 - 0.005;
- let cSample = cSamples[ i ] + Math.random() * 0.01 - 0.005;
-
-
- if( lSample < s.LMin ) s.LMin = lSample;
- if( lSample > s.LMax ) s.LMax = lSample;
-
- s.LMin *= 1.0 - ( 1.0 / sampleRate );
- s.LMax *= 1.0 - ( 1.0 / sampleRate );
-
- if( s.LMin > -0.025 ) s.LMin = -0.025;
- if( s.LMax < 0.025 ) s.LMax = 0.025;
-
-
- if( cSample < s.CMin ) s.CMin = cSample;
- if( cSample > s.CMax ) s.CMax = cSample;
-
- s.CMin *= 1.0 - ( 1.0 / sampleRate );
- s.CMax *= 1.0 - ( 1.0 / sampleRate );
-
- if( s.CMin > -0.05 ) s.CMin = -0.05;
- if( s.CMax < 0.05 ) s.CMax = 0.05;
-
-
- let luma = ( lSample * 2.0 - s.LMin ) / ( s.LMax - s.LMin ) * this.brightness * 255;
- let chroma = ( ( cSample * 2.0 - s.CMin ) / ( s.CMax - s.CMin ) * 255 - 128 ) * this.saturation;
- let chromaLast = this.chromaDelay[ this.chromaDelayIndex ] || 0;
-
- if( this.chromaDelayIndex < sampleRate / 10.0 )
- {
- this.chromaDelay[ this.chromaDelayIndex ] = chroma;
- this.chromaDelayIndex++;
- }
-
- let [ r, g, b ] = ( this.chromaField == 0 ) ?
- this.YCbCrToRGB( luma, chromaLast, chroma ) :
- this.YCbCrToRGB( luma, chroma, chromaLast );
-
- if( this.currLine.colors.length < this.hPerTarget * 2.0 )
- this.currLine.colors.push(
- {
- phase: this.hPhase,
- r: Math.max( Math.min( Math.round( r ), 255 ), 0 ),
- g: Math.max( Math.min( Math.round( g ), 255 ), 0 ),
- b: Math.max( Math.min( Math.round( b ), 255 ), 0 )
- }
- );
-
- this.currLine.maxPhase = this.hPhase;
-
- this.hPhase += 1.0 / this.hPeriod;
- this.vPhase += 1.0 / this.vPeriod;
-
- this.currLine.x2 = this.hPhaseToX( this.hPhase, this.vPhase, this.field );
-
- if( ( ( s.LMax - s.LMin ) > 0.1 ) && ( ( s.CMax - s.CMin ) > 0.1 ) )
- {
- if( lSample < s.LMin * 0.5 )
- p.luma = -1;
- else if( lSample > s.LMax * 0.5 )
- p.luma = 1;
- else
- p.luma = 0;
-
- if( cSample < s.CMin * 0.5 )
- p.chroma = -1;
- else if( cSample > s.CMax * 0.5 )
- p.chroma = 1;
- else
- p.chroma = 0;
-
- if( ( p.luma != p.lumaPrev ) || ( p.chroma != p.chromaPrev ) )
- {
- p.length = 0;
- p.lumaPrev = p.luma;
- p.chromaPrev = p.chroma;
- p.edge = true;
- }
-
- if( ( p.luma != 0 ) && ( p.chroma != 0 ) )
- {
- p.length += 1.0 / sampleRate;
-
- if( ( p.length > this.pulseLength * 0.5 ) && ( p.edge == true ) )
- {
- p.edge = false;
- p.count += 1;
- p.timeout = this.pulseLength * 1.25;
-
- if( p.count == 2 )
- {
- p.count = 0;
- blank = true;
-
- if( ( t.time - t.lastH < this.hPerTarget * 1.5 ) &&
- ( t.time - t.lastH > this.hPerTarget * 0.5 ) )
- this.hPeriod = this.hPeriod * 0.9 + ( t.time - t.lastH ) * 0.1;
-
- t.lastH = t.time;
-
- this.hPhase = 0;
- this.chromaDelayIndex = 0;
-
- if( p.luma > 0 )
- this.chromaField = 0;
- else
- this.chromaField = 1;
-
- if( p.luma != p.chroma )
- {
- if( ( t.time - t.lastV < this.vPerTarget * 1.5 ) &&
- ( t.time - t.lastV > this.vPerTarget * 0.5 ) )
- this.vPeriod = this.vPeriod * 0.75 + ( t.time - t.lastV ) * 0.25;
-
- t.lastV = t.time;
-
- this.vPhase = 0;
- this.chromaField = 1;
-
- if( p.luma > 0 )
- this.field = 0;
- else
- this.field = 1;
- }
- }
- }
- }
-
- if( p.count > 0 )
- {
- p.timeout -= 1.0 / sampleRate;
-
- if( p.timeout <= 0 )
- p.count = 0;
- }
- }
- else
- {
- p.luma = p.lumaPrev = 0;
- p.chroma = p.chromaPrev = 0;
- p.edge = false;
- p.count = 0;
- }
-
- this.hPeriod = this.hPeriod * ( 1.0 - 1.0 / sampleRate ) + this.hPerTarget * ( 1.0 / sampleRate );
- this.vPeriod = this.vPeriod * ( 1.0 - 1.0 / sampleRate ) + this.vPerTarget * ( 1.0 / sampleRate );
-
- if( this.hPhase >= 1.0 )
- {
- blank = true;
-
- this.hPhase -= 1.0;
- this.chromaDelayIndex = 0;
-
- if( this.chromaField == 1 )
- this.chromaField = 0;
- else
- this.chromaField = 1;
- }
-
- if( this.vPhase >= 1.0 )
- {
- blank = true;
-
- this.vPhase -= 1.0;
-
- if( this.field == 0 )
- this.field = 1;
- else
- this.field = 0;
- }
-
- if( blank )
- {
- if(
- ( this.currLine.colors.length > 5 ) &&
- ( this.currLine.maxPhase > 0 )
- )
- {
- this.port.postMessage( this.currLine );
- }
-
- this.currLine =
- {
- x1: this.hPhaseToX( this.hPhase, this.vPhase, this.field ),
- y: this.vPhaseToY( this.hPhase, this.vPhase, this.field ),
- maxPhase: 0,
- colors: []
- };
-
- blank = false;
- }
- }
-
- return true
- }
-}
-
-registerProcessor( 'cv-decoder', CVDecoder );
\ No newline at end of file
diff --git a/random/cassettevid/cv.js b/random/cassettevid/cv.js
deleted file mode 100644
index 2bcde56..0000000
--- a/random/cassettevid/cv.js
+++ /dev/null
@@ -1,131 +0,0 @@
-"use strict";
-
-class VC
-{
- constructor( canvas, config )
- {
- const defConfig =
- {
- clearInterval: 50,
- overScan: 0.82,
- hOffset: 0.06525,
- pulseLength: ( 0.2 / 1000 ),
- lineWidth: 2.5,
- brightness: 1,
- saturation: 1,
- blend: false,
- hFreq: 225.0,
- vFreq: 3
- };
-
- config = Object.assign( defConfig, config );
-
- this.lines = [];
-
- this.lastClear = 0;
- this.clearInterval = config.clearInterval;
-
- this.canvas = canvas;
-
- this.width = this.canvas.width;
- this.height = this.canvas.height;
-
- this.lineWidth = config.lineWidth;
- this.blend = config.blend;
-
- this.config = config;
-
- this.graphicsContext = null;
- this.audioContext = null;
- this.audioInput = null;
- this.decoder = null;
- }
-
- async start()
- {
- this.graphicsContext = this.canvas.getContext( "2d" );
-
- this.audioContext = new window.AudioContext();
-
- let stream = await navigator.mediaDevices.getUserMedia(
- {
- audio: {
- echoCancellation: false,
- noiseSuppression: false,
- autoGainControl: false,
- channelCount: {
- exact: 2
- }
- }
- } );
-
- this.audioInput = this.audioContext.createMediaStreamSource( stream );
-
- await this.audioContext.audioWorklet.addModule( 'cv-decoder.js' )
-
- this.decoder = new AudioWorkletNode( this.audioContext, 'cv-decoder',
- {
- numberOfInputs: 2,
- numberOfOutputs: 0,
- processorOptions: this.config
- }
- );
-
- this.decoder.port.onmessage = event =>
- {
- if( this.lines.length < 1024 )
- this.lines.push( event.data )
- };
-
- this.audioInput.connect( this.decoder );
-
- requestAnimationFrame( () => this.draw() );
- }
-
- activate()
- {
- this.audioContext.resume();
- }
-
- draw()
- {
- if( Date.now() - this.lastClear > this.clearInterval )
- {
- this.graphicsContext.fillStyle = 'rgba(0,0,0,0.05)';
- this.graphicsContext.globalCompositeOperation = 'source-over';
- this.graphicsContext.fillRect( 0, 0, this.width, this.height );
- this.lastClear = Date.now();
- }
-
- if( this.blend )
- this.graphicsContext.globalCompositeOperation = 'screen';
- else
- this.graphicsContext.globalCompositeOperation = 'source-over';
-
- this.graphicsContext.lineWidth = this.lineWidth;
-
- const width = this.width;
- const height = this.height;
-
- for( let line of this.lines )
- {
- var gradient = this.graphicsContext.createLinearGradient( line.x1 * width, line.y * height, line.x2 * width, line.y * height );
-
- for( let color of line.colors )
- gradient.addColorStop( color.phase / line.maxPhase, 'rgb(' + color.r + ',' + color.g + ',' + color.b + ')' );
-
- this.graphicsContext.beginPath();
-
- this.graphicsContext.moveTo( line.x1 * width + Math.random() * 2.0 - 1.0, line.y * height + Math.random() * 2.0 - 1.0 );
- this.graphicsContext.lineTo( line.x2 * width + Math.random() * 2.0 - 1.0, line.y * height + Math.random() * 2.0 - 1.0 );
-
- this.graphicsContext.strokeStyle = gradient;
-
- this.graphicsContext.stroke();
- }
-
- this.lines = [];
-
- requestAnimationFrame( () => this.draw() );
- }
-}
diff --git a/random/cassettevid/index.html b/random/cassettevid/index.html
deleted file mode 100644
index b03c935..0000000
--- a/random/cassettevid/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
VC
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/random/dmp/dango-icon-text.svg b/random/dmp/dango-icon-text.svg
index 80fba87..1139ada 100644
--- a/random/dmp/dango-icon-text.svg
+++ b/random/dmp/dango-icon-text.svg
@@ -7,7 +7,7 @@
viewBox="0 0 222.86589 81.01266"
version="1.1"
id="svg1"
- inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
+ inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="dango-icon-text.svg"
xml:space="preserve"
inkscape:export-filename="dango-icon_Layer 1.png"
@@ -31,11 +31,11 @@
inkscape:pagecheckerboard="false"
inkscape:deskcolor="#474747"
inkscape:document-units="mm"
- inkscape:zoom="0.5"
- inkscape:cx="2010"
- inkscape:cy="788"
+ inkscape:zoom="0.35355339"
+ inkscape:cx="1115.8145"
+ inkscape:cy="87.681241"
inkscape:window-width="2560"
- inkscape:window-height="1354"
+ inkscape:window-height="1360"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
@@ -65,52 +65,29 @@
id="defs1" />
D M PD M PD M PDango Music Player Dango Music Player
+ transform="matrix(2.7245762,0,0,2.7245762,-0.727061,-0.45814532)">
diff --git a/random/index.html b/random/index.html
index 1540323..fa1f2f7 100644
--- a/random/index.html
+++ b/random/index.html
@@ -2,6 +2,7 @@
+
G2's Website
diff --git a/random/lucasystem-info/index.html b/random/lucasystem-info/index.html
new file mode 100755
index 0000000..2e59430
--- /dev/null
+++ b/random/lucasystem-info/index.html
@@ -0,0 +1,57 @@
+
+
+
+
+
G2's Website
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LUCA System
+
+
+ CZ Images
+ Images in LUCA System are stored in files which are known as CZ# files (eg. CZ1, CZ3) due to the magic bytes in the file header. These formats are proprietary, and cannot be read or manipulated by regular image viewing or editing software.
+
+
+
+
+
+ ©2024 G2
+ Powered by and
+
+
+
+