hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
56 lines (27 loc) • 773 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [Matrix2](./server.matrix2.md) > [fromScaling](./server.matrix2.fromscaling.md)
## Matrix2.fromScaling() method
Creates a new `Matrix2` instance from a scale of identity matrix.
**Signature:**
```typescript
static fromScaling(scale: Vector2): Matrix2;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
scale
</td><td>
[Vector2](./server.vector2.md)
</td><td>
The scale of the matrix.
</td></tr>
</tbody></table>
**Returns:**
[Matrix2](./server.matrix2.md)
A new `Matrix2` instance.