INNER CODE UNIT · JavaScript

getParameterizedConf

loicbourgois/gravitle · front/alpha/main.js:289

    const getParameterizedConf = (conf) => {
        conf.algorithm = selectAlgorithm.options[selectAlgorithm.selectedIndex].value;
        conf.gravitational_constant = parseFloat(inputG.value);
        conf.width = parseFloat(inputWidth.value);
        conf.height = parseFloat(inputHeight.value);
        conf.delta_time = parseFloat(inputDeltaTime.value);
        conf.collision_behavior = selectCollisionBehavior.options[selectCollisionBehavior.selectedIndex].value;
        conf.intersection_behavior = selectIntersectionBehavior.options[selectIntersectionBehavior.selectedIndex].value;
        conf.link_intersection_behavior = selectLinkIntersectionBehavior.options[selectLinkIntersectionBehavior.selectedIndex].value;
        conf.wrap_around = selectWrapAround.options[selectWrapAround.selectedIndex].value === 'true';
        conf.fixed_clone_count = selectFixedCloneCount.options[selectFixedCloneCount.selectedIndex].value === 'true';
        conf.stabilise_positions_enabled =
            selectStabilisePositionsEnabled.options[selectStabilisePositionsEnabled.selectedIndex].value === 'true';
        conf.minimal_distance_for_gravity = parseFloat(inputMinimalDistanceForGravity.value);
        conf.default_link_length = parseFloat(inputDefaultLinkLength.value);
        conf.default_link_strengh = parseFloat(inputDefaultLinkStrengh.value);
        conf.drag_coefficient = parseFloat(inputDragCoefficient.value);
        conf.stabiliser_power = parseInt(inputStabilisePower.value);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…