Użytkownik:DudeValenzetti/Kostka: Różnice pomiędzy wersjami

Z Nonsensopedii, polskiej encyklopedii humoru
(Tworzę kostkę)
 
(Dokumentacja (po angielsku) i dostosowanie boku 4)
 
(Nie pokazano 1 pośredniej wersji utworzonej przez tego samego użytkownika)
Linia 6: Linia 6:


<div style="perspective:600px"><!--Perspective container-->
<div style="perspective:600px"><!--Perspective container-->
<div style="margin:3em auto;transform-style:preserve-3d;width:200px;height:200px;font-size:60px;line-height:200px;transform:rotateX({{#expr: {{Get}} mod 1000}}deg) rotateY({{#expr: {{Get}} div 1000 mod 1000}}deg)">
<div style="margin:3em auto;transform-style:preserve-3d;width:200px;height:200px;font-size:60px;line-height:200px;transform:rotateX({{#expr: {{Get}} mod 1000}}deg) rotateY({{#expr: {{Get}} div 1000 mod 1000}}deg)"><!--Cube core div: this stores the rotation of the cube-->
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:translateZ(100px)">1</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:translateZ(100px)">1</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateX(90deg) translateZ(100px)">2</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateX(90deg) translateZ(100px)">2</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateY(90deg) translateZ(100px)">3</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateY(90deg) translateZ(100px)">3</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateX(-90deg) translateZ(100px)">5</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateX(-90deg) translateZ(100px)">5</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateY(-90deg) translateZ(100px)">4</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateY(-90deg) rotateZ(180deg) translateZ(100px)">4</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateX(180deg) translateZ(100px)">6</div>
<div style="position:absolute;text-align:center;border:1px solid black;width:200px;height:200px;background:rgba(129,134,138,0.6);transform:rotateX(180deg) translateZ(100px)">6</div><!--These divs are the sides of the cube-->
</div>
</div>
</div>
</div>


{| cellspacing=0 cellpadding=0 style="box-shadow:0px 3px 3px rgba(0,0,0,0.26),0px 0px 6px rgba(0,0,0,0.13);text-align:center;margin:1em auto 0em;font-size:16px;line-height:50px;width:400px"
{| cellspacing=0 cellpadding=0 style="box-shadow:0px 3px 3px rgba(0,0,0,0.26),0px 0px 6px rgba(0,0,0,0.13);text-align:center;margin:1em auto 0em;font-size:16px;line-height:50px;width:400px"
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 > 45|{{#expr: {{Get}} - 45}}|{{#expr: {{Get}} + 315}} }}|-45||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 >= 45|{{#expr: {{Get}} - 45}}|{{#expr: {{Get}} + 315}} }}|-45||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 > 15|{{#expr: {{Get}} - 15}}|{{#expr: {{Get}} + 345}} }}|-15||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 >= 15|{{#expr: {{Get}} - 15}}|{{#expr: {{Get}} + 345}} }}|-15||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 > 5|{{#expr: {{Get}} - 5}}|{{#expr: {{Get}} + 355}} }}|-5||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 >= 5|{{#expr: {{Get}} - 5}}|{{#expr: {{Get}} + 355}} }}|-5||color:black}}°
| style="width:25%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | x: {{#expr: {{Get}} mod 1000}}°
| style="width:25%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | x: {{#expr: {{Get}} mod 1000}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 < 355 |{{#expr: {{Get}} + 5}}|{{#expr: {{Get}} - 355}} }}|5||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12);border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 < 355 |{{#expr: {{Get}} + 5}}|{{#expr: {{Get}} - 355}} }}|5||color:black}}°
Linia 25: Linia 25:
| style="width:12.5%;height:50px;border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 < 315 |{{#expr: {{Get}} + 45}}|{{#expr: {{Get}} - 315}} }}|45||color:black}}°
| style="width:12.5%;height:50px;border-bottom:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} mod 1000 < 315 |{{#expr: {{Get}} + 45}}|{{#expr: {{Get}} - 315}} }}|45||color:black}}°
|-
|-
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 > 45|{{#expr: {{Get}} - 45000}}|{{#expr: {{Get}} + 315000}} }}|-45||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 >= 45|{{#expr: {{Get}} - 45000}}|{{#expr: {{Get}} + 315000}} }}|-45||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 > 15|{{#expr: {{Get}} - 15000}}|{{#expr: {{Get}} + 345000}} }}|-15||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 >= 15|{{#expr: {{Get}} - 15000}}|{{#expr: {{Get}} + 345000}} }}|-15||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 > 5|{{#expr: {{Get}} - 5000}}|{{#expr: {{Get}} + 355000}} }}|-5||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 >= 5|{{#expr: {{Get}} - 5000}}|{{#expr: {{Get}} + 355000}} }}|-5||color:black}}°
| style="width:25%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | y: {{#expr: {{Get}} div 1000 mod 1000}}°
| style="width:25%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | y: {{#expr: {{Get}} div 1000 mod 1000}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 < 355|{{#expr: {{Get}} + 5000}}|{{#expr: {{Get}} - 355000}} }}|5||color:black}}°
| style="width:12.5%;height:50px;border-right:1px solid rgba(0,0,0,0.12)" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 < 355|{{#expr: {{Get}} + 5000}}|{{#expr: {{Get}} - 355000}} }}|5||color:black}}°
Linia 33: Linia 33:
| style="width:12.5%;height:50px;" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 < 315|{{#expr: {{Get}} + 45000}}|{{#expr: {{Get}} - 315000}} }}|45||color:black}}°
| style="width:12.5%;height:50px;" | {{Idź|{{#ifexpr:{{Get}} div 1000 mod 1000 < 315|{{#expr: {{Get}} + 45000}}|{{#expr: {{Get}} - 315000}} }}|45||color:black}}°
|}
|}
<!--Implementation: The last three digits of the offset store rotateX (the pitch, in degrees: up/down). The first three digits store rotateY (the yaw, in degrees: up/down). The movement links change their respective digits of the offset and keep it between 0° and 359° for each axis.-->

</div>
</div>
</div>
</div>

Aktualna wersja na dzień 23:25, 8 maj 2018

Wypociny: Kostka sześcienna
niedziela, 24 listopada 2024 – 01:53

Obracaj sobie kostkę. Zaimplementowane na offsetach. Wymagana w miarę nowa przeglądarka.

1
2
3
5
4
6
-45° -15° -5° x: 0° 5° 15° 45°
-45° -15° -5° y: 0° 5° 15° 45°