Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
manthrax authored Jan 16, 2024
1 parent 0af4c26 commit 6d0f5ee
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# DST Embroidery File Loader for THREE.JS

**Author:** thrax
**Date:** January 15, 2024

## Overview

This library provides a loader, parser, and renderer for the `.dst` embroidery machine file format, specifically designed for use with THREE.JS. It allows for rendering stitches to textured geometry, with an option to render to a rendertarget for more efficient display.

## Features

- **Dynamic Rendering:** Change colors, geometry, and thread parameters on the fly.
- **Normalized Draw Range:** Supports displaying stitches at different stages in the process.
- **Customizable Options:** The loader accepts an options parameter to customize the output.

## Options

- `quads`: Boolean (`true` or `false`). Determines whether to generate quads or line primitives. Default: `false`.
- `threadThickness`: Numeric value (0 to Infinity). Sets the thickness of the thread. Default: 2.
- `jumpThreadThickness`: Numeric value (0 to Infinity). Sets the thickness of the jump thread. Default: 0.01.
- `palette`: Array of color strings. Defines the colors used for the thread color steps. Ideally, should have one more color than the number of thread color steps in the file. Missing entries will be set to random colors.

## Return Object

The `load` method returns an object containing:

- `mesh`: The Mesh or Line primitive.
- All parameters specified in "options" can be modified dynamically.

## Usage

0 comments on commit 6d0f5ee

Please sign in to comment.