Horizontal and Vertical Shading Projection Prototype

Developer
Size
3,131 Kb
Views
8,096

How do I make an horizontal and vertical shading projection prototype?

Prototype experiment using CSS3 3D transforms and DIVs to simulate parametric analysis of horizontal and vertical shading devices on a fenestration.. What is a horizontal and vertical shading projection prototype? How do you make a horizontal and vertical shading projection prototype? This script and codes were developed by Jeremy Gayed on 29 September 2022, Thursday.

Horizontal and Vertical Shading Projection Prototype Previews

Horizontal and Vertical Shading Projection Prototype - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Horizontal and Vertical Shading Projection Prototype</title> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="shading-widget"> <div class="wall"> <div class="shading horizontal"> </div> <div class="window"> </div> </div> </div> <div id="sliders"></div> <div class="shading-widget"> <div class="wall"> <div class="shading vertical"> </div> <div class="shading vertical opposite"> </div> <div class="window"> </div> </div> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Horizontal and Vertical Shading Projection Prototype - Script Codes CSS Codes

.shading-widget { transition: all 2s ease; transform-style: preserve-3d; transform: perspective(1000px) rotateX(-20deg) rotateY(45deg) rotateZ(0deg); border: 2px solid grey; height: 200px; width: 200px; margin: 50px 100px;
}
.shading-widget .window { opacity: 0.2; font-size: 90%; margin: 0 auto; text-align: center;
}
.shading-widget .wall { background: lightblue; height: 100%; width: 100%;
}
.shading-widget .shading { width: 100%; height: 55%; background: grey; border: 1px solid black; transform-origin: 0 0; transform: rotateX(90deg);
}
.shading-widget .shading.vertical { height: 100%; transform: rotateY(-90deg);
}
.shading-widget .shading.vertical.opposite { background: silver; transform: rotateY(-90deg) translate3d(0, -100%, -200px);
}
.ui-slider { width: 450px;
}
.label { padding: 10px 0; color: grey;
}

Horizontal and Vertical Shading Projection Prototype - Script Codes JS Codes

var $s = $('#sliders'), $shading = $('.shading'), $sw = $('.shading-widget') ;
function placeValues(str, val) { return str.replace(new RegExp('%v', 'g'), val);
}
function compileCss(inputCss, val) { var css = {}; for(var prop in inputCss) { css[prop] = placeValues(inputCss[prop], val); } return css;
}
function createSlider(label, cssProp, $which) { $('<div />') .insertAfter($which.parent().parent()) .append('<div class="slider" />') .slider({ value: 1, slide: function( event, ui ) { var css = {}; css[label] = cssProp; $which.css(compileCss(css, ui.value)); } }) .parent() ;
}
function createSliders(cssProps, $which) { cssProps.forEach(function(prop) { for (var p in prop) { createSlider(p, prop[p], $which); } });
}
$(document).ready(function() { // horizontal createSliders([ {height: '%v%'}, //{transform: 'rotateX(%vdeg)'} ], $('.shading.horizontal')); // vertical createSliders([ {width: '%v%'}, //{transform: 'rotateY(-%vdeg)'} ], $('.shading.vertical'));
});
Horizontal and Vertical Shading Projection Prototype - Script Codes
Horizontal and Vertical Shading Projection Prototype - Script Codes
Home Page Home
Developer Jeremy Gayed
Username tizmagik
Uploaded September 29, 2022
Rating 3
Size 3,131 Kb
Views 8,096
Do you need developer help for Horizontal and Vertical Shading Projection Prototype?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jeremy Gayed (tizmagik) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!