npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sportjs

v0.1.4

Published

JS Library to design graphically training sessions

Downloads

3

Readme

Sport JS

JS Library to design graphically training exercices

This library is in beta. Don't use it for production environment !

What is it ?

Sport JS facilitate the design of spatial situations, for sport purpose. It integrates 3 sports for the moment :

  • football
  • handball
  • 'foot en salle'

You can place 'players' on a field, and move them step by step.

You can export the 'steps' and then store it somewhere, or not :-)

Dependencies

It uses the RaphaelJS library. Please import this library before using Sport JS.

Demo

Go to opentrainer, an open source project (it's in beta, so sources are coming really soon) which aim is to make better training sessions for sport's team, and trainer !

Or, clone the repo !

  • you must have gulp and bower installed... or not :

    npm install bower gulp -g

  • then, clone the repo

    git clone https://github.com/mdartic/sportjs

    bower install

  • then, open the file 'demo/demo.html' with your favorite browser

How you can make it works ?

The beginning

Inspire you from the demo !

First, you have to create a div element with an id. Let's say the id is 'canvas'.

Then, write some lines of JavaScript :

var workspace = new W()

workspace.initialise("canvas", "100%", "100%", "handball")

Great ! You just instantiate the div with a new handball fieldset, and 14 players !

You can add some controls on the workspace with just a few more lines :

var previous = function() {
	workspace.previousStep()
},
next = function() {
	workspace.nextStep()
},
add = function() {
	workspace.addStep()
},
del = function() {
	workspace.deleteCurrentStep()
},
play = function() {
	workspace.play()
}

Second chapter (wip)

SportJS is composed of two main objects :

  • Sports
  • Workspace

Sports

This object contain the definition of the available sports : handball, football, and 'foot-en-salle' (in French).

Workspace

This object allow you to build a graphical zone, thanks to RaphaelJS, to represent a fieldset, players and a ball.

Then you can record 'steps', thanks to the different methods :

Workspace.initialise()
Workspace.previousStep()
Workspace.nextStep()
Workspace.addStep()
Workspace.deleteCurrentStep()
Workspace.play()
Workspace.updateFieldSet()
Workspace.exportData()
Workspace.importData()
... to be completed & explain

Support

Author : Mathieu Dartigues Twitter: @mdartic

Please file issues here at Github

This software is licensed under the MPL-2.0 licence