Giter Site home page Giter Site logo

modularscale-js's Introduction

Running locally

Modular Scale is a static site built with Middleman. Bundler and Ruby are required for the following installation. If you are using a Mac, you already have Ruby installed.

  1. Clone the repo
  2. In the terminal, cd into the directory
  3. Run bundle install in terminal
  4. Run bundle exec middleman in terminal
  5. Visit localhost:4567

From now on, you can skip #1 and #3.

To build the app, run bundle exec middleman build and it will generate a build directory.

Conduct

We strive to create a welcoming place here for collaboration, ideas, and support. We can’t build the community we want without your help and understanding. In an effort to ensure this is a safe place for the community, we will not hesitate to remove comments that go against the guidelines and block people who are repeat offenders of the guidelines.

  1. Be nice
  • Do not trash talk anyone for ideas, concepts, or things they use.
  • Do not trash talk anyone for personal beliefs, race, background, gender, or any other personal aspect of their lives.
  • Do not trash talk anyone, period.
  • Do not rip on this project, this project’s dependencies, or any other project. You may not like something, but there are methods of critique that don’t involve devaluing people’s work.
  1. This project is built and maintained in free time. Be considerate that this is a labor of love. While we gladly accept feedback and feature requests, please understand the following:
  • A timeline for fixes and features will be at the maintainers’ discretion.
  • Priority of fixes and features will be at the maintainers’ discretion.
  • Scope for new features is at the maintainers’ discretion.

The guidelines are interpreted and enforced by @scottkellum and @tbrown. It is under our sole discretion to make decisions regarding enforcement of this code.

License

Copyright © 2016, Tim Brown and Scott Kellum All rights reserved.

BSD license

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

modularscale-js's People

Contributors

colbin8r avatar nickmccurdy avatar scottkellum avatar undistraction avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modularscale-js's Issues

Double check the output is a single value

Maybe I changed this while working on the website to output multiple values, but this should output a single value. I think I did leave on what strand a value came from and should probably clip that off.

Standardise ratio names

It would be awesome if names, casings and even the order of the ratios would match across these two modules.

Ratios copied from the JavaScript module:

var minorSecond   = 16/15;
var majorSecond   = 1.125;
var minorThird    = 1.2;
var majorThird    = 1.25;
var perfectFourth = 4/3;
var augFourth     = 1.414;
var perfectFifth  = 1.5;
var minorSixth    = 1.6;
var goldenSection = 1.61803398875;
var majorSixth    = 5/3;
var minorSeventh  = 16/9;
var majorSeventh  = 1.875;
var octave        = 2;
var majorTenth    = 2.5;
var majorEleventh = 8/3;
var majorTwelfth  = 3;
var doubleOctave  = 4;

Ratios copied from the Sass module:

$double-octave    : 4                 ;
$pi               : 3.14159265359     ;
$major-twelfth    : 3                 ;
$major-eleventh   : 2.666666667       ;
$major-tenth      : 2.5               ;
$octave           : 2                 ;
$major-seventh    : 1.875             ;
$minor-seventh    : 1.777777778       ;
$major-sixth      : 1.666666667       ;
$phi              : 1.618034          ;
$golden           : $phi              ;
$minor-sixth      : 1.6               ;
$fifth            : 1.5               ;
$augmented-fourth : 1.41421           ;
$fourth           : 1.333333333       ;
$major-third      : 1.25              ;
$minor-third      : 1.2               ;
$major-second     : 1.125             ;
$minor-second     : 1.066666667       ;

Filter unique base

I’ve been experimenting a bit with version 3.0 and when I use the following input values the same output gets returned for different scale numbers:

var settings = {
  base: [1, 2.25],
  ratio: 1.5,
}

Scale it produces:

16: 25.62890625
15: 17.0859375
14: 17.0859375
13: 11.390625
12: 11.390625
11: 7.59375
10: 7.59375
9: 5.0625
8: 5.0625
7: 3.375
6: 3.375
5: 2.25
4: 2.25
3: 1.5
2: 1.5
1: 1
0: 1
-1: 0.66666666666667
-2: 0.66666666666667
-3: 0.44444444444444
-4: 0.44444444444444
-5: 0.2962962962963
-6: 0.2962962962963

I think the normalized base variable should be filtered on unique values so the following scale would be returned:

16: 656.84083557129
15: 437.89389038086
14: 291.92926025391
13: 194.61950683594
12: 129.74633789062
11: 86.49755859375
10: 57.6650390625
9: 38.443359375
8: 25.62890625
7: 17.0859375
6: 11.390625
5: 7.59375
4: 5.0625
3: 3.375
2: 2.25
1: 1.5
0: 1
-1: 0.66666666666667
-2: 0.44444444444444
-3: 0.2962962962963
-4: 0.19753086419753
-5: 0.13168724279835
-6: 0.087791495198903

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.