<commit_before>module BABYLON {

    export class SolidParticleSystem implements IDisposable {
        // public members  
        public particles: SolidParticle[] = new Array<SolidParticle>();
        public nbParticles: number = 0;
        public billboard: boolean = false;
        public counter: number = 0;
        public name: string;
        public mesh: Mesh;
        public vars: any = {};
        public pickedParticles: {idx: number; faceId: number}[];
        
        // private members
        private _scene: Scene;
        private _positions: number[] = new Array<number>();
        private _indices: number[] = new Array<number>();
        private _normals: number[] = new Array<number>();
        private _colors: number[] = new Array<number>();
        private _uvs: number[] = new Array<number>();
        private _positions32: Float32Array;
        private _normals32: Float32Array;           // updated normals for the VBO
        private _fixedNormal32: Float32Array;       // initial normal references
        private _colors32: Float32Array;
        private _uvs32: Float32Array;
        private _index: number = 0;  // indices index
        private _updatable: boolean = true;
        private _pickable: boolean = false;
        private _shapeCounter: number = 0;
        private _copy: SolidParticle = new SolidParticle(null, null, null, null, null);
        private _shape: Vector3[];
        private _shapeUV: number[];
        private _color: Color4 = new Color4(0, 0, 0, 0);
        private _computeParticleColor: boolean = true;
        private _computeParticleTexture: boolean = true;
        private _computeParticleRotation: boolean = true;
        private _computeParticleVertex: boolean = false;
        private _cam_axisZ: Vector3 = Vector3.Zero();
        private _cam_axisY: Vector3 = Vector3.Zero();
        private _cam_axisX: Vector3 = Vector3.Zero();
        private _axisX: Vector3 = Axis.X;
        private _axisY: Vector3 = Axis.Y;
        private _axisZ: Vector3 = Axis.Z;
        private _camera: Camera;
        private _particle: SolidParticle;
        private _fakeCamPos: Vector3 = Vector3.Zero();
        private _rotMatrix: Matrix = new Matrix();
        private _invertedMatrix: Matrix = new Matrix();
        private _rotated: Vector3 = Vector3.Zero();
        private _quaternion: Quaternion = new Quaternion();
        private _vertex: Vector3 = Vector3.Zero();
        private _normal: Vector3 = Vector3.Zero();
        private _yaw: number = 0.0;
        private _pitch: number = 0.0;
        private _roll: number = 0.0;
        private _halfroll: number = 0.0;
        private _halfpitch: number = 0.0;
        private _halfyaw: number = 0.0;
        private _sinRoll: number = 0.0;
        private _cosRoll: number = 0.0;
        private _sinPitch: number = 0.0;
        private _cosPitch: number = 0.0;
        private _sinYaw: number = 0.0;
        private _cosYaw: number = 0.0;
        private _w: number = 0.0;


        constructor(name: string, scene: Scene, options?: { updatable?: boolean, pickable? :boolean }) {
            this.name = name;
            this._scene = scene;
            this._camera = scene.activeCamera;
            this._pickable = options ? options.pickable : false;
            if (options && options.updatable) {
                this._updatable = options.updatable;
            } else {
                this._updatable = true;
            }
            if (this._pickable) {
                this.pickedParticles = [];
            }
        }

        // build the SPS mesh : returns the mesh
        public buildMesh(): Mesh {
            if (this.nbParticles === 0) {
                var triangle = MeshBuilder.CreateDisc("", { radius: 1, tessellation: 3 }, this._scene);
                this.addShape(triangle, 1);
                triangle.dispose();
            }
            this._positions32 = new Float32Array(this._positions);
            this._uvs32 = new Float32Array(this._uvs);
            this._colors32 = new Float32Array(this._colors);
            VertexData.ComputeNormals(this._positions32, this._indices, this._normals);
            this._normals32 = new Float32Array(this._normals);
            this._fixedNormal32 = new Float32Array(this._normals);
            var vertexData = new VertexData();
            vertexData.set(this._positions32, VertexBuffer.PositionKind);
            vertexData.indices = this._indices;
            vertexData.set(this._normals32, VertexBuffer.NormalKind);
            if (this._uvs32) {
                vertexData.set(this._uvs32, VertexBuffer.UVKind);;
            }
            if (this._colors32) {
                vertexData.set(this._colors32, VertexBuffer.ColorKind);
            }
            var mesh = new Mesh(name, this._scene);
            vertexData.applyToMesh(mesh, this._updatable);
            this.mesh = mesh;

            // free memory
            this._positions = null;
            this._normals = null;
            this._uvs = null;
            this._colors = null;

            if (!this._updatable) {
                this.particles.length = 0;
            }

            return mesh;
        }

        //reset copy<commit_msg>added explicit : this.mesh.isPickable = true<commit_after>module BABYLON {

    export class SolidParticleSystem implements IDisposable {
        // public members  
        public particles: SolidParticle[] = new Array<SolidParticle>();
        public nbParticles: number = 0;
        public billboard: boolean = false;
        public counter: number = 0;
        public name: string;
        public mesh: Mesh;
        public vars: any = {};
        public pickedParticles: {idx: number; faceId: number}[];
        
        // private members
        private _scene: Scene;
        private _positions: number[] = new Array<number>();
        private _indices: number[] = new Array<number>();
        private _normals: number[] = new Array<number>();
        private _colors: number[] = new Array<number>();
        private _uvs: number[] = new Array<number>();
        private _positions32: Float32Array;
        private _normals32: Float32Array;           // updated normals for the VBO
        private _fixedNormal32: Float32Array;       // initial normal references
        private _colors32: Float32Array;
        private _uvs32: Float32Array;
        private _index: number = 0;  // indices index
        private _updatable: boolean = true;
        private _pickable: boolean = false;
        private _shapeCounter: number = 0;
        private _copy: SolidParticle = new SolidParticle(null, null, null, null, null);
        private _shape: Vector3[];
        private _shapeUV: number[];
        private _color: Color4 = new Color4(0, 0, 0, 0);
        private _computeParticleColor: boolean = true;
        private _computeParticleTexture: boolean = true;
        private _computeParticleRotation: boolean = true;
        private _computeParticleVertex: boolean = false;
        private _cam_axisZ: Vector3 = Vector3.Zero();
        private _cam_axisY: Vector3 = Vector3.Zero();
        private _cam_axisX: Vector3 = Vector3.Zero();
        private _axisX: Vector3 = Axis.X;
        private _axisY: Vector3 = Axis.Y;
        private _axisZ: Vector3 = Axis.Z;
        private _camera: Camera;
        private _particle: SolidParticle;
        private _fakeCamPos: Vector3 = Vector3.Zero();
        private _rotMatrix: Matrix = new Matrix();
        private _invertedMatrix: Matrix = new Matrix();
        private _rotated: Vector3 = Vector3.Zero();
        private _quaternion: Quaternion = new Quaternion();
        private _vertex: Vector3 = Vector3.Zero();
        private _normal: Vector3 = Vector3.Zero();
        private _yaw: number = 0.0;
        private _pitch: number = 0.0;
        private _roll: number = 0.0;
        private _halfroll: number = 0.0;
        private _halfpitch: number = 0.0;
        private _halfyaw: number = 0.0;
        private _sinRoll: number = 0.0;
        private _cosRoll: number = 0.0;
        private _sinPitch: number = 0.0;
        private _cosPitch: number = 0.0;
        private _sinYaw: number = 0.0;
        private _cosYaw: number = 0.0;
        private _w: number = 0.0;


        constructor(name: string, scene: Scene, options?: { updatable?: boolean, pickable? :boolean }) {
            this.name = name;
            this._scene = scene;
            this._camera = scene.activeCamera;
            this._pickable = options ? options.pickable : false;
            if (options && options.updatable) {
                this._updatable = options.updatable;
            } else {
                this._updatable = true;
            }
            if (this._pickable) {
                this.pickedParticles = [];
            }
        }

        // build the SPS mesh : returns the mesh
        public buildMesh(): Mesh {
            if (this.nbParticles === 0) {
                var triangle = MeshBuilder.CreateDisc("", { radius: 1, tessellation: 3 }, this._scene);
                this.addShape(triangle, 1);
                triangle.dispose();
            }
            this._positions32 = new Float32Array(this._positions);
            this._uvs32 = new Float32Array(this._uvs);
            this._colors32 = new Float32Array(this._colors);
            VertexData.ComputeNormals(this._positions32, this._indices, this._normals);
            this._normals32 = new Float32Array(this._normals);
            this._fixedNormal32 = new Float32Array(this._normals);
            var vertexData = new VertexData();
            vertexData.set(this._positions32, VertexBuffer.PositionKind);
            vertexData.indices = this._indices;
            vertexData.set(this._normals32, VertexBuffer.NormalKind);
            if (this._uvs32) {
                vertexData.set(this._uvs32, VertexBuffer.UVKind);;
            }
            if (this._colors32) {
                vertexData.set(this._colors32, VertexBuffer.ColorKind);
            }
            var mesh = new Mesh(name, this._scene);
            vertexData.applyToMesh(mesh, this._updatable);
            this.mesh = mesh;

            // free memory
            this._positions = null;
            this._normals = null;
            this._uvs = null;
            this._colors = null;

            if (!this._updatable) {
                this.particles.length = 0;
                this.mesh.isPickable = true;
            }

            return mesh;
        }

        //reset copy
{'fraction_non_alphanumeric': 0.09788208357183743, 'fraction_numerical': 0.02156077084525854, 'mean_word_length': 1.9959988568162332, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6021098', 'n_tokens_mistral': 3033, 'n_tokens_neox': 2847, 'n_words': 766}