Repository navigation
Scrolling Texture Type
Scrolling textures are a type of animated texture similar to vanilla's animated textures. However, instead of specifying each frame individually, the frame 'scrolls' over the texture.
The scrolling texture type uses the identifier scrolling and has the following properties:
Note
Random textures also support all properties of the base texture type.
| key | values | default | description |
|---|---|---|---|
from |
top_left, top_right,bottom_left, bottom_right
|
top_left |
Where the frame starts |
to |
top_left, top_right,bottom_left, bottom_right
|
bottom_left |
Where the frame ends |
frame_width |
integer, >0 | 16 |
Width of the frame |
frame_height |
integer, >0 | 16 |
Height of the frame |
frame_time |
integer, >0 | 10 |
Duration each frame is displayed for in ticks, 1 second = 20 ticks |
loop_type |
wrap, reset, reverse
|
wrap |
How to continue from the end of one animation iteration to the next |
loop_pause |
integer, >=0 | 0 |
Pause duration between loops in ticks, 1 second = 20 ticks |
Here is an example of the scrolling texture type used to create a conveyor belt:
{
"fusion": {
"type": "scrolling",
"from": "top_left",
"to": "bottom_left",
"frame_time": 10,
"frame_width": 16,
"frame_height": 16,
"loop_type": "wrap",
"loop_pause": 0
}
} |
|
There are 3 different loop types available for scrolling textures: wrap, reset, and reverse. The loop type determines what happens at the end of a loop to continue with the next loop.
The wrap option makes the frame wrap around the image to the starting point. The reset option makes the frame jump to the starting point. The reverse option plays the frames back in reverse.
Here is an example of an electronic board to show the difference between the loop types:
{
"fusion": {
"type": "scrolling",
"loop_type": "wrap",
"from": "top_left",
"to": "top_right",
"frame_time": 4,
"frame_width": 16,
"frame_height": 16
}
} |
|
{
"fusion": {
"type": "scrolling",
"loop_type": "reset",
"from": "top_left",
"to": "top_right",
"frame_time": 4,
"frame_width": 16,
"frame_height": 16
}
} |
|
{
"fusion": {
"type": "scrolling",
"loop_type": "reverse",
"from": "top_left",
"to": "top_right",
"frame_time": 4,
"frame_width": 16,
"frame_height": 16
}
} |
|