misskey icon indicating copy to clipboard operation
misskey copied to clipboard

enhance(MFM): add parameters to rotate

Open Johann150 opened this issue 3 years ago • 9 comments

What

The x and y parameters are added to the $[rotate ] MFM function rendering, analogous to the $[spin ] function.

Why

fix #8523

Johann150 avatar Apr 26 '22 20:04 Johann150

Doing $[rotate.x or $[rotate.y just causes the thing being rotated to dissapear

Regular: image

X: image

Y: image

ThatOneCalculator avatar Apr 26 '22 21:04 ThatOneCalculator

Yes thats because the default angle is 90°. Since the letters do not have any depth and you are looking at them from the side, that is not suprising. Try changing the angle.

Johann150 avatar Apr 26 '22 21:04 Johann150

Yes thats because the default angle is 90°. Since the letters do not have any depth and you are looking at them from the side, that is not suprising. Try changing the angle.

I can't seem to figure out the syntax, as $[rotate.x=70 doesn't work

ThatOneCalculator avatar Apr 26 '22 21:04 ThatOneCalculator

The angle must be changed as before by the deg parameter, e.g. $[rotate.x,deg=45 a].

Johann150 avatar Apr 26 '22 21:04 Johann150

sick

ThatOneCalculator avatar Apr 26 '22 21:04 ThatOneCalculator

My conclusion on this:

Does it look great? Not really. Is it bad? No. Could it possibly be used in some cool #mfmart? Maybe. Should it be added? Yea, more MFM options imo is never really a bad thing

ThatOneCalculator avatar Apr 26 '22 21:04 ThatOneCalculator

Note on compatibility with forking: In Groundpolis, rotateX and rotateY are preceded by perspective(128px). (But probably syuilo does not care about compatibility with forking.) https://github.com/Groundpolis/Groundpolis/blob/4f9c4532f51604056b2999212f8ff8323f59c357/src/client/components/mfm.functions.ts#L118

PS: This comes from $[spin]

futchitwo avatar Apr 26 '22 22:04 futchitwo

I think it would be a good idea to add here too:

without perspective it can cause strange empty space image

with perspective(128px) it looks better in my opinion image

Johann150 avatar Apr 27 '22 15:04 Johann150

Very tiny bug(?): the start of text gets cut off in chat bubbles image

ThatOneCalculator avatar Apr 28 '22 06:04 ThatOneCalculator

:(

ThatOneCalculator avatar Dec 04 '22 06:12 ThatOneCalculator