New mission: revamp the portals to make them look actually tolerable to the eye. They are currently placeholders as of now.
The Gold Network: Soyworld | SNCApedia | SoyPlace


I'm not dead, just inactive for the moment. Faggot (talk) 20:16, 9 April 2026 (UTC)

Template:3DCube/style.css: Difference between revisions

From SNCApedia, the shit nobody cares about encyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
Tag: Manual revert
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Template:3DCube/style.css
/* Template:3DCube/styles.css
   2D matrix simulation of a rotating 3D cube
   Hardware-accelerated 2D matrix simulation of a 3D cube.
   No 3D CSS properties — sanitizer safe */
   Fully compatible with MediaWiki CSS sanitizers. */


.scene {
.mw-3dcube-scene {
     width: 200px;
     width: 200px;
     height: 200px;
     height: 200px;
    margin: 120px auto;
     position: relative;
     position: relative;
    /* Scaling is handled inline by the template */
}
}


.cube {
.mw-3dcube {
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
Line 16: Line 16:
}
}


.cube-face {
.mw-3dcube-face {
     position: absolute;
     position: absolute;
     width: 200px;
     width: 200px;
Line 24: Line 24:
     transform-origin: 50% 50%;
     transform-origin: 50% 50%;
     overflow: hidden;
     overflow: hidden;
     background: transparent;
     background-color: transparent;
}
}


/* Force images to fill each face */
/* Force inner images to perfectly fill the face */
.cube-face img {
.mw-3dcube-face img {
     display: block;
     display: block;
     width: 200px !important;
     width: 100% !important;
     height: 200px !important;
     height: 100% !important;
     border: none !important;
     border: none !important;
     outline: none !important;
     object-fit: cover;
}
}


/* z-index steps are set per keyframe as discrete jumps
/* Base animations */
  so faces stack correctly as they rotate into view */
.mw-3dcube-front  { animation: mw-3dcube-front  8s linear infinite; }
.mw-3dcube-right  { animation: mw-3dcube-right  8s linear infinite; }
.mw-3dcube-back  { animation: mw-3dcube-back  8s linear infinite; }
.mw-3dcube-left  { animation: mw-3dcube-left  8s linear infinite; }
.mw-3dcube-top    { animation: mw-3dcube-top    8s linear infinite; z-index: 4; }
.mw-3dcube-bottom { animation: mw-3dcube-bottom 8s linear infinite; z-index: 0; }


.face-front  { animation: wall-front  8s linear infinite; }
/* Optional: pause rotation on hover */
.face-right  { animation: wall-right  8s linear infinite; }
.mw-3dcube-scene:hover .mw-3dcube-face { animation-play-state: paused; }
.face-back  { animation: wall-back  8s linear infinite; }
.face-left  { animation: wall-left  8s linear infinite; }
.face-top    { z-index: 4; animation: face-top    8s linear infinite; }
.face-bottom { z-index: 0; animation: face-bottom 8s linear infinite; }


@keyframes wall-front {
/* --- Orthographic 2D Matrix Keyframes --- */
     0%    { transform: matrix(1,     0,     0, 0.866,   0,   50); z-index: 6; }
@keyframes mw-3dcube-front {
     12.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
     0%    { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
     25%  { transform: matrix(0,     -0.5,   0, 0.866, 100,   0);   z-index: 3; }
     12.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
     37.5% { transform: matrix(-0.707,-0.354, 0, 0.866, 70.7,-35.4); z-index: 2; }
     25%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
     50%  { transform: matrix(-1,     0,     0, 0.866,   0, -50); z-index: 1; }
     37.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
     62.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7,-35.4); z-index: 2; }
     50%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
     75%  { transform: matrix(0,     0.5,   0, 0.866, -100,   0);   z-index: 3; }
     62.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
     87.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     75%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
     100%  { transform: matrix(1,     0,     0, 0.866,   0,   50); z-index: 6; }
     87.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     100%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
}
}


@keyframes wall-right {
@keyframes mw-3dcube-right {
     0%    { transform: matrix(0,   -0.5,   0, 0.866, 100,   0);   z-index: 3; }
     0%    { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
     12.5% { transform: matrix(-0.707,-0.354,0, 0.866,   70.7,-35.4); z-index: 2; }
     12.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
     25%  { transform: matrix(-1,   0,     0, 0.866,   0, -50);   z-index: 1; }
     25%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
     37.5% { transform: matrix(-0.707,0.354, 0, 0.866, -70.7,-35.4); z-index: 2; }
     37.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
     50%  { transform: matrix(0,     0.5,   0, 0.866, -100,   0);   z-index: 3; }
     50%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
     62.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     62.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     75%  { transform: matrix(1,     0,     0, 0.866,   0,   50);   z-index: 6; }
     75%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
     87.5% { transform: matrix(0.707,-0.354, 0, 0.866,   70.7, 35.4); z-index: 5; }
     87.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
     100%  { transform: matrix(0,   -0.5,   0, 0.866, 100,   0);   z-index: 3; }
     100%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
}
}


@keyframes wall-back {
@keyframes mw-3dcube-back {
     0%    { transform: matrix(-1,     0,     0, 0.866,   0, -50); z-index: 1; }
     0%    { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
     12.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7,-35.4); z-index: 2; }
     12.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
     25%  { transform: matrix(0,     0.5,   0, 0.866, -100,   0);   z-index: 3; }
     25%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
     37.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     37.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     50%  { transform: matrix(1,     0,     0, 0.866,   0,   50); z-index: 6; }
     50%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
     62.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
     62.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
     75%  { transform: matrix(0,     -0.5,   0, 0.866, 100,   0);   z-index: 3; }
     75%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
     87.5% { transform: matrix(-0.707,-0.354, 0, 0.866, 70.7,-35.4); z-index: 2; }
     87.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
     100%  { transform: matrix(-1,     0,     0, 0.866,   0, -50); z-index: 1; }
     100%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
}
}


@keyframes wall-left {
@keyframes mw-3dcube-left {
     0%    { transform: matrix(0,     0.5,   0, 0.866, -100,   0);   z-index: 3; }
     0%    { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
     12.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     12.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
     25%  { transform: matrix(1,     0,     0, 0.866,   0,   50); z-index: 6; }
     25%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
     37.5% { transform: matrix(0.707,-0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
     37.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
     50%  { transform: matrix(0,   -0.5,   0, 0.866, 100,   0);   z-index: 3; }
     50%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
     62.5% { transform: matrix(-0.707,-0.354,0, 0.866, 70.7,-35.4); z-index: 2; }
     62.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
     75%  { transform: matrix(-1,   0,     0, 0.866,   0, -50); z-index: 1; }
     75%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
     87.5% { transform: matrix(-0.707,0.354, 0, 0.866, -70.7,-35.4); z-index: 2; }
     87.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
     100%  { transform: matrix(0,     0.5,   0, 0.866, -100,   0);   z-index: 3; }
     100%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
}
}


@keyframes face-top {
@keyframes mw-3dcube-top {
     0%    { transform: matrix(1,     0,     0.707, 0.354,   0, -86.6); }
     0%    { transform: matrix(1, 0, 0.707, 0.354, 0, -86.6); }
     12.5% { transform: matrix(0.707,-0.354, 0.707, 0.354,   0, -86.6); }
     12.5% { transform: matrix(0.707, -0.354, 0.707, 0.354, 0, -86.6); }
     25%  { transform: matrix(0,   -0.5,   1,     0,       0, -86.6); }
     25%  { transform: matrix(0, -0.5, 1, 0, 0, -86.6); }
     37.5% { transform: matrix(-0.707,-0.354, 0.707,-0.354,   0, -86.6); }
     37.5% { transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, -86.6); }
     50%  { transform: matrix(-1,   0,     0,   -0.5,     0, -86.6); }
     50%  { transform: matrix(-1, 0, 0, -0.5, 0, -86.6); }
     62.5% { transform: matrix(-0.707,0.354, -0.707,-0.354,   0, -86.6); }
     62.5% { transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, -86.6); }
     75%  { transform: matrix(0,     0.5,   -1,     0,       0, -86.6); }
     75%  { transform: matrix(0, 0.5, -1, 0, 0, -86.6); }
     87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354,   0, -86.6); }
     87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354, 0, -86.6); }
     100%  { transform: matrix(1,     0,     0.707, 0.354,   0, -86.6); }
     100%  { transform: matrix(1, 0, 0.707, 0.354, 0, -86.6); }
}
}


@keyframes face-bottom {
@keyframes mw-3dcube-bottom {
     0%    { transform: matrix(1,     0,     0.707, 0.354,   0, 86.6); }
     0%    { transform: matrix(1, 0, 0.707, 0.354, 0, 86.6); }
     12.5% { transform: matrix(0.707,-0.354, 0.707, 0.354,   0, 86.6); }
     12.5% { transform: matrix(0.707, -0.354, 0.707, 0.354, 0, 86.6); }
     25%  { transform: matrix(0,   -0.5,   1,     0,       0, 86.6); }
     25%  { transform: matrix(0, -0.5, 1, 0, 0, 86.6); }
     37.5% { transform: matrix(-0.707,-0.354, 0.707,-0.354,   0, 86.6); }
     37.5% { transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, 86.6); }
     50%  { transform: matrix(-1,   0,     0,   -0.5,     0, 86.6); }
     50%  { transform: matrix(-1, 0, 0, -0.5, 0, 86.6); }
     62.5% { transform: matrix(-0.707,0.354, -0.707,-0.354,   0, 86.6); }
     62.5% { transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, 86.6); }
     75%  { transform: matrix(0,     0.5,   -1,     0,       0, 86.6); }
     75%  { transform: matrix(0, 0.5, -1, 0, 0, 86.6); }
     87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354,   0, 86.6); }
     87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354, 0, 86.6); }
     100%  { transform: matrix(1,     0,     0.707, 0.354,   0, 86.6); }
     100%  { transform: matrix(1, 0, 0.707, 0.354, 0, 86.6); }
}
}

Latest revision as of 20:55, 12 April 2026

/* Template:3DCube/styles.css
   Hardware-accelerated 2D matrix simulation of a 3D cube.
   Fully compatible with MediaWiki CSS sanitizers. */

.mw-3dcube-scene {
    width: 200px;
    height: 200px;
    position: relative;
    /* Scaling is handled inline by the template */
}

.mw-3dcube {
    width: 100%;
    height: 100%;
    position: relative;
}

.mw-3dcube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 0;
    left: 0;
    transform-origin: 50% 50%;
    overflow: hidden;
    background-color: transparent;
}

/* Force inner images to perfectly fill the face */
.mw-3dcube-face img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    object-fit: cover;
}

/* Base animations */
.mw-3dcube-front  { animation: mw-3dcube-front  8s linear infinite; }
.mw-3dcube-right  { animation: mw-3dcube-right  8s linear infinite; }
.mw-3dcube-back   { animation: mw-3dcube-back   8s linear infinite; }
.mw-3dcube-left   { animation: mw-3dcube-left   8s linear infinite; }
.mw-3dcube-top    { animation: mw-3dcube-top    8s linear infinite; z-index: 4; }
.mw-3dcube-bottom { animation: mw-3dcube-bottom 8s linear infinite; z-index: 0; }

/* Optional: pause rotation on hover */
.mw-3dcube-scene:hover .mw-3dcube-face { animation-play-state: paused; }

/* --- Orthographic 2D Matrix Keyframes --- */
@keyframes mw-3dcube-front {
    0%    { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
    12.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
    25%   { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
    37.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
    50%   { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
    62.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
    75%   { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
    87.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
    100%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
}

@keyframes mw-3dcube-right {
    0%    { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
    12.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
    25%   { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
    37.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
    50%   { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
    62.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
    75%   { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
    87.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
    100%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
}

@keyframes mw-3dcube-back {
    0%    { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
    12.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
    25%   { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
    37.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
    50%   { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
    62.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
    75%   { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
    87.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
    100%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
}

@keyframes mw-3dcube-left {
    0%    { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
    12.5% { transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
    25%   { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
    37.5% { transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
    50%   { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
    62.5% { transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
    75%   { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
    87.5% { transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
    100%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
}

@keyframes mw-3dcube-top {
    0%    { transform: matrix(1, 0, 0.707, 0.354, 0, -86.6); }
    12.5% { transform: matrix(0.707, -0.354, 0.707, 0.354, 0, -86.6); }
    25%   { transform: matrix(0, -0.5, 1, 0, 0, -86.6); }
    37.5% { transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, -86.6); }
    50%   { transform: matrix(-1, 0, 0, -0.5, 0, -86.6); }
    62.5% { transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, -86.6); }
    75%   { transform: matrix(0, 0.5, -1, 0, 0, -86.6); }
    87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354, 0, -86.6); }
    100%  { transform: matrix(1, 0, 0.707, 0.354, 0, -86.6); }
}

@keyframes mw-3dcube-bottom {
    0%    { transform: matrix(1, 0, 0.707, 0.354, 0, 86.6); }
    12.5% { transform: matrix(0.707, -0.354, 0.707, 0.354, 0, 86.6); }
    25%   { transform: matrix(0, -0.5, 1, 0, 0, 86.6); }
    37.5% { transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, 86.6); }
    50%   { transform: matrix(-1, 0, 0, -0.5, 0, 86.6); }
    62.5% { transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, 86.6); }
    75%   { transform: matrix(0, 0.5, -1, 0, 0, 86.6); }
    87.5% { transform: matrix(0.707, 0.354, -0.707, 0.354, 0, 86.6); }
    100%  { transform: matrix(1, 0, 0.707, 0.354, 0, 86.6); }
}