This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CameraControls } from '@react-three/drei'; | |
import { | |
Dispatch, | |
MutableRefObject, | |
SetStateAction, | |
useEffect, | |
useRef, | |
} from 'react'; | |
import { Plane, Raycaster, Vector2, Vector3 } from 'three'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SystemsContainerLite.h" | |
void UESLSystemsContainer::Execute(UObject* Context, UESLProcess *InCommand) | |
{ | |
InCommand->Error = NAME_None; | |
for (TObjectPtr<UESLSystem> ExecutionStep : Systems) | |
{ | |
if (InCommand->Error != NAME_None) | |
{ | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Removes new lines and tabs and preceding whitespace in a multi-line | |
* template strings. | |
* | |
* E.g.: | |
* console.log(lineTag`line: ${1} | |
* line: ${2} | |
* line: ${3}`); // line: 1 line: 2 line: 3 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DELIMITER = /[\W_](\w)/g | |
export default str => str.replace(DELIMITER, (m, ch) => ch.toUpperCase()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
util functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HEAD = 0; | |
const splitCallback = list => [ | |
list.slice(0, list.length - 1), | |
list[list.length - 1] | |
]; | |
function next(args, done, ...functions) { | |
const fnc = functions[HEAD]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deepMerge(...objects) { | |
let dest = objects[0]; | |
let target = objects[1] || {}; | |
for(let targetKey of Object.keys(target)) { | |
let targetValue = target[targetKey]; | |
if (Array.isArray(targetValue)) { | |
dest[targetKey] = dest[targetKey] || []; | |
dest[targetKey].push(...targetValue); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ================================================================================================== | |
# Makes an archive of a pre-built distributable and | |
# using github REST apiV3 create a release on the current tag and uploads archive. | |
# This will assume the tag was created with the same name as current version in package.json | |
# | |
# Usage: | |
# github-deploy <archive file path> | |
# ================================================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
class Signal { | |
constructor() { | |
this._callbacks = new Map(); | |
} | |
add(fnc) { | |
this._callbacks.set(fnc, {count:0}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 Dmitry Matveev | |
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 |
NewerOlder