<commit_before># torus-mesh

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Generates an indexed 3D torus mesh.

```js
var torus = require('torus-mesh')
var mesh = torus()

console.log(mesh)
=> { positions, cells, normals, uvs }
```

It returns a simplicial complex, but also includes `normals` and `uvs` for lighting and texturing.

## Usage

[![NPM](https://nodei.co/npm/torus-mesh.png)](https://nodei.co/npm/torus-mesh/)

#### `mesh = torus([opt])`

Creates a new torus with options:

- `majorRadius` the radius of the major ring `R`, default 1.0
- `minorRadius` the radius of the minor ring `r`, default 0.25
- `majorSegments` the number of segments for the major ring, default 32
- `minorSegments` the number of segments for the minor ring, defualt 64
- `arc` the arc to draw, default `Math.PI * 2` (full circle)

## License

MIT. See [LICENSE.md](http://github.com/stackgl/torus-mesh/blob/master/LICENSE.md) for details.<commit_msg>udpating readme<commit_after># torus-mesh

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Generates an indexed 3D torus mesh.

```js
var torus = require('torus-mesh')
var mesh = torus()

console.log(mesh)
=> { positions, cells, normals, uvs }
```

It returns a simplicial complex, but also includes `normals` and `uvs` for lighting and texturing.

## Usage

[![NPM](https://nodei.co/npm/torus-mesh.png)](https://nodei.co/npm/torus-mesh/)

#### `mesh = torus([opt])`

Creates a new torus with options:

- `majorRadius` the radius of the major ring `R`, default 1.0
- `minorRadius` the radius of the minor ring `r`, default 0.25
- `majorSegments` the number of segments for the major ring, default 32
- `minorSegments` the number of segments for the minor ring, defualt 64
- `arc` the arc to draw, default `Math.PI * 2` (full circle)

## Credits

The code is largely taken from [ThreeJS TorusGeometry](https://github.com/mrdoob/three.js/blob/d49bb0e85f9c013198dc5a6c0f94f0bbe6a02add/src/extras/geometries/TorusGeometry.js).

## License

MIT. See [LICENSE.md](http://github.com/mattdesl/torus-mesh/blob/master/LICENSE.md) for details.
{'fraction_non_alphanumeric': 0.14934180662732638, 'fraction_numerical': 0.019518837948252384, 'mean_word_length': 4.51, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 5, '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': '1387533', 'n_tokens_mistral': 818, 'n_tokens_neox': 753, 'n_words': 217}