import * as THREE from 'three'; /** * Reads pixel data from a given render target * @param renderTarget the render target to read * @param renderer the renderer to use * @param size the size of the render target texture * @returns a pixel buffer array filled with data from the target */ export declare const readPixelBuffer: (renderTarget: THREE.WebGLRenderTarget, renderer: THREE.WebGLRenderer, size: number) => Float32Array; /** * Creates an array of random positional data randomly within the bounds of a cube. * @param size the size of the fbo * @param xLength the size of the cube on the x axis * @param yLength the size of the cube on the y axis * @param zLength the size of the cube on the z axis * @returns an array with starting positions that can be used to create a data texture */ export declare const createBoxPositions: (size?: number, xLength?: number, yLength?: number, zLength?: number) => Float32Array; /** * Creates an array of random positional data randomly within the bounds of a cylinder * @param size the size of the fbo * @param innerRadius the inner radius inside which no positions will be placed * @param outerRadius the outer radius outside which no positions will be placed * @param height the height of the cylinder * @param arc the angle range within which positions will be placed * @returns an array with starting positions that can be used to create a data texture */ export declare const createCylinderPositions: (size?: number, innerRadius?: number, outerRadius?: number, height?: number, arc?: number) => Float32Array; /** * Creates an array of random positional data randomly on the surface or within the bounds of a sphere * @param size the size of the fbo * @param radius the radius of the sphere * @param conformToSurface whether to assign positions within the volume or on the surface * @returns an array with starting positions that can be used to create a data texture */ export declare const createSpherePositions: (size?: number, radius?: number, conformToSurface?: boolean) => Float32Array; /** * Creates an array of random positional data on a grid that matches the layout of an fbo. * @param size the size of the fbo * @param gridScale the scale of the entire grid (higher scale = more space between points) * @returns an array with starting positions that can be used to create a data texture */ export declare const createDebugPositions: (size?: number, gridScale?: number) => Float32Array; /** * Assigns input data to a texture, the length of the data should be a multiple of two * @param data the data to populate the texture with * @returns a data texture with the input data */ export declare const createDataTexture: (data: Float32Array, format?: THREE.WebGL2PixelFormat) => THREE.DataTexture; /** * Shuffles buffer data via the Fisher-Yates shuffle algorithm, but keeps each * group together while doing so. * @param array the buffer data array to shuffle * @param dataSize the size of each entry in the data. i.e. a Vector3 would be 3 * @returns a shuffled array */ export declare const randomizeData: (array: Float32Array, dataSize: number) => Float32Array; /** * Shuffles positions and normals buffer data while keeping the indices aligned. * @param positions the positions buffer data array to shuffle (4 components per position) * @param normals the normals buffer data array to shuffle (3 components per normal) * @returns an object containing shuffled positions and normals arrays */ export declare const shufflePositionsAndNormals: (positions: Float32Array, normals: Float32Array) => { shuffledPositions: Float32Array; shuffledNormals: Float32Array; };