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
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Template:3DCube/style.css */
/* Template:3DCube/style.css
/* 2D Affine Matrix Engine for True 3D Simulation */
  cc: shorthand term for "CSS Cube", modular and transparent */


.scene {
.cc-scene {
width: 200px;
    margin: 25px auto;
height: 200px;
margin: 100px auto;
position: relative;
}
}


.cube {
.cc-cube {
width: 100%;
    width: 100%;
height: 100%;
    height: 100%;
position: relative;
    position: relative;
}
}


.cube-face {
.cc-center {
position: absolute;
    animation: cc-3DSpin 12s linear infinite;
width: 200px;
    width: 100%;
height: 200px;
    height: 100%;
top: 0;
left: 0;
transform-origin: 50% 50%;
}
}


/* Bind each face to its pre-calculated 3D matrix projection */
.cc-side {
.face-front  { animation: wall-front  8s linear infinite; }
    position: absolute;
.face-right  { animation: wall-right  8s linear infinite; }
    width: 100%;
.face-back  { animation: wall-back  8s linear infinite; }
    height: 100%;
.face-left  { animation: wall-left  8s linear infinite; }
   
.face-top    { animation: face-top    8s linear infinite; z-index: 4; }
    background-color: transparent;  
.face-bottom { animation: face-bottom 8s linear infinite; z-index: 0; }
    outline: 1px solid rgba(200, 200, 200, 0.5);  
 
   
/* =========================================
    display: flex;
  PRE-CALCULATED 3D -> 2D MATRIX KEYFRAMES
    justify-content: center;
  ========================================= */
    align-items: center;
 
    text-align: center;
@keyframes wall-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 wall-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 wall-back {
/*
0%   { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
   Target ONLY the standard MediaWiki image wrappers.
12.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
  This removes white backgrounds on images, but leaves
25%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
  audio/video player buttons safe and visible!
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; }
.cc-side a.image,
62.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
.cc-side figure {
75%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
    background: transparent !important;
87.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
    background-color: transparent !important;
100% { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
}


@keyframes wall-left {
/* Ensures images and videos automatically scale to fit the cube */
0%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
.cc-side img,
12.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
.cc-side video {
25%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
    width: 100%;
37.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
    height: 100%;
50%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
    object-fit: contain;  
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 face-top {
/* Spin animation */
0%  { transform: matrix(1, 0, 0, 0.5, 0, -86.6); }
@keyframes cc-3DSpin {
12.5%{ transform: matrix(0.707, -0.354, 0.707, 0.354, 0, -86.6); }
    from { transform: rotate(0deg); }
25%  { transform: matrix(0, -0.5, 1, 0, 0, -86.6); }
    to  { transform: rotate(360deg); }
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, 0.5, 0, -86.6); }
}
}


@keyframes face-bottom {
/* Optional text styling */
0%  { transform: matrix(1, 0, 0, 0.5, 0, 86.6); }
.cc-text {
12.5%{ transform: matrix(0.707, -0.354, 0.707, 0.354, 0, 86.6); }
    margin: 0;
25%  { transform: matrix(0, -0.5, 1, 0, 0, 86.6); }
    font-family: 'Georgia', serif;
37.5%{ transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, 86.6); }
    font-size: 3em;
50%  { transform: matrix(-1, 0, 0, -0.5, 0, 86.6); }
    line-height: 1;
62.5%{ transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, 86.6); }
    font-weight: bold;
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, 0.5, 0, 86.6); }
}
}

Latest revision as of 21:00, 13 April 2026

/* Template:3DCube/style.css
   cc: shorthand term for "CSS Cube", modular and transparent */

.cc-scene {
    margin: 25px auto;
}

.cc-cube {
    width: 100%;
    height: 100%;
    position: relative;
}

.cc-center {
    animation: cc-3DSpin 12s linear infinite;
    width: 100%;
    height: 100%;
}

.cc-side {
    position: absolute;
    width: 100%;
    height: 100%;
    
    background-color: transparent; 
    outline: 1px solid rgba(200, 200, 200, 0.5); 
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 
  Target ONLY the standard MediaWiki image wrappers.
  This removes white backgrounds on images, but leaves 
  audio/video player buttons safe and visible! 
*/
.cc-side a.image,
.cc-side figure {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensures images and videos automatically scale to fit the cube */
.cc-side img,
.cc-side video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

/* Spin animation */
@keyframes cc-3DSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Optional text styling */
.cc-text {
    margin: 0;
    font-family: 'Georgia', serif;
    font-size: 3em;
    line-height: 1;
    font-weight: bold;
}