Coder Social home page Coder Social logo

geck1942 / horoscopedrawer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slissner/horoscopedrawer

0.0 1.0 0.0 7.78 MB

JavaScript-Library to draw celestial charts in SVG-Format.

Home Page: http://www.slissner.de

License: MIT License

HTML 7.20% JavaScript 87.62% CSS 5.17%

horoscopedrawer's Introduction

This repository is not actively maintained.

Horoscope Drawer

HoroscopeDrawer.js lets you draw zodiac charts in SVG-Format.

Horoscope Chart

Getting Started (Example)

Draw a randomized horoscope:

const h = new zastro.Horoscope();
const drawn = h.draw("#horoscope");
console.log("Hurray! You have drawn your horoscope.", drawn);

Draw a horoscope with parameters:

const properties = {
  zodiac: {
    ascendant: {
      sign: 3,      // Sets ascendant by sign. See src/zodiac.js.
      degree: 15    // Sets degree offset for ascendant sign.
    }
  },
  planets: {        // Sets degree of planets.
    sun: 65,
    mercury: 12,
    venus: 151.31,
    mars: 231,
    moon: 188,
    jupiter: 311,
    saturn: 100,
    uranus: 199,
    neptune: 278,
    pluto: 31
  },
  houses: {
    hasHouses: true,
    axes: {
      axis2to8: 27,   // Sets degree of axis.
      axis3to9: 56,
      axis4to10: 81,
      axis5to11: 114,
      axis6to12: 156
    }
  }
};
const h = new zastro.Horoscope(properties);
const drawn = h.draw("#horoscope");
console.log("Hurray! You have drawn your horoscope.", drawn);

Target selector shall be a svg-container in parent-html file:

<svg id="horoscope"></svg>

You can customize horoscope styles like in /example/horoscope.css.

Build

Build the example page with:

gulp example-build

note: You may need to manually create an empty /dist folder before running the build command.

Outputs the source code files in the /example folder.

Library

Build the library files with:

gulp build

Output will be placed in /dist folder.

Features

  • Zodiac
  • Planets
  • Houses

Planned

  • Aspects (1.1.0)
  • Transits (1.2.0)

Built with

  • Browserify
  • Gulp
  • SnapSVG

License

MIT, (c) Samuel Lissner, 2017

horoscopedrawer's People

Watchers

James Cloos avatar

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.