1.0.21 • Published 5 years ago

mp_geometry v1.0.21

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
5 years ago

mp_geometry -Palette widget (https://bitbucket.org/jmchey/mp_geometry#readme)

##Introduction

I developed this small librairy to get to know TypeScript / NodeJS / NPM... I wanted at that time to make a small real time game in node JS and I wanted to see if I would be able to code the graphic interface myself.

Here is "MP_Geometry" a small librairy that allow you to display animate and control simple shapes on an HTML canvas

Table of contents

Install with npm

Run command

npm install mp_geometry

Usage

###Init

	<!-- widget holder -->
	<div id="sample"></div>
	$("#sample").Palette(<options>);

###Options See below a list of available options (01/03/2019). Tired of reading ? Have a look on the examples below.

layers
Description : List of the layers. Each layer can display and animate shapes.
Type : array of LayerUI
Optional
Properties

toolbox
Description : Boolean that indicate if the toolbox is displayed. The toolbox allow you to interact with the "palette" widget. Render, erase, animate layers...
Type : boolean
Optional (default : false )

###Methods
How to call methods on the JQuery widget ?

$("#sample").Palette(<method>,<options>)

Get Layers getLayers()
Description : This method return an Array of LayerUI objects. You can specify the Layer IDs you want to get by passing them as parameters.
options :

Example

	$("#sample").Palette("getLayers")
	// Or specify IDs
	$("#sample").Palette("getLayers", ["MyLayerID1", "MyLayerID2" ])

Set Layers setLayers()

Tests

npm install
npm test

Dependencies

##Fork Me

###Compile typescript Run command

	tsc
1.0.21

5 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago