<commit_before><!DOCTYPE html>
<html>
<head>
    <title>Circle container demo - p2.js physics engine</title>
    <script src="../build/p2.js"></script>
    <script src="js/jquery.js"></script>
    <script src="js/pixi.js"></script>
    <script src="js/Demo.js"></script>
    <script src="js/PixiDemo.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <link href="css/demo.css" rel="stylesheet"/>
    <link href="css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>
    <script>

        var disturb = true, l = 20, N=15, M=15, r = 0.07, d=2.2;

        var xmin=(-N/2 * r*d),
            xmax=( N/2 * r*d),
            ymin=(-M/2 * r*d),
            ymax=( M/2 * r*d);

        var world = new p2.World({
            doProfiling:true,
            gravity : [0,-10],
        });
        world.solver.stiffness = 1e5;
        world.solver.relaxation = 3;
        world.solver.iterations = 50;

        // Use a Sweep And Prune (SAP) broadphase
        world.broadphase = new p2.SAP1DBroadphase(world);

        // Create circle bodies
        var shape = new p2.Circle(r);
        for(var i=0; i<N; i++){
            for(var j=0; j<M; j++){
                var x = (i-N/2)*r*d+(disturb ? Math.random()*r : 0);
                var y = (j-M/2)*r*d;
                var p = new p2.Body({
                    mass: 1,
                    position: [x, y],
                });
                p.addShape(shape);
                world.addBody(p);
            }
        }


        // Create ground
        var planeShape = new p2.Plane();
        var plane = new p2.Body({
            position : [0,ymin],
        });
        plane.addShape(planeShape);
        world.addBody(plane);

        var planeLeft = new p2.Body({
            angle: -Math.PI/2,
            position: [xmin, 0]
        });
        planeLeft.addShape(planeShape);
        world.addBody(planeLeft);

        var planeRight = new p2.Body({
            angle: Math.PI/2,
            position: [xmax, 0]
        });
        planeRight.addShape(planeShape);
        world.addBody(planeRight);

        var demo = new PixiDemo(world);

        function update(){
            if(!demo.paused)
                world.step(1/60);
            demo.render();
            requestAnimationFrame(update);
        }
        requestAnimationFrame(update);

    </script>
</body>
</html>
<commit_msg>changed number of iterations in circles demo<commit_after><!DOCTYPE html>
<html>
<head>
    <title>Circle container demo - p2.js physics engine</title>
    <script src="../build/p2.js"></script>
    <script src="js/jquery.js"></script>
    <script src="js/pixi.js"></script>
    <script src="js/Demo.js"></script>
    <script src="js/PixiDemo.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <link href="css/demo.css" rel="stylesheet"/>
    <link href="css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>
    <script>

        var disturb = true, l = 20, N=15, M=15, r = 0.07, d=2.2;

        var xmin=(-N/2 * r*d),
            xmax=( N/2 * r*d),
            ymin=(-M/2 * r*d),
            ymax=( M/2 * r*d);

        var world = new p2.World({
            doProfiling:true,
            gravity : [0,-10],
        });
        world.solver.stiffness = 1e5;
        world.solver.relaxation = 3;
        world.solver.iterations = 20;

        // Use a Sweep And Prune (SAP) broadphase
        world.broadphase = new p2.SAP1DBroadphase(world);

        // Create circle bodies
        var shape = new p2.Circle(r);
        for(var i=0; i<N; i++){
            for(var j=0; j<M; j++){
                var x = (i-N/2)*r*d+(disturb ? Math.random()*r : 0);
                var y = (j-M/2)*r*d;
                var p = new p2.Body({
                    mass: 1,
                    position: [x, y],
                });
                p.addShape(shape);
                world.addBody(p);
            }
        }


        // Create ground
        var planeShape = new p2.Plane();
        var plane = new p2.Body({
            position : [0,ymin],
        });
        plane.addShape(planeShape);
        world.addBody(plane);

        var planeLeft = new p2.Body({
            angle: -Math.PI/2,
            position: [xmin, 0]
        });
        planeLeft.addShape(planeShape);
        world.addBody(planeLeft);

        var planeRight = new p2.Body({
            angle: Math.PI/2,
            position: [xmax, 0]
        });
        planeRight.addShape(planeShape);
        world.addBody(planeRight);

        var demo = new PixiDemo(world);

        function update(){
            if(!demo.paused)
                world.step(1/60);
            demo.render();
            requestAnimationFrame(update);
        }
        requestAnimationFrame(update);

    </script>
</body>
</html>

{'fraction_non_alphanumeric': 0.1578174186778594, 'fraction_numerical': 0.020146904512067156, 'mean_word_length': 1.5804006497022198, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 53, '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': '2051062', 'n_tokens_mistral': 1632, 'n_tokens_neox': 1534, 'n_words': 324}