This file contains 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
:root { | |
--idx0: #000000; | |
--idx1: #222034; | |
--idx2: #45283c; | |
--idx3: #663931; | |
--idx4: #8f563b; | |
--idx5: #df7126; | |
--idx6: #d9a066; | |
--idx7: #eec39a; | |
--idx8: #fbf236; |
This file contains 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 getPixels from "get-pixels"; | |
import { max, min } from "lodash"; | |
import { NdArray } from "ndarray"; | |
import { Vector3 } from "three"; | |
// Example, use like: | |
const makeHeightfieldColliderFromImage = async () => { | |
const heightMapTexture = "myimage.png"; | |
const xSubdivisions = 200; | |
const zSubdivisions = 200; |
This file contains 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 * as THREE from "three"; | |
import { BufferGeometry } from "three"; | |
/** | |
* Capsule Geometry | |
* especially helpful in 3D games | |
* original creator: | |
* @author maximequiblier | |
* | |
* Modified for typescript (partially) |
This file contains 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 { get } from 'lodash'; | |
// will result in template parsing inside js-like template-string literals: ${ } | |
// for example ${myObject.name} | |
const templateStringExpression = /\${([^}]*)}/g; | |
const templater = (sourceObject: object, templateString: string) => { | |
return templateString.replace( | |
templateStringExpression, |
This file contains 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
service: sg-platform-module-manager | |
custom: | |
serviceSlug: module-manager | |
dynamodb: | |
start: | |
seed: true | |
seed: | |
domain: | |
sources: | |
- |
This file contains 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
export const UserEdit = (props) => ( | |
<Edit title="Edit User" {...props}> | |
<SimpleForm> | |
<DisabledInput source="_id" /> | |
<TextInput source="username" /> | |
<TextInput source="staffNumber" /> | |
</SimpleForm> | |
</Edit> | |
); |
This file contains 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
/** | |
* Returns if the number is dense or not (averge of digits > 7) | |
* @param {int} int to test | |
* @returns {boolean} | |
*/ | |
function isDenseNumber(int) { | |
let digitArray = [] | |
let valDigits = 0 | |
while (int) { | |
let digit = int % 10 |
This file contains 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
<style> | |
.fullheight { | |
height: 200vw; | |
} | |
.bg-candy-stripes { | |
background: repeating-linear-gradient( | |
45deg, | |
#bdeaff, | |
#bdeaff 10px, | |
#1d9cd8 10px, |
This file contains 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
.fa-spin { | |
-webkit-animation: fa-spin 2s infinite linear; | |
animation: fa-spin 2s infinite linear; | |
} | |
.fa-pulse { | |
-webkit-animation: fa-spin 1s infinite steps(8); | |
animation: fa-spin 1s infinite steps(8); | |
} | |
@-webkit-keyframes fa-spin { | |
0% { |
NewerOlder