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 UnityEngine; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class ProceduralCircle : MonoBehaviour { | |
public float radius = 1; | |
public int sides = 5; | |
private Vector3[] vertices; | |
private Vector2[] uv; |
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 { Vector3, Camera } from 'three' | |
class IndexedVector3 extends Vector3 { | |
constructor(public readonly index: number, public bufferIndex: number = -1) { | |
super() | |
} | |
} | |
export class ParticleSorter { | |
private _currentBuffer: number[] = [] |
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 { Vector3 } from 'three' | |
const PI2 = Math.PI * 2 | |
class Particle { | |
public random0 = Math.random() | |
public random1 = Math.random() | |
public random11 = Math.random() * 2 - 1 | |
position = new Vector3() | |
velocity = new Vector3() |