<commit_before><!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head>
  <title>Starfield - Monogatari</title>
  <link href="style.css" rel="stylesheet">
  <script src="../../../lib/require.js"></script>
  <script src="../setup.js"></script>
  <script>
    require(
        [ 'Monogatari' ], function( m ) {
          var Starfield;
          var r = new m.Random();

          m.init( '0x000000' );

          //STAR
          var Star = function( id ) {
            m.GameObject.call( this, 'star_' + id );

            this.speed = 0;

            var material = new THREE.MeshBasicMaterial( { color: 0xFFFFFF } );
            var geometry = new THREE.BoxGeometry( 4, 4, 1 );

            this.addComponent( new m.BaseThree( material, geometry ) );

            this.init();
          };

          Star.prototype = Object.create( m.GameObject.prototype );

          Star.prototype.init = function() {
            this.isActive = false;
            this.isVisible = false;
            this.direction.x = 0;
            this.direction.y = 1;
            this.speed = r.floating( { min: 100, max: 400 } );
          };

          Star.prototype.update = function() {
            var s = this.speed / m.timer.fps;
            this.position.x += this.direction.x * s;
            this.position.y += this.direction.y * s;

            if( this.position.x < 0 || this.position.y > m.sceneManager.canvasHeight )<commit_msg>Improving Starfield usage example<commit_after><!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head>
  <title>Starfield - Monogatari</title>
  <link href="style.css" rel="stylesheet">
  <script src="../../../lib/require.js"></script>
  <script src="../setup.js"></script>
  <script>
    require(
        [ 'Monogatari' ], function( m ) {
          var Starfield;
          var r = new m.Random();

          m.init( '0x000000' );

          //STAR
          var Star = function( id ) {
            m.GameObject.call( this, 'star_' + id );

            this.speed = r.floating( { min: 100, max: 400 } );

            var material = new THREE.MeshBasicMaterial( { color: 0xFFFFFF } );
            var geometry = null;

            if( this.speed < 200 ) {
              geometry = new THREE.BoxGeometry( 1, 1, 1 )
            } else if( this.speed < 300 ) {
              geometry = new THREE.BoxGeometry( 2, 2, 1 )
            } else if( this.speed < 350 ) {
              geometry = new THREE.BoxGeometry( 3, 3, 1 )
            } else {
              geometry = new THREE.BoxGeometry( 4, 4, 1 )
            }

            this.addComponent( new m.BaseThree( material, geometry ) );

            this.init();
          };

          Star.prototype = Object.create( m.GameObject.prototype );

          Star.prototype.init = function() {
            this.isActive = false;
            this.isVisible = false;
            this.direction.x = 0;
            this.direction.y = 1;
          };

          Star.prototype.update = function() {
            var s = this.speed / m.timer.fps;
            this.position.x += this.direction.x * s;
            this.position.y += this.direction.y * s;

            if( this.position.x < 0 || this.position.y > m.sceneManager.canvasHeight )
{'fraction_non_alphanumeric': 0.14478219993732372, 'fraction_numerical': 0.019116264493889062, 'mean_word_length': 1.6555740432612314, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 29, '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': '4126135', 'n_tokens_mistral': 1023, 'n_tokens_neox': 928, 'n_words': 221}