Difference between revisions of "Template:Cube"

From The Wiki Camp 2
Jump to navigation Jump to search
(maybe?)
Line 20: Line 20:
 
height: {{#if:{{{7|}}}|{{{7}}}|200}}px;
 
height: {{#if:{{{7|}}}|{{{7}}}|200}}px;
 
}
 
}
.face-front  { transform: rotateY(  0deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(255, 0, 0, 0.5); }
+
.face-front  { transform: rotateY(  0deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(255, 0, 0, {{{opacity|0.5}}}); }
.face-right  { transform: rotateY( 90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(255, 255, 0, 0.5); }
+
.face-right  { transform: rotateY( 90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(255, 255, 0, {{{opacity|0.5}}}); }
.face-back  { transform: rotateY(180deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(0, 255, 0, 0.5); }
+
.face-back  { transform: rotateY(180deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(0, 255, 0, {{{opacity|0.5}}}); }
.face-left  { transform: rotateY(-90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(0, 255, 255, 0.5); }
+
.face-left  { transform: rotateY(-90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(0, 255, 255, {{{opacity|0.5}}}); }
.face-top    { transform: rotateX( 90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(0, 0, 255, 0.5); }
+
.face-top    { transform: rotateX( 90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(0, 0, 255, {{{opacity|0.5}}}); }
.face-bottom { transform: rotateX(-90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(255, 0, 255, 0.5); }
+
.face-bottom { transform: rotateX(-90deg) translateZ({{#if:{{{7|}}}|{{#expr: {{{7}}}/2}}|100}}px); background-color: rgba(255, 0, 255, {{{opacity|0.5}}}); }
 
@keyframes rotatey {
 
@keyframes rotatey {
 
0% { transform: rotate3d(0, 0, 1, 0deg); }
 
0% { transform: rotate3d(0, 0, 1, 0deg); }

Revision as of 03:10, 17 January 2024

By the way, this takes parameters! Usage is like this: {{Cube|1|2|3|4|5|6|7}}, where 1-6 are the sides of the cube and 7 marks the size. You can add your own custom faces to the cube this way! Also, every field in the template is optional, so you can just have the blank cube if you wish.


image.png
image.png
image.png
image.png
image.png
image.png


CubeMap.png