Plugins Autolevels Html5 Need Help...

  • Hello there, i would like to use the "Autolevels" plugins created by Aldo from (Field Of view)... it's work well but only with Flash... but i need it for HTML5. I've PM Aldo and send a mail but no answer, i think he have lots of work... this plugins is 2010...but it's look so interesting to have a good immersion. (Sorry for my english, i'm french...)

    I've found the source of the action script... (it's free) :

    https://github.com/fieldOfView/krpano_fovplugins/tree/master/autolevels/source/

    And i've found an ASC3 (action script) translator to JS (Javascript) there:

    https://as3js.org/demo/


    Then ASC3: autolevels.as

    Is Now in JS:


    And ASC3 : krpano_as3_interface.as

    Is now in JS:

    Code
    (function() {  var Program = {};  Program["krpano_as3_interface"] = function(module, exports) {    var krpano_as3_interface;    module.inject = function() {      krpano_as3_interface = module.import('', 'krpano_as3_interface');    };
        var krpano_as3_interface = function() {      this.$init();    };
        krpano_as3_interface.instance = null;    krpano_as3_interface.getInstance = function() {      if (krpano_as3_interface.instance == null) {        krpano_as3_interface.instance = new krpano_as3_interface();      }
          return krpano_as3_interface.instance;    };    krpano_as3_interface.STARTDEBUGMODE = null;    krpano_as3_interface.DEBUG = null;    krpano_as3_interface.INFO = null;    krpano_as3_interface.WARNING = null;    krpano_as3_interface.ERROR = null;    krpano_as3_interface.PLUGINEVENT_REGISTER = null;    krpano_as3_interface.PLUGINEVENT_RESIZE = null;    krpano_as3_interface.PLUGINEVENT_UPDATE = null;
        krpano_as3_interface.$cinit = function() {      krpano_as3_interface.instance = null;      krpano_as3_interface.STARTDEBUGMODE = 0xFF;      krpano_as3_interface.DEBUG = 0;      krpano_as3_interface.INFO = 1;      krpano_as3_interface.WARNING = 2;      krpano_as3_interface.ERROR = 3;      krpano_as3_interface.PLUGINEVENT_REGISTER = "krpano.registerplugin";      krpano_as3_interface.PLUGINEVENT_RESIZE = "krpano.resizeplugin";      krpano_as3_interface.PLUGINEVENT_UPDATE = "krpano.updateplugin";
        };
        krpano_as3_interface.prototype.$init = function() {      this.set = null;      this.get = null;      this.call = null;      this.trace = null;      this.addPluginEventListener = null;      this.removePluginEventListener = null;    };    krpano_as3_interface.prototype.set = null;    krpano_as3_interface.prototype.get = null;    krpano_as3_interface.prototype.call = null;    krpano_as3_interface.prototype.trace = null;    krpano_as3_interface.prototype.addPluginEventListener = null;    krpano_as3_interface.prototype.removePluginEventListener = null
        module.exports = krpano_as3_interface;  };  if (typeof module !== 'undefined') {    module.exports = AS3JS.load({      program: Program,      entry: "",      entryMode: ""    });  } else if (typeof window !== 'undefined' && typeof AS3JS !== 'undefined') {    window[''] = AS3JS.load({      program: Program,      entry: "",      entryMode: ""    });  }})();


    I've write all the JS on a new file named "Autolevels.js" but it not work... i now the code is not easy like copy past but anyone want to help me ?

    regards all

  • And i've found an ASC3 (action script) translator to JS (Javascript) there:


    Sorry, it doesn't work that way *wink*
    Actionscript 3 and Javascript are only the programming languages, but the Flashplayer and Browsers APIs are completely different - and so also how to do things.

    A autolevels plugin for html5 would need to that (roughly):

    1. capture the webgl canvas content in a buffer
    2. analyze the pixel values (optionally with a down-scaling or pixel-skipping for performance reasons)
    3. use a webgl postprocessing shader for the resulting color correction


    Best regards,
    Klaus

  • hum !
    Glad to hear you Klaus, but i'm not a programmer *whistling*   :( and if i'm trying to translate Swf to Js is because i don't know how to built this one... :(  
    Anyone can help ? *confused* *cry*

    maybe another plugins or script do this feature ?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!