Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

colyseus.js

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colyseus.js - npm Package Compare versions

Comparing version 0.4.2 to 0.4.4

.travis.yml

1

examples/rooms/battle_room.js

@@ -7,2 +7,3 @@ var Room = require('colyseus').Room

super(options)
this.setState({})
console.log("BattleRoom created!", options)

@@ -9,0 +10,0 @@ }

3

examples/rooms/chat_room.js

@@ -10,3 +10,3 @@ var Room = require('colyseus').Room

this.setPatchRate( 1000 )
this.setPatchRate(1000 / 192);

@@ -27,2 +27,3 @@ this.setState({ messages: [] })

onLeave (client) {
this.state.messages.push("Left!");
// console.log("ChatRoom:", client.id, "disconnected")

@@ -29,0 +30,0 @@ }

@@ -35,8 +35,8 @@ 'use strict';

function Colyseus(url) {
var protocols = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var protocols = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
_classCallCheck(this, Colyseus);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Colyseus).call(this, url, protocols, options));
var _this = _possibleConstructorReturn(this, (Colyseus.__proto__ || Object.getPrototypeOf(Colyseus)).call(this, url, protocols, options));

@@ -75,3 +75,3 @@ _this.binaryType = "arraybuffer";

return _get(Object.getPrototypeOf(Colyseus.prototype), 'send', this).call(this, _msgpackLite2.default.encode(data));
return _get(Colyseus.prototype.__proto__ || Object.getPrototypeOf(Colyseus.prototype), 'send', this).call(this, _msgpackLite2.default.encode(data));
} else {

@@ -78,0 +78,0 @@

@@ -30,3 +30,3 @@ 'use strict';

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Room).call(this));
var _this = _possibleConstructorReturn(this, (Room.__proto__ || Object.getPrototypeOf(Room)).call(this));

@@ -93,4 +93,3 @@ _this.id = null;

jsonpatch.apply(this.state, patches);
this.state = newState;
this.emit('update', this.state, patches);

@@ -97,0 +96,0 @@ }

{
"name": "colyseus.js",
"version": "0.4.2",
"version": "0.4.4",
"description": "JavaScript client for Colyseus Multiplayer Game Server",

@@ -23,3 +23,4 @@ "keywords": [

"watch": "babel src -d lib -w",
"prepublish": "babel src -d lib"
"prepublish": "babel src -d lib",
"test": "mocha test/"
},

@@ -31,3 +32,3 @@ "engines": {

"clock.js": "^1.1.0",
"fast-json-patch": "^0.5.4",
"fast-json-patch": "^1.0.0",
"fossil-delta": "^0.2.5",

@@ -40,10 +41,12 @@ "msgpack-lite": "^0.1.20",

"babel-preset-es2015": "^6.1.2",
"babelify": "^7.2.0",
"browserify": "^12.0.1",
"babelify": "^7.2.0",
"uglify-js": "^2.6.1",
"chai": "^3.5.0",
"colyseus": "^0.4.0",
"express": "^4.13.3",
"mocha": "^3.1.0",
"nodemon": "^1.7.1",
"uglify-js": "^2.6.1",
"watchify": "^3.6.1"
}
}

@@ -1,5 +0,9 @@

# colyseus.js for the browser [![Join the chat at https://gitter.im/gamestdio/colyseus](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gamestdio/colyseus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
colyseus.js for the browser
===
[![Join the chat at https://gitter.im/gamestdio/colyseus](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gamestdio/colyseus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://secure.travis-ci.org/gamestdio/colyseus.js.png?branch=master)](http://travis-ci.org/gamestdio/colyseus.js)
JavaScript client for [colyseus](https://github.com/gamestdio/colyseus) - a
Minimalistic MMO Game Server for Node.js.
Minimalist Multiplayer Game Server for Node.js.

@@ -6,0 +10,0 @@ ## Usage

@@ -69,4 +69,3 @@ var EventEmitter = require('events').EventEmitter

jsonpatch.apply(this.state, patches)
this.state = newState;
this.emit('update', this.state, patches)

@@ -73,0 +72,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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