Code Monkey home page Code Monkey logo

node-flash's Introduction

Flash

Library which runs .swf Flash files natively in Node.js. Inspired by Scaleform (embedded hardware-accelerated vector rending engine). Currently only supports SDL.

WIP

I'm not sure what I want to do with this. I just felt like laying it out.
Warning: Not entirely working, especially on Mac OS X (issues with Cocoa/SDL). Doesn't spawn the rendering window most of the time. Need to fix it up.

Install

  1. Download and install OpenGL (included in Xcode on Mac OS X).

  2. Download and install SDL into your compiler's global library directory (/usr/lib) - required for linking.
    On Mac OS X using Homebrew:
    brew install sdl brew install jpeg

  3. Clone the repository.

  4. Go to the directory with flash library.

  5. Execute node-waf configure build.

  6. Get module from ./build/default/flash.node.

From the repository directory, you can use var flash = require("build/default/flash");

You can then run npm install . and use var flash = require("flash"); from any path.

Status

Compiled on Mac. Still converting the gameswf library. Currently stuck at spawning an OpenGL window. Trying on Linux.

API

Functions

flash.start(filename) - Starts the interpreter.
flash.run() - Moves the interpreter forward. Must be looped, with for instance setTimeout.
flash.stop() - Stops the interpreter.

Classes

flash.window()

Usage

Please see the example in test/window.js

var flash = require('flash');
var window = new flash.window();

Contribute

Generate .cpp list with: find . -name \*.cpp -print
Remove files:

./lib/base/Stackwalker.cpp
./lib/base/test_ogl.cpp
./lib/gameswf/gameswf_render_handler_d3d.cpp
./lib/gameswf/gameswf_render_handler_xbox.cpp
./lib/gameswf/gameswf_render_handler_ogles.cpp
./lib/gameswf/gameswf_sound_handler_openal.cpp
./lib/gameswf/gameswf_parser.cpp
./lib/gameswf/gameswf_processor.cpp
./lib/gameswf/gameswf_test_ogl.cpp

TODO

  • Fix window bug (on Mac OS X).
  • Check cross-compatibility.
  • Clean up dependencies.

Credit

gameswf by Thatcher Ulrich
libjpeg by Independent JPEG Group
node-flash is public domain

node-flash's People

Contributors

highruned avatar

Stargazers

[DEPRECATED] avatar Arn avatar trarck avatar Sun Pengju avatar Satoshi Watanabe avatar justinTNT avatar  avatar  avatar

Watchers

Arn avatar

node-flash's Issues

Hi

I an curious if you made some work on the version of gameswf you have here? Does it support AS3 ? What is the highest FP version support?
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.