Skip to content

Instantly share code, notes, and snippets.

Jürg Lehni lehni

Block or report user

Report or block lehni

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 index.html
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2014-2017, Jan Bösenberg & Jürg Lehni
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
@lehni
lehni / index.html
Last active Aug 28, 2019
Paper.js Bézier Offsetting
View index.html
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2014-2017, Jan Bösenberg & Jürg Lehni
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
View poly-roots.js
'use strict';
/*function show(a,b) {
var i,nums;
nums = [];
for(i=0; i<a.length; i++) {
nums.push('('+a[i]+'+'+b[i]+'i)');
}
return '['+nums.join(', ')+']';
}
@lehni
lehni / README.md
Last active Jan 7, 2016
Paper.js #823: Rendering errors with large coordinates
View README.md
@lehni
lehni / keybase.md
Last active Aug 29, 2015
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am lehni on github.
  • I am lehni (https://keybase.io/lehni) on keybase.
  • I have a public key whose fingerprint is 7512 3A4F C59B 5326 8C06 B105 3B67 3665 68D7 29E9

To claim this, I am signing this object:

@lehni
lehni / index.html
Created Aug 11, 2011
Paper.js Non-Flocking Tadpoles
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Tadpoles</title>
<script type="text/javascript" src="http://paperjs.org/static/js/paper.js"></script>
<script type="text/javascript" canvas="canvas">
paper.install(window);
window.onload = function() {
paper.setup('canvas');
@lehni
lehni / index.html
Created Aug 5, 2011
Paper.js Rounded Rectangles
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Rounded Rectangles</title>
<script type="text/javascript" src="http://paperjs.org/static/js/paper.js"></script>
<script type="text/paperscript" canvas="canvas">
var mousePoint = view.center;
var amount = 25;
var colors = ['red', 'white', 'blue', 'white'];
@lehni
lehni / animframe.js
Created Mar 13, 2011
Paul Irish's requestAnimFrame shim improved with suport for element visibility and window blur detection
View animframe.js
// requestAnimFrame shim layer by Paul Irish
// Support for element visibility and window blur detection by Juerg Lehni
(function() {
// Chrome shipped without the time arg in m10
var webkitRequest = window.webkitRequestAnimationFrame;
if (webkitRequest) {
webkitRequest(function(time) {
if (time == undefined)
webkitRequest = null;
You can’t perform that action at this time.