Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

(Misc feature) Add instant transitions #13

Open
spaghettube opened this issue Nov 17, 2022 · 0 comments
Open

(Misc feature) Add instant transitions #13

spaghettube opened this issue Nov 17, 2022 · 0 comments

Comments

@spaghettube
Copy link
Contributor

My suggestion is to add transitions where no animation/easing between the inicial position and final position. Having an instant transition can be useful to not use numbers with an unreasonable amount of decimals, since using that trick doesn't even make it look instant. So, for example, on the enderpearl holding animation:

Instead of:

[
 ...
    },
    {
	  "duration": 60,
        "frames":{
            "0.00000001":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 2.0, 1.0, 76.0],
            "0.2":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 2.0, 1.0, 76.0],
            "0.20000001":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 1.26, -0.68, 76.0],
            "0.4":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 1.26, -0.68, 76.0],
		"0.40000001":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0],
		"0.6":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0],
		"0.60000001":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0],
		"0.8":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0],
            "0.80000001":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, -0.44, 0.79999995, -0.75, 76.0], 
            "0.9999999":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, -0.44, 0.79999995, -0.75, 76.0]
        }
    }
]

Have:

[
 ...
    },
    {
	  "duration": 60,
        "frames":{
            "0.1":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 2.0, 1.0, 76.0, 1],
            "0.2":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 2.0, 1.0, 76.0, 0],
            "0.3":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 1.26, -0.68, 76.0, 1],
            "0.4":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 0.31, 1.26, -0.68, 76.0, 0],
		"0.5":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0, 1],
		"0.6":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0, 0],
		"0.7":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0, 1],
		"0.8":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, 1.0, 1.26, 0.37, 76.0, 0],
            "0.9":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, -0.44, 0.79999995, -0.75, 76.0, 1], 
            "0.99":[0.17999999, 0.0, 0.14, -20.0, 79.0, -55.0, 88.0, 0.0, 180.5, -0.44, 0.79999995, -0.75, 76.0, 2]
        }
    }
]

Notice I added a new value on the end of the array. By defining 0 as default animation, 1 as an instant transition between that position and the one behind, 2 as an instant transition between that position and the following one (and maybe 3 for instant transition on both before and after positions?). This is only an example of how it could be done, I'm sure you can find a better way to do this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant