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
#showtooltip Sap | |
/console SET targetNearestDistance 10 | |
/targetenemy [noharm] | |
/console SET targetNearestDistance 41 | |
/cast Sap |
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
Shader "Custom/Lit Particle" { | |
Properties { | |
_TintColor ("Tint Color", Color) = (1,1,1,1) | |
_MainTex ("Particle Texture", 2D) = "white" {} | |
} | |
SubShader { | |
Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
LOD 200 | |
CGPROGRAM |
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 { useRef, useEffect, useCallback } from 'react' | |
const useAnimationFrame = ( | |
tick: (dt: number, elapsed: number, frame: number) => void | |
) => { | |
const tickRef = useRef(tick) | |
const requestRef = useRef(0) | |
const prevTimeRef = useRef(0) | |
const elapsedRef = useRef(0) | |
const frameRef = useRef(0) |
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 React, { useState, useMemo, useContext } from 'react'; | |
interface ToggleState { | |
items: any[]; | |
toggleItem: (item: any, toggled?: boolean) => boolean; | |
} | |
const ToggleContext = React.createContext<ToggleState>({ | |
items: [], | |
toggleItem: () => false, |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[CreateAssetMenu(menuName = "Problematic/Query Helper")] | |
public class QueryHelper : ScriptableObject | |
{ | |
[SerializeField] | |
protected float maxDistance = Mathf.Infinity; | |
[SerializeField] |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public interface ILSystemGenerator { | |
string Generate (string axiom, int depth); | |
void Clear(); | |
} |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Problematic.Toolkit { | |
// https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf | |
public static class PoissonDiscSampler { | |
const int SAMPLE_LIMIT = 30; | |
public static IEnumerable<Vector2> Sample<T> (QuadTree<T> quadTree, float minSeparation, System.Func<Vector2, T> CreateSample, System.Func<Vector2, QuadTree<T>, float, bool> IsCandidateValid) where T : IQuadTreeObject{ |
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
using System; | |
using System.Collections.Concurrent; | |
using UnityEngine; | |
public class StateHistory<T> where T : IState<T> { | |
protected T[] buffer; | |
public int Head { get; protected set; } | |
public int Tail { | |
get { | |
if (Count < buffer.Length) { |
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
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var through2 = require('through2'); | |
gulp.task('build', function () { | |
return gulp.src('./src/main.js') | |
.pipe(through2.obj(function (file, enc, next) { | |
browserify(file.path, { debug: process.env.NODE_ENV === 'development' }) | |
.transform(require('babelify')) | |
.bundle(function (err, res) { |
NewerOlder