Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for magic-free plugin loading #5

Closed
deathcap opened this issue Jan 13, 2016 · 1 comment
Closed

Update for magic-free plugin loading #5

deathcap opened this issue Jan 13, 2016 · 1 comment

Comments

@deathcap
Copy link
Member

Currently voxel-example uses the implicit require() calls for browserify and passes the module's own require function:

var createEngine = require('voxel-engine-stackgl')

require('./lib/blocks.js')
require('./lib/terrain.js')

var main = function() {
  createEngine({require: require, exposeGlobal: true, pluginOpts: {
    'game-shell-fps-camera': {position: [-4, -40, -5], rotationX:15*Math.PI/180, rotationY:135*Math.PI/180 },

    './lib/blocks.js': {},
    './lib/terrain.js': {}
  }})
};

module.exports = main

This still works but voxel-plugins 0.5.0+ gained a more straightforward loading mechanism voxel/voxel-plugins#8 where the plugin constructors are passed in a loaders object instead of through a require function; voxel-example should update to use it.

@deathcap
Copy link
Member Author

Updated to use pluginLoaders in 9d27550

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant