Skip to content

Commit

Permalink
fix(types): fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
MD4 committed Nov 27, 2020
1 parent a52c63d commit 2f21535
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

## Index

### Interfaces

* [Bounds](interfaces/bounds.md)
* [Segment2](interfaces/segment2.md)
* [Vec2](interfaces/vec2.md)

### Functions

* [computeShadows](README.md#computeshadows)
Expand All @@ -14,9 +20,9 @@

### computeShadows

`Const`**computeShadows**(`bounds`: Bounds, `walls`: Segment2[], `light`: Vec2): Vec2[][]
`Const`**computeShadows**(`bounds`: [Bounds](interfaces/bounds.md), `walls`: [Segment2](interfaces/segment2.md)[], `light`: [Vec2](interfaces/vec2.md)): [Vec2](interfaces/vec2.md)[][]

*Defined in [computeShadows.ts:39](https://github.com/MD4/shadowed/blob/3e2bacb/src/computeShadows.ts#L39)*
*Defined in [computeShadows.ts:39](https://github.com/MD4/shadowed/blob/a52c63d/src/computeShadows.ts#L39)*

Computes casted shadows by a light for a given set of walls within specified bounds.

Expand All @@ -39,8 +45,8 @@ computeShadows(

Name | Type | Description |
------ | ------ | ------ |
`bounds` | Bounds | A rectangle where the shadows will be contained. |
`walls` | Segment2[] | Segments that will cast shadows. |
`light` | Vec2 | Position of the light. |
`bounds` | [Bounds](interfaces/bounds.md) | A rectangle where the shadows will be contained. |
`walls` | [Segment2](interfaces/segment2.md)[] | Segments that will cast shadows. |
`light` | [Vec2](interfaces/vec2.md) | Position of the light. |

**Returns:** Vec2[][]
**Returns:** [Vec2](interfaces/vec2.md)[][]
32 changes: 32 additions & 0 deletions docs/interfaces/bounds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
**[shadowed](../README.md)**

> [Globals](../README.md) / Bounds
# Interface: Bounds

## Hierarchy

* **Bounds**

## Index

### Properties

* [bottomRight](bounds.md#bottomright)
* [topLeft](bounds.md#topleft)

## Properties

### bottomRight

**bottomRight**: [Vec2](vec2.md)

*Defined in [entities.ts:8](https://github.com/MD4/shadowed/blob/a52c63d/src/entities.ts#L8)*

___

### topLeft

**topLeft**: [Vec2](vec2.md)

*Defined in [entities.ts:7](https://github.com/MD4/shadowed/blob/a52c63d/src/entities.ts#L7)*
32 changes: 32 additions & 0 deletions docs/interfaces/segment2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
**[shadowed](../README.md)**

> [Globals](../README.md) / Segment2
# Interface: Segment2

## Hierarchy

* **Segment2**

## Index

### Properties

* [a](segment2.md#a)
* [b](segment2.md#b)

## Properties

### a

**a**: [Vec2](vec2.md)

*Defined in [entities.ts:12](https://github.com/MD4/shadowed/blob/a52c63d/src/entities.ts#L12)*

___

### b

**b**: [Vec2](vec2.md)

*Defined in [entities.ts:13](https://github.com/MD4/shadowed/blob/a52c63d/src/entities.ts#L13)*
32 changes: 32 additions & 0 deletions docs/interfaces/vec2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
**[shadowed](../README.md)**

> [Globals](../README.md) / Vec2
# Interface: Vec2

## Hierarchy

* **Vec2**

## Index

### Properties

* [x](vec2.md#x)
* [y](vec2.md#y)

## Properties

### x

**x**: number

*Defined in [entities.ts:2](https://github.com/MD4/shadowed/blob/a52c63d/src/entities.ts#L2)*

___

### y

**y**: number

*Defined in [entities.ts:3](https://github.com/MD4/shadowed/blob/a52c63d/src/entities.ts#L3)*
File renamed without changes.

0 comments on commit 2f21535

Please sign in to comment.