Template:3DOneFace: Difference between revisions
From SNCApedia, the shit nobody cares about encyclopedia
Jump to navigationJump to search
SomebodyRum (talk | contribs) testing |
SomebodyRum (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
<!-- TEMPLATE: 3DOneFace | <!-- | ||
================================================== | |||
TEMPLATE NAME: 3DOneFace | |||
A single 3D face that swings left/right and up/down. | |||
Designed to flow perfectly inline with paragraph text. | |||
================================================== | |||
USAGE: | |||
{{3DOneFace|Your text here}} | |||
<templatestyles src="Template:3DOneFace/styles.css"/> | |||
< | PARAMETERS: | ||
<span class=" | - 1: The text, image, or content to display. | ||
| | - tilt-lr: "yes" or "no" (Look left/right. Default: yes) | ||
| | - tilt-ud: "yes" or "no" (Nod up/down. Default: no) | ||
| | - angle: Maximum tilt in degrees. Snaps to nearest tier. (Default: 30) | ||
|# | - random: "yes" or "no". Sudden snappy movement. (Default: no) | ||
}} {{#ifeq:{{{ | - size: (Optional) Set a fixed width/height for images. | ||
< | ================================================== | ||
<span class=" | --> | ||
</span> | <templatestyles src="Template:3DOneFace/styles.css"/><span class="cc-scene" style="perspective: 600px; {{#if:{{{size|}}}|width: {{{size}}}px; height: {{{size}}}px; display: inline-flex; justify-content: center; align-items: center;}}"><span class="cc-axis" style="transform: rotateY(-90deg); transform-style: preserve-3d;"><span class="cc-axis {{#ifeq: {{{tilt-ud|no}}} | yes | {{#ifeq: {{{random|no}}} | yes | cc-rd | cc-sm }}-{{#ifexpr: {{{angle|30}}} <= 22 | 15 | {{#ifexpr: {{{angle|30}}} <= 37 | 30 | {{#ifexpr: {{{angle|30}}} <= 52 | 45 | {{#ifexpr: {{{angle|30}}} <= 75 | 60 | 90 }} }} }} }} }}" style="transform-style: preserve-3d; {{#ifeq: {{{tilt-ud|no}}} | yes | animation-duration: {{#ifeq: {{{random|no}}} | yes | 6 | 4 }}s; }}"><span class="cc-axis" style="transform: rotateY(90deg); transform-style: preserve-3d;"><span class="cc-axis" style="transform: rotateX(90deg); transform-style: preserve-3d;"><span class="cc-axis {{#ifeq: {{{tilt-lr|yes}}} | no | | {{#ifeq: {{{random|no}}} | yes | cc-rd | cc-sm }}-{{#ifexpr: {{{angle|30}}} <= 22 | 15 | {{#ifexpr: {{{angle|30}}} <= 37 | 30 | {{#ifexpr: {{{angle|30}}} <= 52 | 45 | {{#ifexpr: {{{angle|30}}} <= 75 | 60 | 90 }} }} }} }} }}" style="transform-style: preserve-3d; {{#ifeq: {{{tilt-lr|yes}}} | no | | animation-duration: {{#ifeq: {{{random|no}}} | yes | 7 | 4.3 }}s; }}"><span class="cc-axis" style="transform: rotateX(-90deg); transform-style: preserve-3d;"><span class="cc-side" style="transform-style: preserve-3d;">{{{1|Add something here...}}}</span></span></span></span></span></span></span></span><noinclude> | ||
</ | |||
== Usage == | == Usage == | ||
<pre>{{3DOneFace| | <code>Look at {{3DOneFace|'''this text'''|angle=45}} before continuing normally.</code> | ||
'''Default behavior.''' | |||
<pre> | |||
{{3DOneFace|Add something here...}} | |||
</pre> | |||
{{3DOneFace|Add something here...}} | |||
'''Random Snapping (Up/Down + Left/Right)''' | |||
<pre> | |||
{{3DOneFace | |||
| tilt-ud = yes | |||
| random = yes | |||
| angle = 45 | |||
| 1 = [[File:Hunky_edit.mp4|200px]] | |||
}} | |||
</pre> | |||
'''Test using a file.''' | |||
{{3DOneFace | |||
| tilt-ud = yes | |||
| random = yes | |||
| angle = 45 | |||
| 1 = [[File:Hunky_edit.mp4|200px]] | |||
}} | |||
'''Test using a text.''' | |||
<pre> | |||
{{3DOneFace | |||
| tilt-ud = yes | |||
| random = yes | |||
| angle = 20 | |||
}} | |||
</pre> | |||
{{3DOneFace | |||
| tilt-ud = yes | |||
| random = yes | |||
| angle = 20 | |||
}} | |||
== Parameters == | == Parameters == | ||
* '''1''' = Content to display. | |||
* '''tilt-lr''' = Look left/right. <code>yes</code> or <code>no</code>. (Default: <code>yes</code>) | |||
* '''tilt-ud''' = Nod up/down. <code>yes</code> or <code>no</code>. (Default: <code>no</code>) | |||
* '''angle''' = Number value for max rotation angle. (Default: <code>30</code>) | |||
* '''random''' = <code>yes</code> or <code>no</code>. Snaps suddenly instead of smooth swinging. (Default: <code>no</code>) | |||
* '''size''' = Optional hardcoded width/height box size. | |||
[[Category:Animation templates]] | [[Category:Animation templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 17:22, 18 April 2026
Add something here...
Usage
Look at
this text before continuing normally.
Default behavior.
{{3DOneFace|Add something here...}}
Add something here...
Random Snapping (Up/Down + Left/Right)
{{3DOneFace
| tilt-ud = yes
| random = yes
| angle = 45
| 1 = [[File:Hunky_edit.mp4|200px]]
}}
Test using a file.
Test using a text.
{{3DOneFace
| tilt-ud = yes
| random = yes
| angle = 20
}}
Add something here...
Parameters
- 1 = Content to display.
- tilt-lr = Look left/right.
yesorno. (Default:yes) - tilt-ud = Nod up/down.
yesorno. (Default:no) - angle = Number value for max rotation angle. (Default:
30) - random =
yesorno. Snaps suddenly instead of smooth swinging. (Default:no) - size = Optional hardcoded width/height box size.