0.1.8 • Published 3 years ago

sinix v0.1.8

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

Sinix

Build games for Sinix with Joystick support

Installation and Setup

$ npm install sinix --save

Add script in package.json

"scripts": {
  "sinix": "sinix",
}

Initialize a Sinix project

$ npm run sinix init

This will create sinix.config.js in the current directory. By default, sinix packages the content of dist/ directory, update the distDir value in sinix.config.js as per your project.

Communication Interface

You can use remote to listen for events happening on Joysticks

import { remote } from "sinix"

remote.listen("STICK1", (payload) => {
  console.log(payload)
  
  /*
  {
    "user": "nickname",
    "x": 35.09090909090909,
    "y": -48.36363636363637}
  }
  */
})

remote.listen("BUTTON", (payload) => {
  console.log(payload) // { "user": "nickname", "val": "A" }
  
  if(payload.val === "A"){
    // do something
  } else if(payload.val === "B"){
    // do something
  }
})

Build and Publish

Generates app.dext file in release folder, which you can open in Sinix or publish on Sinix.

$ npm run sinix build

It is also possible to publish directly from the command-line using following command.

$ npm run sinix publish

will prompt for token and password which can be retrieved from the account created on sinix.dev. The application will go live in under 24 hours on Sinix Store.

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

1.0.0

4 years ago