<commit_before>@private id_work_area = "work_area" ;
@private id_canvas_area = "canvas_area" ;

default_css = css 
#{id_canvas_area} {
   background-color: #D000D0;
}
;

css = [ default_css ] ;

_ = Random.random_init();

/*
ref = Mutable.make(4)
rec val timer42 = Scheduler.make_timer(1000, (->
  do jlog("a")
  if ref.get() == 0 then timer42.stop()
))
do timer42.start()
*/

server_start_static_page() =
  width = 500;
  height = 500;
  fail_msg = 
    <>It seems that your browser and/or graphics card are incompatible with Webgl.<a href="http://www.khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" >Learn a little more about webgl support</a></> ;
  <div>
    <canvas width={width} height={height} id=#{id_canvas_area} onready={_ -> if Outcome.is_failure(Modeler.init(#{id_canvas_area}, width, height)) then (_ = Dom.put_replace(#{id_canvas_area}, Dom.of_xhtml(fail_msg)); void)}/>
    <div id=#{id_work_area} />
  </div> ;

urls =
  parser
  | "/scene/" scene_url=(.*) ->
    html("3D creation", server_start_static_page())
  | (.*) ->
    html("Welcome", server_welcome_static_page())
  end ;


server = simple_server(urls) ;<commit_msg>pretty<commit_after>@private id_work_area = "work_area" ;
@private id_canvas_area = "canvas_area" ;

default_css = css 
#{id_canvas_area} {
   background-color: #D000D0;
}
;

css = [ default_css ] ;

_ = Random.random_init();

/*
ref = Mutable.make(4)
rec val timer42 = Scheduler.make_timer(1000, (->
  do jlog("a")
  if ref.get() == 0 then timer42.stop()
))
do timer42.start()
*/

server_start_static_page() =
  width = 500;
  height = 500;
  fail_msg = 
    <>It seems that your browser and/or graphics card are incompatible with Webgl.<a href="http://www.khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" >Learn a little more about webgl support</a></> ;
  <div>
    <canvas width={width} height={height} id=#{id_canvas_area} onready={_ -> if Outcome.is_failure(Modeler.init(#{id_canvas_area}, width, height)) then ignore(Dom.put_replace(#{id_canvas_area}, Dom.of_xhtml(fail_msg)))}/>
    <div id=#{id_work_area} />
  </div> ;

urls =
  parser
  | "/scene/" scene_url=(.*) ->
    html("3D creation", server_start_static_page())
  | (.*) ->
    html("Welcome", server_welcome_static_page())
  end ;


server = simple_server(urls) ;
{'fraction_non_alphanumeric': 0.1670310450371666, 'fraction_numerical': 0.020113686051595976, 'mean_word_length': 4.39622641509434, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6147239', 'n_tokens_mistral': 889, 'n_tokens_neox': 845, 'n_words': 167}