<commit_before>import THREE from 'three';

const initialState = {
	windowWidth: 0,
	windowHeight: 0,
	cameraPosition: new THREE.Vector3(5, 5, 5),
	worldPosition: new THREE.Vector3(0, 0, 0),
	lightPosition: new THREE.Vector3(-4, 8, 5),
	lightTarget: new THREE.Vector3(0, 0, 0),
};

export default function scene(state = initialState, action) {
	switch (action.type) {
	case 'SET_WINDOW_SIZE':
		return {
			...state,
			windowHeight: action.height,
			windowWidth: action.width,
		};

	default:
		return state;
	}
}<commit_msg>ability to set units logic in the scene reducer<commit_after>import THREE from 'three';

const initialState = {
	windowWidth: 0,
	windowHeight: 0,
	cameraPosition: new THREE.Vector3(5, 5, 5),
	worldPosition: new THREE.Vector3(0, 0, 0),
	lightPosition: new THREE.Vector3(-4, 8, 5),
	lightTarget: new THREE.Vector3(0, 0, 0),
	units: 0, // 0 === imperial, 1 === metric
};

export default function scene(state = initialState, action) {
	switch (action.type) {
	case 'SET_WINDOW_SIZE':
		return {
			...state,
			windowHeight: action.height,
			windowWidth: action.width,
		};

	case 'SET_UNITS':
		return action.units === 0 || action.units === 1
		? {
			...state,
			units: action.units,
		}
		: state;

	default:
		return state;
	}
}
{'fraction_non_alphanumeric': 0.1431980906921241, 'fraction_numerical': 0.03261734287987271, 'mean_word_length': 3.933333333333333, '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': '3274550', 'n_tokens_mistral': 504, 'n_tokens_neox': 438, 'n_words': 123}