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
// C# side | |
public class LineRenderer : MonoBehaviour { | |
[SerializeField] private Camera _camera; | |
[SerializeField] private Material _lineMaterial; | |
private NativeArray<float3> _linePoints; | |
private ComputeBuffer _linePointBuffer; | |
private ComputeBuffer _lineIndexBuffer; | |
private int _lineCount; |
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 Unity.Mathematics; | |
public struct Transform2D { | |
public float2 position; | |
public float2 velocity; | |
} | |
public class LookAt2dWithoutTrig : MonoBehaviour | |
{ |
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.Generic; | |
using UnityEngine; | |
public class ColliderMovingCost : MonoBehaviour { | |
[SerializeField] private bool _useKinematicRigidbodies = true; | |
[SerializeField] private bool _moveCollidersUsingRigidbody = false; | |
private List<Transform> _colliderTransforms; | |
private List<Rigidbody> _colliderBodies; |
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 "Unlit/Outline" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_OutlineColor("Outline Color", Color) = (0,0,0,1) | |
_OutlineThickness("Outline Thickness", Range(0,1)) = 0.03 | |
} | |
SubShader |
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 math | |
import random; | |
from sympy import * | |
''' | |
=== Toying with Benford's law === | |
https://en.wikipedia.org/wiki/Benford's_law | |
Introductory video by Numberphile: www.youtube.com/watch?v=XXjlR2OK1kM |
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 System.IO; | |
using UnityEngine; | |
/* | |
Possible effects to model: | |
Attenuation of taps | |
- Apparent surface area |
OlderNewer