<commit_before>﻿window.Rendxx = window.Rendxx || {};
window.Rendxx.Game = window.Rendxx.Game || {};
window.Rendxx.Game.Client = window.Rendxx.Game.Client || {};
window.Rendxx.Game.Client.Controller = window.Rendxx.Game.Client.Controller || {};

/*
 * Controller.Move
 * This is a control handler for mobile. 
 * User can move the handler in a circle or tap it.
 * Support only 1 touch point
 * 
 * 2 callback:
 * Output the offset from center in 2 format (x,y / degree,strength)
 * onMove: 
 * ({
 *      x: [int]            (0 - 100)
 *      y: [int]            (0 - 100)
 *      degree: [degree]    (-180 - 180, top is 0)
 *      strength: [int]     (0 - 100)
 * })
 * 
 * onTap()
 */

(function (Controller) {
    var HTML = {
        wrap: '<div class="controller-move"></div>',
        base: '<div class="_base"></div>',
        point: '<div class="_point"></div>',
    };

    var CssClass = {
        hover: '_hover'
    };

    var Env = {
        tapThreshold: 5,          // threshold of tapping the handler
        moveThreshold: 5          // any moving not pass this threshold will not be recognized
    };

    var Move = function (opts) {
        // private property ---------------------------------------------
        var that = this,
            // parameters
            _css = null,
            // html
            html_container = null,
            html_wrap = null,
            html_base = null,
            html_point = null,
            // data
            text = null,
            base_offset_x = null,
            base_offset_y = null,<commit_msg>Editing move controller<commit_after>﻿window.Rendxx = window.Rendxx || {};
window.Rendxx.Game = window.Rendxx.Game || {};
window.Rendxx.Game.Client = window.Rendxx.Game.Client || {};
window.Rendxx.Game.Client.Controller = window.Rendxx.Game.Client.Controller || {};

/*
 * Controller.Move
 * This is a control handler for mobile. 
 * User can move the handler in a circle or tap it.
 * Support only 1 touch point
 * 
 * 3 callback:
 * Output the offset from center in 2 format (x,y / degree,strength)
 * onMove: 
 * ({
 *      x: [int]            (0 - 100)
 *      y: [int]            (0 - 100)
 *      degree: [degree]    (-180 - 180, top is 0)
 * })
 * 
 * onTap()
 * onStop()
 */

(function (Controller) {
    var HTML = {
        wrap: '<div class="controller-move"></div>',
        base: '<div class="_base"></div>',
        point: '<div class="_point"></div>',
    };

    var Env = {
        tapThreshold: 5,          // threshold of tapping the handler
        moveThreshold: 5          // any moving not pass this threshold will not be recognized
    };

    var Move = function (opts) {
        // private property ---------------------------------------------
        var that = this,
            // parameters
            _css = null,
            // html
            html_container = null,
            html_wrap = null,
            html_base = null,
            html_point = null,
            // data
            text = null,
            base_offset_x = null,
            base_offset_y = null,
{'fraction_non_alphanumeric': 0.15751867489444624, 'fraction_numerical': 0.014290354011042547, 'mean_word_length': 1.6257459505541347, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '908986', 'n_tokens_mistral': 911, 'n_tokens_neox': 878, 'n_words': 256}