Skip to content

Design Changes #1

@RobLoach

Description

@RobLoach

What are your thoughts on...

  • Make each module module export libraries and properties, which are aggregated all together in index.js. The result would move all modules to the root so that referencing them would be easy:

    var sdl = require('node-sdl2');
    if (sdl.SDL_Init(sdl.SDL_INIT_VIDEO) != 0) {
      console.log('SDL_Init Error: ' + sdl.SDL_GetError());
      process.exit(1);
    }
    • libraries would be an associative array of the path of the library to load, along with all of the function definitions
    • properties would be an associative array that's merged in after libraries have been loaded

    This would make it really easy to port existing C code over to JavaScript.

  • Refactor the library loading to discover the library path (it's just "libSDL2" on Linux)

  • Remove the binaries from this package

  • Move to some of ES2015?

  • Move SDL_Image to its own package: https://github.com/robloach/node-sdl2-image

  • Implement additional packages:

Took this on in #2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions