Skip to content

Instantly share code, notes, and snippets.

@jxnblk
jxnblk / InteriorCamera.cs
Last active October 19, 2023 21:44
Unity interior scene camera fade script
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;
@jxnblk
jxnblk / ModularCharacter.cs
Created October 16, 2023 15:31
Novantica modular characters scripts for Unity
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;
}

Hello

This is a gist on GitHub

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',
@jxnblk
jxnblk / Pattern.js
Created February 26, 2019 01:25
generative svg pattern
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
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')
import React from 'react'
import styled, { ThemeProvider } from 'styled-components'
export const Base = ({
value,
children,
...props
}) =>
<React.Fragment>
{React.Children.toArray(children)
// 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'
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,
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