This is a gist on GitHub
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
using UnityEngine; | |
using UnityEngine.UI; | |
public class InteriorCamera : MonoBehaviour { | |
public Camera cam; // Interior layer w/ culling | |
public RenderTexture texture; | |
public RawImage output; // UI layer + UI Camera Stack | |
public float duration = 0.5f; | |
public LeanTweenType easeIn = LeanTweenType.easeInCubic; | |
public LeanTweenType easeOut = LeanTweenType.easeOutCubic; |
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
using System.Collections.Generic; | |
using UnityEngine; | |
public class ModularCharacter : MonoBehaviour { | |
[System.Serializable] | |
public class Section { | |
public string name; | |
public List<GameObject> parts = new List<GameObject>(); | |
public int index = 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
import React, { useContext } from 'react' | |
import { ThemeProvider } from 'emotion-theming' | |
import { MDXProvider } from '@mdx-js/tag' | |
import styled from '@emotion/styled' | |
import merge from 'lodash.merge' | |
// defaults | |
const baseTheme = { | |
colors: { | |
text: '#345', |
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 React from 'react' | |
// Generative SVG patterns | |
const rand = (max = 128, min = 0) => Math.floor(Math.random() * (max - min) + min) | |
const diamond = [ | |
4, 0, | |
8, 4, | |
4, 8, | |
0, 4 |
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 React from 'react' | |
export default class ServerStyled extends React.Component { | |
constructor (props) { | |
super(props) | |
const isServer = typeof document === 'undefined' | |
if (!isServer) return | |
const { ServerStyleSheet } = require('styled-components') | |
const { renderToString } = require('react-dom/server') |
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 React from 'react' | |
import styled, { ThemeProvider } from 'styled-components' | |
export const Base = ({ | |
value, | |
children, | |
...props | |
}) => | |
<React.Fragment> | |
{React.Children.toArray(children) |
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
// Demo for using styled-system variants for button styles | |
// and mapping props for size | |
import React from 'react' | |
import styled from 'styled-components' | |
import { | |
color, | |
space, | |
fontSize, | |
buttonStyle, | |
} from 'styled-system' |
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 React from 'react' | |
import System from 'system-components/dist/System' | |
import styled from 'react-emotion' | |
const sys = new System({ | |
createComponent: type => (...styles) => styled(type)(...styles) | |
}) | |
const Heading = sys({ | |
fontSize: 5, |
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
diff --git a/src/bunnies.examples.js b/src/bunnies.examples.js | |
index f8a9f55..992637a 100644 | |
--- a/src/bunnies.examples.js | |
+++ b/src/bunnies.examples.js | |
@@ -1,3 +1,3 @@ | |
import {bunnies} from './bunnies' | |
-export const capitalBunnies = bunnies.map(b => b.toUpperCase()) | |
+export const capitalBunnies = bunnies.map(b => 'boop, ' + b.toUpperCase()) | |
diff --git a/src/index.js b/src/index.js |
NewerOlder