MarchingCubes.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import {
  2. BufferGeometry,
  3. Material,
  4. ImmediateRenderObject
  5. } from '../../../src/Three';
  6. export class MarchingCubes extends ImmediateRenderObject {
  7. constructor( resolution: number, material: Material, enableUvs?: boolean, enableColors?: boolean );
  8. enableUvs: boolean;
  9. enableColors: boolean;
  10. resolution: number;
  11. // parameters
  12. isolation: number;
  13. // size of field, 32 is pushing it in Javascript :)
  14. size: number;
  15. size2: number;
  16. size3: number;
  17. halfsize: number;
  18. // deltas
  19. delta: number;
  20. yd: number;
  21. zd: number;
  22. field: Float32Array;
  23. normal_cache: Float32Array;
  24. palette: Float32Array;
  25. maxCount: number;
  26. count: number;
  27. hasPositions: boolean;
  28. hasNormals: boolean;
  29. hasColors: boolean;
  30. hasUvs: boolean;
  31. positionArray: Float32Array;
  32. normalArray: Float32Array;
  33. uvArray: Float32Array;
  34. colorArray: Float32Array;
  35. begin(): void;
  36. end(): void;
  37. addBall( ballx: number, bally: number, ballz: number, strength: number, subtract: number, colors: any ): void;
  38. addPlaneX( strength: number, subtract: number ): void;
  39. addPlaneY( strength: number, subtract: number ): void;
  40. addPlaneZ( strength: number, subtract: number ): void;
  41. setCell ( x: number, y: number, z: number, value: number ): void;
  42. getCell ( x: number, y: number, z: number ): number;
  43. blur( intensity: number ): void;
  44. reset(): void;
  45. render( renderCallback: any ): void;
  46. generateGeometry(): BufferGeometry;
  47. generateBufferGeometry(): BufferGeometry;
  48. }
  49. export const edgeTable: Int32Array[];
  50. export const triTable: Int32Array[];