How to Clone a (Nested) Array in Javascript

The Problem David Walsh has a quick tutorial on how to clone an array in Javascript: var clone = myArray.slice( 0 ); This has an unmentioned danger. If your array contains nested arrays, the "clone" will contain references to the old arrays. Observe: var original = [ [1] ]; var cloned = original.slice( 0…

Free 3D Primitive Icon Set

While designing a 3D user interface, I came across the desire for some icons representing 3D primitives. I wanted a cube icon, torus icon, sphere icon, etc. After some searching I came up empty handed. So I made some! Here, you can have them. Preview You can just download one…

Flux For Stupid People

TL;DR As a stupid person, this is what I wish someone had told me when I struggled learning Flux. It's not straightforward, not well documented, and has many moving parts. This is a follow-up to ReactJS For Stupid People. Should I Use Flux? If your application deals with dynamic…

Journey Into Ketosis Part III

Warning: This post contains shirtless pictures of me. TL;DR Ketosis has treated me well. I share expected and unexpected results. Six Months of Ketosis In Part I I talked about what ketosis is and how to achieve it. In Part II I talked about my first month of complications.…

ReactJS For Stupid People

TL;DR I struggled for a long time trying to understand what React is and how it fits in the application architecture. This post is what I wish someone had told me. What is React? How does React compare to Angular, Ember, Backbone, et al? How do you handle data?…

How to Export a Rigged, Animated Model From 3ds Max to Three.js

See the demo running here. After about six months, I've finally figured out how to export a boned, rigged, animated model from 3ds max and import it into Three.js. Requirements Three.js r68 or higher Intermediate knowledge of 3ds max (this is not a rigging tutorial) Use the Skin…