Skip to content

Instantly share code, notes, and snippets.

View ashraf2047's full-sized avatar

Ash Raji ashraf2047

View GitHub Profile
const startAnimation = () => {
if (retrievedDiff) {
ANIMATION_WINDOW_MAP[props.id] = setTimeout(
() => displayCharacter(),
constants.SPEED_SETTING[props.currentSpeed].File
);
}
};
initRecorder = async () => {
navigator.getUserMedia =
navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
if (navigator.mediaDevices) {
const s = await navigator.mediaDevices.getUserMedia({
audio: true,
const fileEditorChangeHandler = (newValue) => {
props.fileEditorContentChanged({
windowId: props.id,
value: newValue,
});
};
@ashraf2047
ashraf2047 / IDE.js
Last active September 10, 2022 02:10
// The layout of the windows in the IDE.
this.windowGrid = [
[new FileWindow(), new NoteWindow()],
[new TerminalWindow()],
];
const getWindow = (window) => {
let component;
switch (window.type) {
case constants.NOTE: