🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

voxel-fly-cc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

voxel-fly-cc

fly around in voxel.js games

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

voxel-fly

minecraft(TM) style double-tap jump button to go into fly mode, then use jump/crouch buttons to adjust altitude, and land if you hit the ground

install

npm install voxel-fly

example

var fly = require('voxel-fly')
var makeFly = fly(game)
makeFly(physicalObject)
// physicalObject is most likely going to be your [voxel-player](https://github.com/substack/voxel-player)
// e.g.:
makeFly(game.controls.target())

API

fly = require('fly')

require the module

var makeFly = fly(gameInstance)

Give it your game instance and it will return a function that you can use to make any physical object fly

var fly = makeFly(physicalObject, bindKeyEventsAutomatically)

physicalObject is most likely going to be your voxel-player

bindKeyEventsAutomatically is true by default, set it to false to bypass the double-tap keyboard bindings

fly.bindKeyEvents(el)

If you chose not to bind key events at first you can bind them later to a specific element with this method

License

BSD

FAQs

Package last updated on 09 Jan 2017

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