Skip to content

Instantly share code, notes, and snippets.

@akfish
Created May 24, 2015 13:06
Show Gist options
  • Save akfish/b242d3d4ed710411be99 to your computer and use it in GitHub Desktop.
Save akfish/b242d3d4ed710411be99 to your computer and use it in GitHub Desktop.
JavaScript Fractal Mock Up
var opts = {
background: { b: -0.1, s: 0.25, h:44 }
};
var AncientMap = Shape.Declare()
.Rule(function() {
new Wall()
.adjust({b: 0.1, h: 34});
new Wall()
.translateY(0.95)
.rotate(1)
.skew(0.975);
});
var Wall = Shape.Declare()
.Rule(function() {
new Wall()
.translateY(0.95)
.rotate(1)
.skew(0.975);
})
.Rule(function() {
new Square();
new Wall()
.translateY(0.95)
.rotate(-1)
.skew(0.975)
.sat(0.1)
.b(0.01)
.hue(0.1);
})
.Rule(0.09, function() {
})
.Rule(0.005, function() {
});
new AncientMap().render(opts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment