Skip to content

Instantly share code, notes, and snippets.

Jan Wrobel wrr

Block or report user

Report or block wrr

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 gist:ee28edd317f34e833e62
struct Row {
float& operator[](int column) {
return coeffs[column];
typedef std::tr1::unordered_map<int, float> RowData;
RowData coeffs;
wrr /
Created Jun 13, 2013
Experiments with Elixir inspired pipe API for python
import unittest
class Pipe:
OUT = object()
def __init__(self, val):
self._val = val
def __call__(self, *args):
if not (args):
View headlight
vec3 lightW = normalize(cameraPosition -;
gl_FragColor.rgb = color * max(dot(normalize(vNormalW), lightW), 0.0);
wrr /
Created Jul 3, 2018
Decompresses all compressed files in a Shapespark bundle
if [ $# != 1 ]; then
echo "usage: $0 path-to-bundle-dir";
echo "Uncompressing files in ${bundle_dir}"
wrr / body-end.html
Created Jan 3, 2019
Change Shapespark play button
View body-end.html
(function() {
document.getElementById('play-button').src = "";
wrr / web.config
Created Dec 7, 2018
IIS server configuration file for self-hosting of Shapespark bundles.
View web.config
<?xml version="1.0" encoding="UTF-8"?>
IIS site configuration file for Shapespark self-hosting bundles.
Requires URL rewrite extension:
Extract the Shapespark bundle together with this config file to a
folder that is configured as a IIS site (<sites> section of
the applicationhost.config).
wrr / index.html
Last active May 14, 2019
Random walk illustrated with D3.
View index.html
<!DOCTYPE html>
<!-- By Jan Wrobel. See it working at:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Random walk</title>
wrr / body-end.html
Created Jun 7, 2019
Detect which material was selected by the material picker
View body-end.html
var viewer = WALK.getViewer();
viewer.onSceneReadyToDisplay(function() {
var setMaterialForNodeOriginal = viewer.setMaterialForNode;
viewer.setMaterialForNode = function(material, node) {
console.log('Material selected ' +;
setMaterialForNodeOriginal.apply(this, [material, node]);
wrr / body-end.html
Created Jul 4, 2019
Detect which material was selected by the user and show the material name.
View body-end.html
#banner {
position: absolute;
top: 30px;
text-align: center;
font-size: 3em;
width: 100%;
z-index: 10;
visibility: hidden
wrr / body-end.html
Created Aug 28, 2019
Increase Shapespark camera near to help with z-fighting
View body-end.html
(function() {
You can’t perform that action at this time.