New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

voxel-touchcontrols

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

voxel-touchcontrols

touch controls for voxel engine

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

voxel-touchcontrols

touch controls for Voxel Engine

a basic navigation pad is used for movement, with dragging on the main area to look in different directions

install

step 1:

npm install voxel-touchcontrols

step 2:

include some html in your page that looks like this (you probably want images or at least more appropriate characters):

<nav class="touch-control left" id="touchcontrols">
  <ul>
    <li>FL</li>
    <li>F</li>
    <li>FR</li>
    <li>L</li>
    <li>J</li>
    <li>R</li>
    <li class="last">B</li>
  </ul>
</nav>

You probably want to include some CSS to arrange them and position them decently:

.touch-control {
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}
.touch-control {z-index:10; position:absolute; bottom:10px; left:10px;}
.touch-control ul {margin:0; padding:0; width:150px; height:150px;}
.touch-control li {width:50px; height:50px; float:left; list-style: none; background: rgba(255,255,255,0.4); text-align:center; vertical-align: middle;}
.touch-control li.last {margin-left:50px;}

step 3:

var touchcontrols = require('voxel-touchcontrols')
touchcontrols(document.getElementById('touchcontrols'), game.controls, container)

use browserify to package voxel-touchcontrols for use in your client side app!

license

BSD

FAQs

Package last updated on 17 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc