You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+8-5
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,13 @@ MCAnim is a Minecraft datapack library that aims to make it easy to run certain
4
4
5
5
## Current features:
6
6
7
-
-**Animation playing**\
8
-
There are four ways to play animations: `generic`, `scale`, `translate` and `rotate`. Generic allows you to apply many animations including modifying duration at the same time. Called by running first the command `data modify storage mcanim:api/display_animations/generic animation set value {}`, and replacing the `{}` with your data. This supports setting the `duration` property, which decides the length of the animation, and any other property will be treated as an animation. Scale and translate do the same, but take x, y and z properties instead. Then run the function `mcanim:api/display_animations/<function>` as the entity you want to animate, to see it play.
7
+
-**Animation playing**
8
+
There are four ways to play animations: `generic`, `scale`, `translate` and `rotate`. Generic allows you to apply many animations including modifying duration at the same time. Called by running first the command `data modify storage mcanim:api/display_animation/generic animation set value {}`, and replacing the `{}` with your data. This supports setting the `duration` property, which decides the length of the animation, and any other property will be treated as an animation. Scale and translate do the same, but take x, y and z properties instead. Then run the function `mcanim:api/display_animation/<function>` as the entity you want to animate, to see it play.
9
9
10
-
-**Rotation and quaternions**
11
-
Rotation also takes x, y and z components in degrees, but as Minecraft uses quaternions for rotation, it automatically converts the angles given into quaternions. This can be done manually by setting the `mcanim:api/maths/xyz_to_quaternion target` to `{x, y, z}`, where you give each property the desired value. Then run `function mcanim:api/maths/xyz_to_quaternion`. The result will be in `mcanim:api/maths/xyz_to_quaternion output`
10
+
-**Rotation and quaternions**
11
+
Rotation also takes x, y and z components in degrees, but as Minecraft uses quaternions for rotation, it automatically converts the angles given into quaternions. This can be done manually by setting the `mcanim:api/maths/xyz_to_quaternion target` to `{x, y, z}` or `[x, y, z]`, where you give each property the desired value. Then run `function mcanim:api/maths/xyz_to_quaternion`. The result will be in `mcanim:api/maths/xyz_to_quaternion output`
12
12
13
-
Those are all of the features currently implemented, if you would like to suggest more or report a bug, please create an issue on the github page.
13
+
The same feature exists the other way around, converting a quaternion to its x, y and z components.
14
+
Similar to the above, set `mcanim:api/maths/quaternion_to_xyz target` to `[x, y, z, w]` or `{x, y, z, w}` (w is ignored, so optional). Then run `function mcanim:api/maths/quaternion_to_xyz`. As expected, the resulting array: `[x, y, z]` is found in `mcanim:api/maths/quaternion_to_xyz output`
15
+
16
+
Those are all of the features currently implemented, if you would like to suggest more or report a bug, please create an [issue on the github page](https://github.com/GearsDatapacks/mcanim/issues).
0 commit comments