<commit_before>import { Vector2 } from '../math/Vector2.js';
import { Vector3 } from '../math/Vector3.js';
import { Matrix4 } from '../math/Matrix4.js';
import { Object3D } from '../core/Object3D.js';
import { SpriteMaterial } from '../materials/SpriteMaterial.js';

/**
 * @author <NAME> / http://gomo.se/
 * @author alteredq / http://alteredqualia.com/
 */

function Sprite( material ) {

	Object3D.call( this );

	this.type = 'Sprite';

	this.material = ( material !== undefined ) ? material : new SpriteMaterial();

	this.center = new Vector2( 0.5, 0.5 );

}

Sprite.prototype = Object.assign( Object.create( Object3D.prototype ), {

	constructor: Sprite,

	isSprite: true,

	raycast: ( function () {

		var intersectPoint = new Vector3();
		var worldPosition = new Vector3();
		var worldScale = new Vector3();

		var alignedPosition = new Vector2();
		var rotatedPosition = new Vector2();
		var matrixWorldInverse = new Matrix4();

		return function raycast( raycaster, intersects ) {

			worldScale.setFromMatrixScale( this.matrixWorld );

			// compute position in camera space
			alignedPosition.set( ( 0.5 - this.center.x ) * worldScale.x, ( 0.5 - this.center.y ) * worldScale.y );

			var rotation = this.material.rotation;
			if ( rotation !== 0 ) {
				var cos = Math.cos( rotation ), sin = Math.sin( rotation );
				rotatedPosition.x = ( cos * alignedPosition.x ) - ( sin * alignedPosition.y );
				rotatedPosition.y = ( sin * alignedPosition.x ) + ( cos * alignedPosition.y );
			} else {
				rotatedPosition.copy( alignedPosition );
			}
			
			worldPosition.setFromMatrixPosition( this.modelViewMatrix );
			worldPosition.x += rotatedPosition.x;
			worldPosition.y += rotatedPosition.y;

			// transform to world space
			worldPosition.applyMatrix4( matrixWorldInverse.getInverse( this.modelViewMatrix ) ).applyMatrix4( this.matrixWorld );

			raycaster.ray.closestPointToPoint( worldPosition, intersectPoint );

			var guessSizeSq = worldScale.x * worldScale.y / 4;<commit_msg>fix lint<commit_after>import { Vector2 } from '../math/Vector2.js';
import { Vector3 } from '../math/Vector3.js';
import { Matrix4 } from '../math/Matrix4.js';
import { Object3D } from '../core/Object3D.js';
import { SpriteMaterial } from '../materials/SpriteMaterial.js';

/**
 * @author <NAME> / http://gomo.se/
 * @author alteredq / http://alteredqualia.com/
 */

function Sprite( material ) {

	Object3D.call( this );

	this.type = 'Sprite';

	this.material = ( material !== undefined ) ? material : new SpriteMaterial();

	this.center = new Vector2( 0.5, 0.5 );

}

Sprite.prototype = Object.assign( Object.create( Object3D.prototype ), {

	constructor: Sprite,

	isSprite: true,

	raycast: ( function () {

		var intersectPoint = new Vector3();
		var worldPosition = new Vector3();
		var worldScale = new Vector3();

		var alignedPosition = new Vector2();
		var rotatedPosition = new Vector2();
		var matrixWorldInverse = new Matrix4();

		return function raycast( raycaster, intersects ) {

			worldScale.setFromMatrixScale( this.matrixWorld );

			// compute position in camera space
			alignedPosition.set( ( 0.5 - this.center.x ) * worldScale.x, ( 0.5 - this.center.y ) * worldScale.y );

			var rotation = this.material.rotation;
			if ( rotation !== 0 ) {

				var cos = Math.cos( rotation ), sin = Math.sin( rotation );
				rotatedPosition.x = ( cos * alignedPosition.x ) - ( sin * alignedPosition.y );
				rotatedPosition.y = ( sin * alignedPosition.x ) + ( cos * alignedPosition.y );

			} else {

				rotatedPosition.copy( alignedPosition );

			}

			worldPosition.setFromMatrixPosition( this.modelViewMatrix );
			worldPosition.x += rotatedPosition.x;
			worldPosition.y += rotatedPosition.y;

			// transform to world space
			worldPosition.applyMatrix4( matrixWorldInverse.getInverse( this.modelViewMatrix ) ).applyMatrix4( this.matrixWorld );

			raycaster.ray.closestPointToPoint( worldPosition, intersectPoint );

			var guessSizeSq = worldScale.x * worldScale.y / 4;
{'fraction_non_alphanumeric': 0.13855421686746988, 'fraction_numerical': 0.014558232931726908, 'mean_word_length': 3.5542857142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1740217', 'n_tokens_mistral': 1370, 'n_tokens_neox': 1212, 'n_words': 292}