Skip to content

Instantly share code, notes, and snippets.

Stella Cannefax stella3d

Block or report user

Report or block stella3d

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View delaunator_benchmark_results.md

These benchmarks compare the results for delaunator before and after a refactor of the underlying data representation.

All tests were run on a 2018 Razer Blade with an intel i7-8750H cpu, using node.js v10.15.0.

"before" results were tested on current master branch of delaunator.

"after" results were tested on my soa (structure of arrays) branch

Comparison

uniform:

@stella3d
stella3d / FindWindowInstanceExample.cs
Created Sep 28, 2018
check if a window resource exists without creating it
View FindWindowInstanceExample.cs
using UnityEditor;
using UnityEngine;
public static class FindWindow
{
[MenuItem("Debug/FindWindow")]
public static bool DoesWindowExist()
{
var windowType = typeof(SceneView); // substitute with your own type
var allInstances = Resources.FindObjectsOfTypeAll(windowType);
@stella3d
stella3d / FindWindowInstanceExample.cs
Created Sep 28, 2018
check if a window resource exists without creating it
View FindWindowInstanceExample.cs
using UnityEditor;
using UnityEngine;
public static class FindWindow
{
[MenuItem("Debug/FindWindow")]
public static bool DoesWindowExist()
{
var windowType = typeof(SceneView); // substitute with your own type
var allInstances = Resources.FindObjectsOfTypeAll(windowType);
@stella3d
stella3d / cleanUnityGithubDiffs.js
Last active Jul 25, 2018
Hide *.meta & *.asset files, and load large diffs by default
View cleanUnityGithubDiffs.js
const filesContainer = document.querySelector('div#files');
filesContainer.querySelectorAll('div.js-details-container').forEach(div => {
let fileHeader = div.querySelector('div.file-header');
let filePath = fileHeader.getAttribute('data-path');
let isMetaFile = filePath.endsWith('.meta');
let isDotAssetFile = filePath.endsWith('.asset');
let shouldHide = isMetaFile || isDotAssetFile;
let loadDiffButton = div.querySelector('button.load-diff-button');
if(loadDiffButton != null && !shouldHide) {
View itersolve.py
import numpy as np
import random
import matplotlib.pyplot as plt
def dirichletPop(dim):
transMat = np.random.dirichlet(np.ones(dim),size=dim)
return transMat
def n0Pop(dim):
n0 = (1/dim) * np.ones((1,dim))
View NiceDataClass_1.cs
using UnityEngine;
using UnityEngine.Serialization;
public class NiceDataClass : MonoBehaviour {
[SerializeField]
public string name;
[SerializeField]
public int particleCount;
You can’t perform that action at this time.