Giter Club home page Giter Club logo

sectors-generator's Introduction

Sectors generator

A simple plugin created for people who want to generate an interactive map of sectors.

Wersja polska: tutaj

Download

sectors.js

Sector object

name String (required)
corners [{ x: Number, y: Number }, { x: Number, y: Number }] (required)
color HEX/RGB (required)
tps Number (optional)
online Number (optional)
text { offsetX: Number, offsetY: Number } (optional)

Example

{
    name: "S1",
    corners: [{ x: -1500, y: -1500 }, { x: -225, y: 150 }],
    color: 'rgba(0, 0, 0, 0.75)',
    tps: 19.98,
    online: 152,
    text: {
        offsetX: -19,
        offsetY: 4
    }
}

Configuration

canvasID String (required)
mapBorder Number (required)
highlightColor HEX/RGB (required)
tps Number (optional)
online Number (optional)
text { offsetX: Number, offsetY: Number } (optional)

Example

{
    canvasID: "sectors",
    mapBorder: 3000,
    highlightColor: 'rgba(255, 255, 255, 0.25)',
}

Initialization

initSectors(sectors, callback, config);

sectors - list with sectors objects
callback - callback function with event, sector and coordinates
config - configuration

Live example

Here you can test how plugin works. https://oski646.github.io/sectors-generator/

sectors-generator's People

Contributors

oski646 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.