<commit_before>// example-scene.js
// just and example of how to use cosmonaut

var harness = require('cosmonaut-harness');

var scene = new harness.scene();
scene.attachToDom($('#context'));

var sphere = new harness.primitive.sphere({
  radius: 50
});

var light = new harness.light();

var lambert = new harness.material();

sphere.set('material', lambert);

scene.addObject(sphere);
scene.addLight(light);

var time = 0;

scene.on('prerender', function() {
  time++;
  sphere.scale(Math.cos(time/100), Math.sin(time/100), Math.cos(time/100) * Math.sin(time/100));
});

scene.startRenderLoop();
<commit_msg>updating example for camera stuff<commit_after>// example-scene.js
// just and example of how to use cosmonaut

var harness = require('cosmonaut-harness');

var scene = new harness.scene();
scene.attachToDom($('#context'));

var sphere = new harness.primitive.sphere({
  radius: 50
});

var light = new harness.light();

var lambert = new harness.material();

sphere.set('material', lambert);

scene.addObject(sphere);
scene.addLight(light);

var time = 0;

scene.on('prerender', function() {
  time++;
  sphere.scale(Math.cos(time/100), Math.sin(time/100), Math.cos(time/100) * Math.sin(time/100));
  scene.camera.move(Math.cos(time/50), Math.sin(time/50), Math.cos(time/50) * Math.sin(time/50));
});

scene.camera.set('lookAtObject', sphere);

scene.startRenderLoop();

{'fraction_non_alphanumeric': 0.17958001448225924, 'fraction_numerical': 0.027516292541636494, 'mean_word_length': 5.034934497816594, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5685391', 'n_tokens_mistral': 513, 'n_tokens_neox': 464, 'n_words': 104}