This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs"); | |
| const utils = require("./utils"); | |
| const settings = require("./settings"); | |
| const [...fibonacciNumbers] = utils.fibonacci(30); | |
| const phi = (1 + Math.sqrt(5)) / 2; | |
| let frame = 0; | |
| const height = settings.canvas.height * 25.4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The code in this gist allows for just in time execution of Lu components. | |
| * JITE will be a fall-back in browsers that don't support MutationObservation | |
| * or MutationEvents or when a processor has not executed a component yet. | |
| */ | |
| function gatherDeferrals(components) { | |
| var deferrals = []; | |
| _.each(components, function (component) { | |
| if (component.status !== 'ready') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ( function(){ | |
| this.$mapped = $( [] ); | |
| this.Map = Fiber.extend( function(){ | |
| var Observer, | |
| Maps = [], | |
| observationSettings = { | |
| childList: true, | |
| subtree: true, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @class Model | |
| */ | |
| var Model = Fiber.extend( function(){ | |
| 'use strict'; | |
| var defaults = { | |
| //The primary key to use in the models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This maps the 'body' to a Lu component. you can also write a pattern like | |
| $('[data-lu~=KeyManager]'). Abstract is our EventProvider - it is modeled | |
| after and proxies jQuery events. | |
| */ | |
| Map.add( $( 'body' ), 'Abstract', function( $body ){ | |
| //A few things are available in this scope | |
| //The settings that will be used |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul id="accordian" data-lu="List"> | |
| <li id="one" data-lu="Container" class="lu-state-selected"> | |
| <h2><a href="#one" data-lu="Button:Select">One</a></h2> | |
| <div class="content"> | |
| Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
| tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
| quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
| consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | |
| cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | |
| proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form data-lu="Form"> | |
| <div id="Bar" data-lu="Container" class="lu-state-edit"> | |
| <!-- Hit Enter to stop editing --> | |
| <input class="Editor" type="text" value="FOO" name="Bar"/> | |
| <!-- Click the link to edit --> | |
| <h1><a href="#regressive-url" data-lu="Button:State:Edit">Foo</h1> | |
| </div> | |
| </form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <button data-lu="Button:Switch" data-lu-config="{ | |
| 'Button:Switch': { | |
| states: '['a b', 'a c', 'a', 'b', 'c']' | |
| } | |
| }" type="button">AB/AC/A/B/C</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <button data-lu="Button:Switch" data-lu-config="{ | |
| 'Button:Switch': { | |
| states: 'a b' | |
| } | |
| }" type="button">AB</button> |
NewerOlder