Skip to content

Releases: forio/epicenter-js-libs

More cometd notifications

10 Jun 19:57
Compare
Choose a tag to compare

Features:

  • The World Service now has a load method, similar to the Run and Data services.
  • We now have a 'presence channel' to get online/offline notifications for multiplayer worlds. Usage:
var presenceChannel = cm.getPresenceChannel(worldObject);
presenceChannel.on('presence', function (evt, notification) {
    console.log(notification); //Notification will be an object with { userId: StringID, online: Boolean }
});

This is currently implemented all client-side, and data will be correct to within 24 seconds. An upcoming epicenter update will make this happen much faster.

  • You can now subscribe to Data API updates through the cometd channel. Usage:
var datachannel = cm.getDataChannel(collectionName);
datachannel.subscribe('', function (data, meta) {
    //data is the actual content added, meta  is of the form {path: nestedPathOfContentAdded, subType: 'new/update/delete', date: date}
date
}

You can only subscribe to top-level items (i.e. collections) currently, so the first parameter to subscribe should always be blank.

Bugs:

  • RunManager: Fixed a bug with invalid session-cookie-names with the Persistent Single Player strategy

Bug fixes

15 May 18:54
Compare
Choose a tag to compare

Bug Fixes:

  • Strategy creation was broken in the last release due to an invalid cookie name. If you use 1.4.1 you'd have always gotten a new run.
  • Login component now properly re-enables the login button on invalid logins
  • Fixed issue in assignment component where UI broke if the user didn't have a last name
  • Fix bug in newRunForWorld in the World Service

Misc. Bug fixes

16 Apr 00:12
Compare
Choose a tag to compare

Features:

  • Added load to F.Service.World. This works like the load on other services; use when you have a world id and want to construct a World Object with that
  • This release adds a components folder to the distribution. The only production-ready component is the login component, but more components will be added later - components are meant to be "plug and play" applications using the libraries to solve common use-cases.

Bug Fixes:

  • Fixed issue where group wasn't being sent as a scope to the Run Service by some strategies
  • World Service now takes in account and project from the url if not provided explicitly on instatiation
  • The ChannelManager has now been updated with better jsdocs

v1.4.0

19 Mar 16:16
Compare
Choose a tag to compare

Features:

  • Added Member (F.service.Member) and State (F.service.State) services. This is mostly for internal use by other services, but use 'em if you need 'em.
  • WorldManager now allows deleting/ resetting the run associated with the World
  • If you've been using the AuthManager on localhost you might've noticed issues with cookies. There's no good way to handle cookies with localhost so the recommened way to develop is to change your vhosts to point localhost to local.forio.com and use that instead. If you do this, all requests will now automatically be routed to api.forio.com without having to specify it under the server tag.
  • Slightly better validation and error messages for the World service and the WorldManager.

Bug fixes:

  • Sourcemaps should now work as they should, and are also bundled separately from source-files. Thanks to conversion from browserify2->browserify + uglify.
  • The AuthManager was not passing an authorization header to the Member API. Epicenter tightened permissions, so this broke. If you've been having login issues this is the version to use.
  • The game REST Endpoint is now called world. This change should not impact any simulations using the libraries, except that runs created with older games, will no longer show up through the libraries.

World API & Multiplayer support

05 Feb 20:33
Compare
Choose a tag to compare

A run is a collection of end user interactions with a project and its model -- including setting variables, making decisions, and calling operations. For building multiplayer games you typically want multiple end users to share the same set of interactions, and work within a common state. Epicenter allows you to create "worlds" to handle such cases.

The World API Adapter allows you to create, access, and manipulate multiplayer worlds within your Epicenter project. You can use this to add and remove end users from the world, and to create, access, and remove their runs. See http://forio.com/epicenter/docs/public/api_adapters/generated/world-api-adapter/ for additional background and documentation of methods and configuration options.

The World Manager provides an easy way to track and access the current world and run for particular end users. See http://forio.com/epicenter/docs/public/api_adapters/generated/world-manager/ for additional background and documentation of methods and configuration options.

Authentication

31 Jan 01:30
Compare
Choose a tag to compare

This release provides support for managing user authentication, especially for end users of authenticated Epicenter projects.

Authentication API Service

The Authentication API Service provides methods for logging in and logging out. On login, this service creates and returns a user access token. (User access tokens are required for each call to Epicenter.) Details available here: http://forio.com/epicenter/docs/public/api_adapters/generated/auth-api-service/

Authorization Manager

The Authorization Manager provides an easy way to manage user authentication (logging in and out) and authorization (keeping track of tokens, sessions, and groups) for projects. Details available here: http://forio.com/epicenter/docs/public/api_adapters/generated/auth-manager/

Login Component

In addition to the epicenter.js library itself, the Epicenter JS Libs project now includes reusable components. These HTML, CSS, and JS files are templates you can use to perform common actions. They can be copied directly to your Epicenter project, often without modification.

The Login Component provides a login form for team members and end users of your project. Includes a group selector for end users that are members of multiple groups.

Details are available in GitHub: https://github.com/forio/epicenter-js-libs/tree/master/src/components/ and also in the Epicenter documentation: http://forio.com/epicenter/docs/public/api_adapters/#components

Run Manager bug fixes

17 Oct 17:47
Compare
Choose a tag to compare

Bug fixes for the Run Manager

v1.1.0

29 Sep 23:42
Compare
Choose a tag to compare
v1.1.0 Pre-release
Pre-release

Epicenter.js now includes the Run Manager and the Scenario Manager

Documentation & Tests pending. Will be upgraded from "pre-release" after that.

Transport options bug fix release

23 Sep 06:07
Compare
Choose a tag to compare
  • Build process generates epicenter.js (un-minified concatenated file) in addition to epicenter.min.js
  • Fixed bug where transport option for complete was not being passed through on Run API Service
  • You can now set default transport options for Run Service and over-ride on a per-call level. For e.g.,
var originalComplete = sinon.spy();
var complete = sinon.spy();
var rs = new RunService({account: 'forio', project: 'js-libs', transport: {complete: originalComplete}});
rs.create('model.jl', {complete: complete});

originalComplete.should.not.have.been.called;
complete.should.have.been.called;

Cookie changes

10 Sep 06:26
Compare
Choose a tag to compare

Changed the default token to epicenter.project.token from epicenter.token. This is to prevent conflicts for users who're logged into Epicenter through the manager. Use cases:

User logged into Epicenter, but not into project:

  • epicenter.token is set by Manager and passed along to all the APIs

    User logged into Epicenter, and also into project:

  • epicenter.project.token is also sent as an Authorization header, which overrides epicenter.token. In other words, project privileges override default epicenter privileges

    User not logged into Epicenter, but logged into project:

  • Authorization header is sent and respected