Updated Frame (markdown)

bi0qaw 2017-11-25 16:30:34 +01:00
parent 83c8ebbd12
commit 2960c16afb

@ -1,3 +1,20 @@
```
frame of %entity%
```
Creates a frame from an entities orientation. Returns a frame object.
```
frame with yaw %number% and pitch %number%
```
Creates a frame with a custom yaw and pitch. Returns a frame object.
```
%vectors% in %frame%
```
Converts the vectors from the Minecraft coordinate system to the frame coordinates. Returns a new list of vectors.
***
Frames are used whenever you want to change the direction of a bunch of vectors. Instead of rotating the list of vectors you can just grab a frame and let it do the correct rotations. This is best shown with a small example: Frames are used whenever you want to change the direction of a bunch of vectors. Instead of rotating the list of vectors you can just grab a frame and let it do the correct rotations. This is best shown with a small example:
![](https://i.imgur.com/ObIhdQz.png?1) ![](https://i.imgur.com/iWdfVQ2.png?1) ![](https://i.imgur.com/ObIhdQz.png?1) ![](https://i.imgur.com/iWdfVQ2.png?1)
@ -21,25 +38,6 @@ You can see that the circle is still in the "*horizontal*" XZ-plane but the whol
*** ***
## Syntax
```
frame of %entity%
```
Creates a frame from an entities orientation. Returns a frame object.
```
frame with yaw %number% and pitch %number%
```
Creates a frame with a custom yaw and pitch. Returns a frame object.
```
%vectors% in %frame%
```
Converts the vectors from the Minecraft coordinate system to the frame coordinates. Returns a new list of vectors.
***
## When should I use frames? ## When should I use frames?
* When you need the same shape in multiple directions * When you need the same shape in multiple directions
* When you need to update the direction of a shape over and over again * When you need to update the direction of a shape over and over again