<commit_before>/**
 * T'MediaArt library for JavaScript
 *  - MajVj extension - frame plugin - wired -
 * @param options options (See MajVj.prototype.create)
 */
MajVj.effect.rgb = function (options) {
    this._screen = options.screen;
    this._width = options.width;
    this._height = options.height;
    this._aspect = options.aspect;
    this._controller = options.controller;
    this._program = this._screen.createProgram(
            this._screen.compileShader(Tma3DScreen.VERTEX_SHADER,
                    MajVj.effect.rgb._vertexShader),
            this._screen.compileShader(Tma3DScreen.FRAGMENT_SHADER,
                    MajVj.effect.rgb._fragmentShader));
    this._coords = this._screen.createBuffer([0, 0, 0, 1, 1, 1, 1, 0]);
};

// Shader programs.
MajVj.effect.rgb._vertexShader = null;
MajVj.effect.rgb._fragmentShader = null;

/**
 * Loads resources asynchronously.
 */
MajVj.effect.rgb.load = function () {
    return new Promise(function (resolve, reject) {
        Promise.all([
            MajVj.loadShader('effect', 'rgb', 'shaders.html', 'vertex'),
            MajVj.loadShader('effect', 'rgb', 'shaders.html', 'fragment'),
        ]).then(function (shaders) {
            MajVj.effect.rgb._vertexShader = shaders[0];
            MajVj.effect.rgb._fragmentShader = shaders[1];
            resolve();
        }, function () { reject('rgb.load fails'); });
    });
};

/**
 * Handles screen resize.
 * @param aspect screen aspect ratio
 */
MajVj.effect.rgb.prototype.onresize = function (aspect) {
};

/**
 * Draws a frame.
 * @param delta delta time from the last rendering
 * @param texture texture data
 */
MajVj.effect.rgb.prototype.draw = function (delta, texture) {
    var distance = 0.1;
    if (this._controller && this._controller.volume)<commit_msg>MajVj rgb effect: add options.distance<commit_after>/**
 * T'MediaArt library for JavaScript
 *  - MajVj extension - frame plugin - wired -
 * @param options options (See MajVj.prototype.create)
 */
MajVj.effect.rgb = function (options) {
    this._screen = options.screen;
    this._width = options.width;
    this._height = options.height;
    this._aspect = options.aspect;
    this._controller = options.controller;
    this._distance = options.distance || 0.1;
    this._program = this._screen.createProgram(
            this._screen.compileShader(Tma3DScreen.VERTEX_SHADER,
                    MajVj.effect.rgb._vertexShader),
            this._screen.compileShader(Tma3DScreen.FRAGMENT_SHADER,
                    MajVj.effect.rgb._fragmentShader));
    this._coords = this._screen.createBuffer([0, 0, 0, 1, 1, 1, 1, 0]);
};

// Shader programs.
MajVj.effect.rgb._vertexShader = null;
MajVj.effect.rgb._fragmentShader = null;

/**
 * Loads resources asynchronously.
 */
MajVj.effect.rgb.load = function () {
    return new Promise(function (resolve, reject) {
        Promise.all([
            MajVj.loadShader('effect', 'rgb', 'shaders.html', 'vertex'),
            MajVj.loadShader('effect', 'rgb', 'shaders.html', 'fragment'),
        ]).then(function (shaders) {
            MajVj.effect.rgb._vertexShader = shaders[0];
            MajVj.effect.rgb._fragmentShader = shaders[1];
            resolve();
        }, function () { reject('rgb.load fails'); });
    });
};

/**
 * Handles screen resize.
 * @param aspect screen aspect ratio
 */
MajVj.effect.rgb.prototype.onresize = function (aspect) {
};

/**
 * Draws a frame.
 * @param delta delta time from the last rendering
 * @param texture texture data
 */
MajVj.effect.rgb.prototype.draw = function (delta, texture) {
    var distance = this._distance;
    if (this._controller && this._controller.volume)
{'fraction_non_alphanumeric': 0.1391470749043193, 'fraction_numerical': 0.007654455986878075, 'mean_word_length': 2.9008528784648187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2940952', 'n_tokens_mistral': 1150, 'n_tokens_neox': 1135, 'n_words': 234}