Skip to content

Instantly share code, notes, and snippets.

Avatar

Marc-Stefan Cassola maccesch

View GitHub Profile
@maccesch
maccesch / CytoscapeDotLayout.ts
Created Nov 7, 2018
cytoscape.js dot layout using viz.js
View CytoscapeDotLayout.ts
import Viz from 'viz.js';
import {Module, render} from 'viz.js/full.js.opaque';
function CytoscapeDotLayout(options) {
this.options = options;
}
CytoscapeDotLayout.prototype.run = function () {
let dotStr = 'digraph G {';
@maccesch
maccesch / iTween.cs
Last active Jun 30, 2020
Unity3D iTween patched to work in the new Unity GUI (uGUI).
View iTween.cs
// Copyright (c) 2011 Bob Berkebile (pixelplacment)
// Please direct any bugs/comments/suggestions to http://pixelplacement.com
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@maccesch
maccesch / lagrange.js
Created May 27, 2011
Lagrange Polynomial Interpolation. Example: http://jsfiddle.net/maccesch/jgU3Y/
View lagrange.js
/**
* At least two points are needed to interpolate something.
* @class Lagrange polynomial interpolation.
* The computed interpolation polynomial will be reffered to as L(x).
* @example
* var l = new Lagrange(0, 0, 1, 1);
* var index = l.addPoint(0.5, 0.8);
* console.log(l.valueOf(0.1));
*
* l.changePoint(index, 0.5, 0.1);
You can’t perform that action at this time.