<commit_before>/* globals THREE */

'use strict';

function ClusterFactory(app) {

	var self = this;

	var rings = [];

	var cylinder;

	var ringOptions = {
		x: 0,
		y: 0,
		z: 0,
		segments: 16,
		radius: 10,
		inner: 0.05
	};

	var stepIncrease = 0;
	var stepIncreaseStep = 0.01;

	var rotationSpeedX = 0.01 + stepIncrease;
	var rotationSpeedY = 0.001 + stepIncrease;

	var speed = 0.0007;

	var ringFactory;
	var ring;
	var ring3;
	var ring2;

	var material = new THREE.MeshBasicMaterial({
		color: 0x62989cf
	});
	
	var geometry = new THREE.CylinderGeometry(0.001, 0.001, 20, 32);

	this.createCluster = function(options) {

		cylinder = new THREE.Mesh(geometry, material);
		
		ringFactory = new RingFactory(app);

		for (var i = 0; i < options.levels; i++) {
			ring = ringFactory.createRing(ringOptions);
			ring.rotation.x = Math.PI / 2;
			ring.translateZ(1 * i);
			rings[i] = ring;

			cylinder.add(ring);
		}

		ring3 = ringFactory.createRing(ringOptions);
		ring2 = ringFactory.createRing(ringOptions);
		ring3.scale.set(0.5, 0.5, 0.5);
		ring2.scale.set(0.5, 0.5, 0.5);

		cylinder.add(ring3);
		cylinder.add(ring2);

		var clusterConfig = null;

		// (new THREE.LineSegments(
		// 	geometry, phongMaterial
		// ));

		cylinder.onRender = function() {

			cylinder.rotation.x -= 0.001 + speed;

			// console.log(time, ring);

			speed += 0.00001;

			var rand = Math.random() * 0.001;

			ring3.rotation.x += rotationSpeedX + speed;
			ring3.rotation.y += rotationSpeedY + rand;

			ring2.rotation.x += rotationSpeedY;
			ring2.rotation.y -= rotationSpeedX + speed + rand;
		};

		return cylinder;
	};

}<commit_msg>and added z axis rotation<commit_after>/* globals THREE */

'use strict';

function ClusterFactory(app) {

	var self = this;

	var rings = [];

	var cylinder;

	var ringOptions = {
		x: 0,
		y: 0,
		z: 0,
		segments: 16,
		radius: 10,
		inner: 0.05
	};

	var stepIncrease = 0;
	var stepIncreaseStep = 0.01;

	var rotationSpeedX = 0.01 + stepIncrease;
	var rotationSpeedY = 0.001 + stepIncrease;

	var speed = 0.0007;

	var ringFactory;
	var ring;
	var ring3;
	var ring2;

	var material = new THREE.MeshBasicMaterial({
		color: 0x62989cf
	});
	
	var geometry = new THREE.CylinderGeometry(0.001, 0.001, 20, 32);

	this.createCluster = function(options) {

		cylinder = new THREE.Mesh(geometry, material);
		
		ringFactory = new RingFactory(app);

		for (var i = 0; i < options.levels; i++) {
			ring = ringFactory.createRing(ringOptions);
			ring.rotation.x = Math.PI / 2;
			ring.translateZ(1 * i);
			rings[i] = ring;

			cylinder.add(ring);
		}

		ring3 = ringFactory.createRing(ringOptions);
		ring2 = ringFactory.createRing(ringOptions);
		ring3.scale.set(0.5, 0.5, 0.5);
		ring2.scale.set(0.5, 0.5, 0.5);

		cylinder.add(ring3);
		cylinder.add(ring2);

		var clusterConfig = null;

		// (new THREE.LineSegments(
		// 	geometry, phongMaterial
		// ));

		cylinder.onRender = function() {

			cylinder.rotation.x -= 0.001 + speed;
			cylinder.rotation.z += 0.002 + speed;

			// console.log(time, ring);

			speed += 0.00001;

			var rand = Math.random() * 0.001;

			ring3.rotation.x += rotationSpeedX + speed;
			ring3.rotation.y += rotationSpeedY + rand;

			ring2.rotation.x += rotationSpeedY;
			ring2.rotation.y -= rotationSpeedX + speed + rand;
		};

		return cylinder;
	};

}
{'fraction_non_alphanumeric': 0.1450105517033464, 'fraction_numerical': 0.05245703949351824, 'mean_word_length': 3.1064356435643563, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4073418', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1227, 'n_words': 283}