Template
LinesOverlay Test
From Dogcraft Wiki
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
<templatestyles src="Template:LinesOverlay_Test/styles.css" /> | <templatestyles src="Template:LinesOverlay_Test/styles.css" /> | ||
<div data-num="{{#invoke:String|count|{{{line1|}}}|,}}"></div> | <div data-num="{{#invoke:String|count|{{{line1|}}}|,}}"></div> | ||
<div id="outerLinesContainer | <div id="outerLinesContainer"> | ||
{{#invoke: String | {{#invoke: String | ||
|rep | |rep | ||
|<div class{{=}}"line" style{{=}}" | |<div class{{=}}"line" style{{=}}" | ||
transform: rotate( calc( {{#expr: (atan (({{#explode:{{#explode:{{{line1|}}}| |0}}|,|0}} - {{#explode:{{#explode:{{{line1|}}}| |1}}|,|0}}) / ({{#explode:{{#explode:{{{line1|}}}| |1}}|,|1}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|1}} + 0.00000001) )) }}rad {{#ifexpr: ({{#explode:{{#explode:{{{line1|}}}| |1}}|,|1}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|1}}) < 0 | + 180deg }} )); | transform: rotate( calc( {{#expr: (atan (({{#explode:{{#explode:{{{line1|}}}| |0}}|,|0}} - {{#explode:{{#explode:{{{line1|}}}| |1}}|,|0}}) / ({{#explode:{{#explode:{{{line1|}}}| |1}}|,|1}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|1}} + 0.00000001) )) }}rad {{#ifexpr: ({{#explode:{{#explode:{{{line1|}}}| |1}}|,|1}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|1}}) < 0 | + 180deg }} )); | ||
height: {{#expr: sqrt ((({{#explode:{{#explode:{{{line1|}}}| |1}}|,|0}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|0}}) ^ 2) + (({{#explode:{{#explode:{{{line1|}}}| |1}}|,|1}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|1}}) ^ 2 ) ) }}px; | height: {{#expr: sqrt ((({{#explode:{{#explode:{{{line1|}}}| |1}}|,|0}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|0}}) ^ 2) + (({{#explode:{{#explode:{{{line1|}}}| |1}}|,|1}} - {{#explode:{{#explode:{{{line1|}}}| |0}}|,|1}}) ^ 2 ) ) }}px; |
Revision as of 18:41, 17 March 2024
This page was last modified on 17 March 2024, at 18:41. (7 months ago)