HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
audio#audio
source(src="https://raw.githubusercontent.com/ricardoolivaalonso/recursos/master/radio/radio.mp3",type="audio/mpeg")
audio#audio2
source(src="https://raw.githubusercontent.com/ricardoolivaalonso/Codepen/master/Bedroom/sounds/librero.mp3",type="audio/mpeg")
audio#audio3
source(src="https://raw.githubusercontent.com/ricardoolivaalonso/Codepen/master/Bedroom/sounds/repisa.mp3",type="audio/mpeg")
audio#audio4
source(src="https://raw.githubusercontent.com/ricardoolivaalonso/Codepen/master/Bedroom/sounds/buro.mp3",type="audio/mpeg")
//---------------------
div.shadows.rb
div.shadow6
div.shadow5
div.shadow4
div.shadow1
div.shadow2
div.shadow3
//---------------------
div.room.rb
//---------------------
div.at
div.at__front.face
div.at__back.face
div.at__right.face
div.at__left.face
div.at__top.face
div.os.os1
div.os.os2
div.ws1.ws
div.ws2.ws
div.ws3.ws
div.ws4.ws
div.ws5.ws
div.ws6.ws
div.ws7.ws
div.at__bottom.face
div.ab
div.ab__front.face
div.ab__back.face
div.ab__right.face
div.ab__left.face
div.ab__top.face
div.ab__bottom.face
div.bb
div.bb__front.face
div.os.os1
div.os.os2
div.bb__back.face
div.bb__right.face
div.bb__left.face
div.bb__top.face
div.bb__bottom.face
div.bt
div.bt__front.face
div.bt__back.face
div.bt__right.face
div.bt__left.face
div.bt__top.face
div.bt__bottom.face
div.bbl
div.bbl__front.face
div.bbl__back.face
div.bbl__right.face
div.bbl__left.face
div.bbl__top.face
div.bbl__bottom.face
div.bbr
div.bbr__front.face
div.bbr__back.face
div.bbr__right.face
div.bbr__left.face
div.bbr__top.face
div.bbr__bottom.face
div.bl
div.bl__front.face
div.bl__back.face
div.bl__right.face
div.os0
div.os.os1
div.os.os2
div.os.os3
div.os.os4
div.os.os5
div.os.os6
div.bl__left.face
div.os.os1
div.bl__top.face
div.bl__bottom.face
//---------------------
div.ventana
div.ventana__back.face
div.lg.lg1
div.lg.lg2
div.vs.vs1
div.vs.vs2
div.vs.vs3
div.vs.vs4
div.ventana-l
div.ventana-l__front.face
div.ventana-l__back.face
div.ventana-l__right.face
div.ventana-l__left.face
div.ventana-l__top.face
div.ventana-l__bottom.face
div.ventana-c
div.ventana-c__front.face
div.ventana-c__back.face
div.ventana-c__right.face
div.ventana-c__left.face
div.ventana-c__top.face
div.ventana-c__bottom.face
div.ventana-r
div.ventana-r__front.face
div.ventana-r__back.face
div.ventana-r__right.face
div.ventana-r__left.face
div.ventana-r__top.face
div.ventana-r__bottom.face
div.ventana-t
div.ventana-t__front.face
div.ventana-t__back.face
div.ventana-t__right.face
div.ventana-t__left.face
div.ventana-t__top.face
div.ventana-t__bottom.face
div.ventana-b
div.ventana-b__front.face
div.ventana-b__back.face
div.ventana-b__right.face
div.ventana-b__left.face
div.ventana-b__top.face
div.ventana-b__bottom.face
//---------------------
div.cama
div.fs
div.cama-al
div.cama-al__front.face
div.cama-al__back.face
div.cama-al__right.face
div.cama-al__left.face
div.cama-al__top.face
div.cama-al__bottom.face
div.cama-ac
div.cama-ac__front.face
div.cama-ac__back.face
div.cama-ac__right.face
div.cama-ac__left.face
div.cama-ac__top.face
div.cama-ac__bottom.face
div.cama-ar
div.cama-ar__front.face
div.cama-ar__back.face
div.cama-ar__right.face
div.cama-ar__left.face
div.cama-ar__top.face
div.cama-ar__bottom.face
div.cama-bc
div.cama-bc__front.face
div.cama-bc__back.face
div.cama-bc__right.face
div.cama-bc__left.face
div.cama-bc__top.face
div.cama-bc__bottom.face
div.cama-almos
div.cama-almo
div.cama-almo__sh.face
div.cama-almo__front.face
div.cama-almo__back.face
div.cama-almo__right.face
div.cama-almo__left.face
div.cama-almo__top.face
div.cama-almo__bottom.face
div.cama-almo
div.cama-almo__sh.face
div.cama-almo__front.face
div.cama-almo__back.face
div.cama-almo__right.face
div.cama-almo__left.face
div.cama-almo__top.face
div.cama-almo__bottom.face
//---------------------
div.repisa
div.repisa-base
div.repisa-t
div.repisa-t__front.face
div.repisa-t__back.face
div.repisa-t__right.face
div.repisa-t__left.face
div.repisa-t__top.face
div.repisa-t__bottom.face
div.repisa-b
div.repisa-b__front.face
div.repisa-b__back.face
div.repisa-b__right.face
div.repisa-b__left.face
div.repisa-b__top.face
div.repisa-b__bottom.face
div.repisa-l
div.repisa-l__front.face
div.repisa-l__back.face
div.repisa-l__right.face
div.repisa-l__left.face
div.repisa-l__top.face
div.repisa-l__bottom.face
div.repisa-r
div.repisa-r__front.face
div.repisa-r__back.face
div.repisa-r__right.face
div.repisa-r__left.face
div.repisa-r__top.face
div.repisa-r__bottom.face
div.repisa-c
div.repisa-c__front.face
div.repisa-c__back.face
div.repisa-c__right.face
div.repisa-c__left.face
div.repisa-c__top.face
div.repisa-c__bottom.face
div.repisa-puertas#repisa
div.repisa-puerta.repisa-p
div.repisa-puerta__front.face
div.repisa-puerta__back.face
div.repisa-puerta__right.face
div.repisa-puerta__left.face
div.repisa-puerta__top.face
div.repisa-puerta__bottom.face
div.repisa-puerta
div.repisa-puerta__front.face
div.repisa-puerta__back.face
div.repisa-puerta__right.face
div.repisa-puerta__left.face
div.repisa-puerta__top.face
div.repisa-puerta__bottom.face
//---------------------
div.buro#buro
div.fs
div.buro-t
div.buro-t__front.face
div.buro-t__back.face
div.buro-t__right.face
div.buro-t__left.face
div.buro-t__top.face
div.buro-t__bottom.face
div.buro-b
div.buro-b__front.face
div.buro-b__back.face
div.buro-b__right.face
div.buro-b__left.face
div.buro-b__top.face
div.buro-b__bottom.face
div.buro-c
div.buro-c__front.face
div.buro-c__back.face
div.buro-c__right.face
div.buro-c__left.face
div.buro-c__top.face
div.buro-c__bottom.face
div.buro-l
div.buro-l__front.face
div.buro-l__back.face
div.buro-l__right.face
div.buro-l__left.face
div.buro-l__top.face
div.buro-l__bottom.face
div.buro-r
div.buro-r__front.face
div.buro-r__back.face
div.buro-r__right.face
div.buro-r__left.face
div.buro-r__top.face
div.buro-r__bottom.face
div.buro-puertas
div.buro-puerta
div.buro-puerta__front.face
div.buro-puerta__back.face
div.buro-puerta__right.face.flex
div.manija
div.manija__front.face
div.manija__back.face
div.manija__right.face
div.manija__left.face
div.manija__top.face
div.manija__bottom.face
div.buro-puerta__left.face
div.buro-puerta__top.face
div.buro-puerta__bottom.face
div.buro-puerta
div.buro-puerta__front.face
div.buro-puerta__back.face
div.buro-puerta__right.face.flex
div.manija
div.manija__front.face
div.manija__back.face
div.manija__right.face
div.manija__left.face
div.manija__top.face
div.manija__bottom.face
div.buro-puerta__left.face
div.buro-puerta__top.face
div.buro-puerta__bottom.face
//---------------------
div.bocina#bocina
div.fs
div.bocina-l.bocina-a
div.bocina-l__front.face
div.bocina-l__back.face
div.bocina-l__right.face
div.bocina-l__left.face
div.bocina-l__top.face
div.oocina-l__bottom.face
div.bocina-stereo
div.bocina-stereo__front.face
div.bocina-stereo__back.face
div.bocina-stereo__right.face
div.bocina-stereo__left.face
div.bocina-stereo__top.face
div.bocina-stereo__bottom.face
div.bocina-r.bocina-a
div.bocina-r__front.face
div.bocina-r__back.face
div.bocina-r__right.face
div.bocina-r__left.face
div.bocina-r__top.face
div.oocina-r__bottom.face
//---------------------
div.libros
div.libro.libro--azul
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--verde
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--amarillo
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--azul
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--azul
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--verde
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--blanco
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--azul
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--azul
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--azul
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--amarillo
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--azul
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
div.libro.libro--verde
div.libro__front.face
div.libro__back.face
div.libro__right.face
div.libro__left.face
div.libro__top.face
div.libro__bottom.face
//---------------------
div.sillon
div.fs
div.sillon-l
div.sillon-l__front.face
div.sillon-l__back.face
div.sillon-l__right.face
div.sillon-l__left.face
div.sillon-l__top.face
div.sillon-l__bottom.face
div.sillon-r
div.sillon-r__front.face
div.sillon-r__back.face
div.sillon-r__right.face
div.sillon-r__left.face
div.sillon-r__top.face
div.sillon-r__bottom.face
div.sillon-c
div.sillon-c__front.face
div.sillon-c__back.face
div.sillon-c__right.face
div.sillon-c__left.face
div.sillon-c__top.face
div.sillon-c__bottom.face
div.sillon-c2
div.sillon-c2__front.face
div.sillon-c2__back.face
div.sillon-c2__right.face
div.sillon-c2__left.face
div.sillon-c2__top.face
div.sillon-c2__bottom.face
div.sillon-b
div.sillon-b__front.face
div.sillon-b__back.face
div.sillon-b__right.face
div.sillon-b__left.face
div.sillon-b__top.face
div.sillon-b__bottom.face
div.sillon-b2
div.sillon-b2__front.face
div.sillon-b2__back.face
div.sillon-b2__right.face
div.sillon-b2__left.face
div.sillon-b2__top.face
div.sillon-b2__bottom.face
//---------------------
div.libreros
div.librero
div.fs
div.librero-t
div.librero-t__front.face
div.librero-t__back.face
div.librero-t__right.face
div.librero-t__left.face
div.librero-t__top.face
div.librero-t__bottom.face
div.librero-b
div.librero-b__front.face
div.librero-b__back.face
div.librero-b__right.face
div.librero-b__left.face
div.librero-b__top.face
div.librero-b__bottom.face
div.librero-m1
div.librero-m1__front.face
div.librero-m1__back.face
div.librero-m1__right.face
div.librero-m1__left.face
div.librero-m1__top.face
div.librero-m1__bottom.face
div.librero-m2
div.librero-m2__front.face
div.librero-m2__back.face
div.librero-m2__right.face
div.librero-m2__left.face
div.librero-m2__top.face
div.librero-m2__bottom.face
div.librero-m3
div.librero-m3__front.face
div.librero-m3__back.face
div.librero-m3__right.face
div.librero-m3__left.face
div.librero-m3__top.face
div.librero-m3__bottom.face
div.librero-l
div.librero-l__front.face
div.librero-l__back.face
div.librero-l__right.face
div.librero-l__left.face
div.librero-l__top.face
div.librero-l__bottom.face
div.librero-l1
div.librero-l1__front.face
div.librero-l1__back.face
div.librero-l1__right.face
div.librero-l1__left.face
div.librero-l1__top.face
div.librero-l1__bottom.face
div.librero-l2
div.librero-l2__front.face
div.librero-l2__back.face
div.librero-l2__right.face
div.librero-l2__left.face
div.librero-l2__top.face
div.librero-l2__bottom.face
div.librero-l3
div.librero-l3__front.face
div.librero-l3__back.face
div.librero-l3__right.face
div.librero-l3__left.face
div.librero-l3__top.face
div.librero-l3__bottom.face
div.librero-r
div.librero-r__front.face
div.librero-r__back.face
div.librero-r__right.face
div.librero-r__left.face
div.librero-r__top.face
div.librero-r__bottom.face
div.librero#librero
div.fs
div.librero-base
div.librero-t
div.librero-t__front.face
div.librero-t__back.face
div.librero-t__right.face
div.librero-t__left.face
div.librero-t__top.face
div.librero-t__bottom.face
div.librero-b
div.librero-b__front.face
div.librero-b__back.face
div.librero-b__right.face
div.librero-b__left.face
div.librero-b__top.face
div.librero-b__bottom.face
div.librero-m1
div.librero-m1__front.face
div.librero-m1__back.face
div.librero-m1__right.face
div.librero-m1__left.face
div.librero-m1__top.face
div.librero-m1__bottom.face
div.librero-m2
div.librero-m2__front.face
div.librero-m2__back.face
div.librero-m2__right.face
div.librero-m2__left.face
div.librero-m2__top.face
div.librero-m2__bottom.face
div.librero-m3
div.librero-m3__front.face
div.librero-m3__back.face
div.librero-m3__right.face
div.librero-m3__left.face
div.librero-m3__top.face
div.librero-m3__bottom.face
div.librero-l
div.librero-l__front.face
div.librero-l__back.face
div.librero-l__right.face
div.librero-l__left.face
div.librero-l__top.face
div.librero-l__bottom.face
div.librero-r1
div.librero-r1__front.face
div.librero-r1__back.face
div.librero-r1__right.face.flex
div.manija
div.manija__front.face
div.manija__back.face
div.manija__right.face
div.manija__left.face
div.manija__top.face
div.manija__bottom.face
div.librero-r1__left.face
div.librero-r1__top.face
div.librero-r1__bottom.face
div.librero-r2
div.librero-r2__front.face
div.librero-r2__back.face
div.librero-r2__right.face.flex
div.manija
div.manija__front.face
div.manija__back.face
div.manija__right.face
div.manija__left.face
div.manija__top.face
div.manija__bottom.face
div.librero-r2__left.face
div.librero-r2__top.face
div.librero-r2__bottom.face
div.librero-r3
div.librero-r3__front.face
div.librero-r3__back.face
div.librero-r3__right.face.flex
div.manija
div.manija__front.face
div.manija__back.face
div.manija__right.face
div.manija__left.face
div.manija__top.face
div.manija__bottom.face
div.librero-r3__left.face
div.librero-r3__top.face
div.librero-r3__bottom.face
div.librero-r
div.librero-r__front.face
div.librero-r__back.face
div.librero-r__right.face
div.librero-r__left.face
div.librero-r__top.face
div.librero-r__bottom.face
div.arbustos
div.fs
div.arbusto.flex.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto.flex.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto-el.flex.face
div.arbusto-el__front.face
div.arbusto-el__back.face
div.arbusto-el__right.face
div.arbusto-el__left.face
div.arbusto-el__top.face
div.arbusto-el__bottom.face
div.arbusto2.flex.face
div.arbusto2-el.flex.face
div.arbusto2-el__front.face
div.arbusto2-el__back.face
div.arbusto2-el__right.face
div.arbusto2-el__left.face
div.arbusto2-el__top.face
div.arbusto2-el__bottom.face
div.arbusto2-el.flex.face
div.arbusto2-el__front.face
div.arbusto2-el__back.face
div.arbusto2-el__right.face
div.arbusto2-el__left.face
div.arbusto2-el__top.face
div.arbusto2-el__bottom.face
div.arbusto2-el.flex.face
div.arbusto2-el__front.face
div.arbusto2-el__back.face
div.arbusto2-el__right.face
div.arbusto2-el__left.face
div.arbusto2-el__top.face
div.arbusto2-el__bottom.face
div.arbusto2-el.flex.face
div.arbusto2-el__front.face
div.arbusto2-el__back.face
div.arbusto2-el__right.face
div.arbusto2-el__left.face
div.arbusto2-el__top.face
div.arbusto2-el__bottom.face
div.maceta
div.fs
div.maceta-base
- let n = 0
while n < 15
div.maceta-hoja
- n++
div.maceta-l
div.maceta-l__front.face
div.maceta-l__back.face
div.maceta-l__right.face
div.maceta-l__left.face
div.maceta-l__top.face
div.maceta-l__bottom.face
div.maceta-r
div.maceta-r__front.face
div.maceta-r__back.face
div.maceta-r__right.face
div.maceta-r__left.face
div.maceta-r__top.face
div.maceta-r__bottom.face
div.maceta-t
div.maceta-t__front.face
div.maceta-t__back.face
div.maceta-t__right.face
div.maceta-t__left.face
div.maceta-t__top.face
div.maceta-t__bottom.face
div.maceta-b
div.maceta-b__front.face
div.maceta-b__back.face
div.maceta-b__right.face
div.maceta-b__left.face
div.maceta-b__top.face
div.maceta-b__bottom.face
:root {
--bg1: #8DD9E7;
--bg2: #86C6D3;
--bg3: #5C8F9B;
--floor1: #EBE4D1;
--floor2: #c9c5b3;
--floor3: #bab6a6;
--floor4: #a49e82;
--wall1: #E3EAF0;
--wall2: #CCD8DD;
--wall2b: #c0ccd0;
--wall2c: #b1bec2;
--wall3: #9aadb5;
--wood1: #FEEFCD;
--wood2: #E8CFA9;
--wood3: #CDAC8C;
--wood3b: #bfa183;
--wood4: #a48669;
--wood5: #996951;
--white1: #EDEDE4;
--white2: #D9DFD4;
--white3: #c3c9be;
--white4: #aeb4a9;
--blue1: #4F8FC0;
--blue2: #4383b4;
--blue3: #3473a3;
--blue4: #27618c;
--black1: #474747;
--black2: #393939;
--black3: #222222;
--black4: #1a1a1a;
--green1: #89B863;
--green2: #6faa40;
--green3: #59a11f;
--yellow1: #e9e35a;
--yellow2: #dbd54d;
--yellow3: #d5ce32;
}
/***********************/
/***********************/
@mixin cube($width, $height, $depth) {
&__front{ @include cube-front($width, $height, $depth); }
&__back{ @include cube-back($width, $height, $depth); }
&__right{ @include cube-right($width, $height, $depth); }
&__left{ @include cube-left($width, $height, $depth); }
&__top{ @include cube-top($width, $height, $depth);}
&__bottom{ @include cube-bottom($width, $height, $depth); }
}
/************************/
/* Mixin para crear cubo ( Caras siempre al frente ) */
/************************/
@mixin cube-front($width, $height, $depth) {
width: $width;
height: $height;
transform-origin: bottom left;
transform: rotateX(-90deg) translateZ( -($height - ($depth * 2) ) );
}
@mixin cube-back($width, $height, $depth) {
width: $width;
height: $height;
transform-origin: top left;
transform: rotateX(-90deg) rotateY(180deg) translateX(-$width) translateY(-$height) ;
}
@mixin cube-right($width, $height, $depth) {
width: $depth * 2;
height: $height;
transform-origin: top left;
transform: rotateY(90deg) rotateZ(-90deg) translateZ($width) translateX(-$depth * 2) translateY(-$height);
}
@mixin cube-left($width, $height, $depth) {
width: $depth * 2;
height: $height;
transform-origin: top left;
transform: rotateY(-90deg) rotateZ(90deg) translateY(-$height);
}
@mixin cube-top($width, $height, $depth) {
width: $width;
height: $depth * 2;
transform-origin: top left;
transform: translateZ($height) ;
}
@mixin cube-bottom($width, $height, $depth) {
width: $width;
height: $depth * 2;
transform-origin: top left;
transform: rotateY(180deg) translateX(-$width);
}
/************************/
/* Mixin para crear rueda */
/************************/
@mixin wheel($width-el, $height-el, $depth-el) {
width: $width-el;
height: $height-el;
&__front{
width: $width-el * .425;
height: $depth-el;
transform: rotateX(-90deg) translateZ($height-el / 2);
}
&__back{
width: $width-el * .425;
height: $depth-el;
transform: rotateX( 90deg) translateZ($height-el / 2);
}
&__top{
width: $width-el * .425;
height: $height-el ;
transform: rotateY(0deg) translateZ($depth-el / 2);
}
&__bottom{
width: $width-el * .425;
height: $height-el;
transform: rotateY(180deg) translateZ($depth-el / 2);
}
&__right{
width: $depth-el ;
height: $height-el ;
transform: rotateY(90deg) translateZ($width-el / 5.1);
}
&__left{
width: $depth-el;
height: $height-el;
transform: rotateY(90deg) translateZ(-$width-el / 5.1);
}
&:nth-of-type(2){ transform: rotateZ(45deg); }
&:nth-of-type(3){ transform: rotateZ(90deg); }
&:nth-of-type(4){ transform: rotateZ(135deg); }
}
/***********************/
/***********************/
@mixin cube-color($color) {
&__front{ background-color: darken($color, 14); }
&__back{ background-color: darken($color, 7); }
&__right{ background-color: $color; }
&__left{ background-color: darken($color, 14); }
&__top{ background-color: darken($color, 7); }
&__bottom{ background-color: darken($color, 14); }
}
/***********************/
/***********************/
@mixin face-ani($animation, $time, $side, $width-el, $height-el, $depth-el) {
animation: #{$animation} #{$time} infinite ease;
@keyframes #{$animation} {
0%, 15%, 45%, 60%, 62%, 68%{
@if $side == "cube-front" { @include cube-front($width-el, $height-el, $depth-el); }
@else if $side == "cube-back" { @include cube-back($width-el, $height-el, $depth-el); }
@else if $side == "cube-right" { @include cube-right($width-el, $height-el, $depth-el); }
@else if $side == "cube-left" { @include cube-left($width-el, $height-el, $depth-el); }
@else if $side == "cube-top" { @include cube-top($width-el, $height-el, $depth-el); }
}
20%, 40%, 58%, 64%, 70%, 100%{
@if $side == "cube-front" { @include cube-front($width-el, $height-finish, $depth-el); }
@else if $side == "cube-back" { @include cube-back($width-el, $height-finish, $depth-el); }
@else if $side == "cube-right" { @include cube-right($width-el, $height-finish, $depth-el); }
@else if $side == "cube-left" { @include cube-left($width-el, $height-finish, $depth-el); }
@else if $side == "cube-top" { @include cube-top($width-el, $height-finish, $depth-el); }
}
}
}
/**/
*, *::after, *::before {
margin: 0;
padding: 0;
box-sizing: border-box;
user-select: none;
transform-style: preserve-3d;
-webkit-tap-highlight-color: transparent;
user-select: none;
outline: none;
appearance: none;
}
/* Generic */
body{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
background-color: var(--bg1);
overflow: hidden;
}
.face{ position: absolute; }
.flex{
display: flex;
justify-content: center;
align-items: center;
}
/***************/
/***************/
.room,
.shadows{
position: absolute;
width: 30vw;
height: 45vw;
transform:
perspective(10000px)
rotateX(60deg)
rotateZ(55deg)
translateZ(-8vw)
;
transition: transform 100ms linear ;
}
.shadow{
&1,
&2,
&3,
&4,
&5,
&6
{
position: absolute;
top: 0vw;
left: 0vw;
background-color: var(--bg3);
filter: blur(.25vw);
}
&1{
width: 30.25vw;
height: 37.25vw;
}
&2{
top: 37vw;
left: 15vw;
width: 15.25vw;
height: 8.25vw;
}
&3,
&4{
width: 12.25vw;
height: 37.25vw;
left: -12vw;
background-color: transparent;
background-image: linear-gradient(to left, var(--bg3), var(--bg2) );
}
&4{
width: 25vw;
height: 1.25vw;
top: 37vw;
left: -10vw;
filter: blur(1vw);
opacity: .75;
}
&5{
top: -2vw;
left: 27vw;
width: 5vw;
height: 5vw;
background-color: transparent;
background-image: radial-gradient(circle, var(--bg3), var(--bg2) 80%, transparent);
border-radius: 50%;
filter: blur(1vw);
opacity: .5;
}
&6{
top: 45vw;
left: 15vw;
width: 15.25vw;
height: 1.25vw;
background-color: transparent;
background-image: linear-gradient(to bottom, var(--bg3), var(--bg2) 80%, transparent);
transform-origin: bottom right;
filter: blur(1vw);
opacity: .75;
}
}
.os{
position: absolute;
filter: blur(.2vw);
background-image: linear-gradient(to bottom, var(--floor2), transparent);
}
.fs{
position: absolute;
width: 115%;
height: 110%;
background-image: linear-gradient( to bottom, var(--floor3), var(--floor4), var(--floor4) );
filter: blur(.175vw);
}
.lg{
position: absolute;
width: 5vw;
height: 150%;
transform: rotateZ(20deg);
background-image: linear-gradient( to right, transparent, var(--white2), transparent );
opacity: .35;
filter: blur(.5vw);
}
/***************/
/***************/
.at{
$width-el: 30vw;
$height-el: .6vw;
$depth-el: 18.5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 0vw;
left: 0vw;
width: 30vw;
height: 37vw;
&__top{
overflow: hidden;
.os1{
width: 6vw;
height: 100%;
background-image: linear-gradient(to right, var(--floor3), transparent);
}
.os2{
width: 100%;
height: 6vw;
}
.ws{
position: absolute;
filter: blur(.45vw);
background-color: var(--floor2);
transform: skewX(-5deg);
}
.ws1,
.ws2,
.ws3{
left: 1.5vw;
top: 1.5vw;
width: 5vw;
height: 20vw;
}
.ws2{ left: 27vw; }
.ws3{ left: 52%; width: .5vw; }
.ws4,
.ws5{
left: 1.5vw;
top: 1.5vw;
width: 28vw;
height: 6vw;
}
.ws5{ top: 15.75vw; }
.ws6{
left: 9vw;
top: 1.5vw;
width: 14vw;
height: 10vw;
}
.ws7{
right: 2vw;
top: 1.5vw;
width: 3vw;
height: 6vw;
}
}
}
.ab{
$width-el: 15vw;
$height-el: .6vw;
$depth-el: 4vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 37vw;
right: 0vw;
width: 15vw;
height: 8vw;
}
.at,
.ab{
&__front{ background-color: var(--wall3); }
&__back{ background-color: var(--wall2); }
&__right{ background-color: var(--wall2); }
&__left{ background-color: var(--wall2c); }
&__top{ background-color: var(--floor1); }
&__bottom{ background-color: var(--wall3); }
}
/********/
.bb,
.bbl,
.bbr,
.bt{
$width-el: 28.5vw;
$height-el: 3vw;
$depth-el: .75vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 0;
left: 1.5vw;
width: 28.5vw;
height: 1.5vw;
transform: translateZ(.6vw);
&__front{
background-color: var(--wall2b);
.os1{
width: 100%;
height: 100%;
bottom: 0;
background-image: linear-gradient(to top, var(--wall2c), transparent);
}
.os2{
width: 100%;
height: 1vw;
bottom: 0;
background-image: linear-gradient(to top, var(--wall3), transparent);
}
}
&__back{
.os1{
width: 100%;
height: 6vw;
bottom: 0;
background-image: linear-gradient(to top, var(--wall2b), transparent);
}
}
}
.bt{ transform: translateZ(12.6vw); }
.bbl,
.bbr{
$width-el: 3vw;
$height-el: 9vw;
$depth-el: .75vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 0;
left: 1.5vw;
width: 3vw;
height: 1.5vw;
transform: translateZ(3.6vw);
}
.bbr{ left: 27vw; }
.bl{
$width-el: 1.5vw;
$height-el: 15vw;
$depth-el: 18.5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 0;
left: 0;
width: 1.5vw;
height: 37vw;
transform: translateZ(.6vw);
&__front{ background-color: var(--wall3); }
&__right{
overflow: hidden;
.os0{
position: absolute;
width: 50%;
height: 200%;
bottom: -74%;
left: 72%;
transform: rotateZ(55deg);
background-image: linear-gradient(to top, var(--wall2), var(--wall2b));
}
.os1{
width: 100%;
height: 10vw;
bottom: 0;
background-image: linear-gradient(to top, var(--wall2b), var(--wall2b) , transparent);
}
.os2{
width: 100%;
height: 1vw;
bottom: 0;
background-image: linear-gradient(to top, var(--wall3), var(--wall2b));
}
.os3{
width: 10.25vw;
height: 4.25vw;
bottom: 0;
left: 1.75vw;
background-image: linear-gradient(to top, var(--wall3), var(--wall2c));
}
.os4{
width: 8.25vw;
height: 5vw;
top: 2.5vw;
left: 2.75vw;
background-image: linear-gradient(to top, var(--wall3), var(--wall2c));
}
.os5{
width: 4.5vw;
height: 4.5vw;
bottom: 0;
left: 12vw;
background-image: linear-gradient(to top, var(--wall3), var(--wall2c));
}
.os6{
width: 19.5vw;
height: 12.35vw;
bottom: 0;
right: 1.25vw;
background-image: linear-gradient(to top, var(--wall2c), var(--wall2c));
}
}
&__left{
.os1{
width: 100%;
height: 6vw;
bottom: 0;
background-image: linear-gradient(to top, var(--wall2c), transparent);
}
}
}
.bb,
.bt,
.bbl,
.bbr,
.bl{
&__back{ background-color: var(--wall2); }
&__right{ background-color: var(--wall2); }
&__left{ background-color: var(--wall2b); }
&__top{ background-color: var(--wall1); }
&__bottom{ background-color: var(--wall3); }
}
.bb{
&__top{ background-color: var(--wall2); }
}
.ventana{
$width-el: 22.5vw;
$height-el: 9vw;
$depth-el: .75vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 0;
left: 4.5vw;
width: 22.5vw;
height: 1.5vw;
transform: translateZ(3.6vw);
&__back{
top: .75vw;
background-image: radial-gradient(var(--bg2),var(--bg3));
opacity: .5;
overflow: hidden;
.lg1{
left: 60%;
}
.lg2{
width: 15vw;
left: -20%;
border-radius: 50%;
}
.vs{
position: absolute;
opacity: .65;
filter: blur(.25vw);
}
.vs1{
width: 4vw;
height: 100%;
right: 0;
background-image: linear-gradient(to right, var(--wood1),var(--wood3));
}
.vs2{
width: 14vw;
height: 2vw;
right: 4.5vw;
bottom: 0;
background-image: linear-gradient(to right, var(--blue1),var(--blue1));
}
.vs3{
width: 6vw;
height: 6vw;
right: 4.5vw;
top: -2vw;
border-radius: 50%;
background-image: radial-gradient(circle, var(--bg1),var(--bg1));
filter: blur(.35vw);
}
.vs4{
width: 2.5vw;
height: 2vw;
bottom: 0;
background-image: radial-gradient(circle, var(--white1),var(--white1));
opacity: .5;
}
}
&-l,
&-c,
&-r{
$width-el: .5vw;
$height-el: 9vw;
$depth-el: .25vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: .5vw;
width: .5vw;
height: .5vw;
&__front{ background-color: var(--white1); }
&__back{ background-color: var(--white1); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white2); }
&__top{ background-color: var(--white1); }
&__bottom{ background-color: var(--white1); }
}
&-l{ left: 0;}
&-c{ left: 50%;}
&-r{ right: 0;}
&-b,
&-t{
$width-el: 22vw;
$height-el: .5vw;
$depth-el: .25vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
left: .5vw;
top: .5vw;
width: 22vw;
height: .5vw;
&__front{ background-color: var(--white1); }
&__back{ background-color: var(--white1); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white2); }
&__top{ background-color: var(--white2); }
&__bottom{ background-color: var(--white1); }
}
&-t{ transform: translateZ(8.5vw);}
}
/***************/
.cama{
position: absolute;
top: 25vw;
left: 1.75vw;
width: 15vw;
height: 10vw;
transform: translateZ(.6vw);
.fs{
width: 102%;
height: 102%;
background-image: linear-gradient( to bottom, var(--floor2), var(--floor2) );
}
&-al{
$width-el: .75vw;
$height-el: 4vw;
$depth-el: 5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 0;
left: 0;
width: .75vw;
height: 10vw;
}
&-ac{
$width-el: 13.5vw;
$height-el: 1vw;
$depth-el: 4.5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: .5vw;
left: .75vw;
width: 13.5vw;
height: 9vw;
transform: translateZ(.5vw);
}
&-ar{
$width-el: .75vw;
$height-el: 2.5vw;
$depth-el: 5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: 0;
right: 0;
width: .75vw;
height: 10vw;
}
&-al,
&-ac,
&-ar{
&__front{ background-color: var(--wood3); }
&__back{ background-color: var(--wood2); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood2); }
&__top{ background-color: var(--wood1); }
&__bottom{ background-color: var(--wood3); }
}
&-ac{ &__top{ background-image: linear-gradient(to top, var(--wood4), var(--wood2)); } }
&-al{ &__right{ background-image: linear-gradient(to bottom, var(--wood2) 60%, var(--wood3)); } }
&-bc{
$width-el: 13.2vw;
$height-el: 1vw;
$depth-el: 4.4vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
top: .6vw;
left: .9vw;
width: 13.2vw;
height: 8.8vw;
transform: translateZ(1.6vw);
&__front{ background-image: linear-gradient(to right, var(--white3) 40%, var(--bg3) 40%); }
&__back{ background-image: linear-gradient(to left, var(--white2) 40%, var(--bg2) 40%); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white1); }
&__top{ background-image: linear-gradient(to right, var(--white1) 40%, var(--bg1) 40%); }
&__bottom{ background-color: var(--white3); }
}
&-almos{
position: absolute;
top: .5vw;
left: 1vw;
height: 9vw;
width: 3vw;
transform: translateZ(2.6vw);
padding: .25vw;
}
&-almo{
$width-el: 2.5vw;
$height-el: .35vw;
$depth-el: 2vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 2.5vw;
height: 3.5vw;
&:nth-of-type(2){ bottom: .75vw; transform: rotateZ(-10deg); }
&__front{ background-color: var(--white3); }
&__back{ background-color: var(--white2); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white1); }
&__top{ background-color: var(--white1); }
&__bottom{ background-color: var(--white3); }
&__sh{
position: absolute;
top: -5%;
width: 110%;
height: 120%;
background-color: var(--wall2c);
filter: blur(.125vw);
}
}
}
/***************/
.repisa{
position: absolute;
left: 1.5vw;
top: 26vw;
width: 2.5vw;
height: 8vw;
transform: translateZ(10vw);
cursor: pointer;
&-base{
position: absolute;
left: .1vw;
width: 3vw;
height: 8vw;
background-color: var(--white4);
transform-origin: bottom left;
transform: rotateY(-90deg);
}
&-b,
&-t{
$width-el: 2.5vw;
$height-el: .25vw;
$depth-el: 4vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 4vw;
height: 8vw;
&__front{ background-color: var(--white3); }
&__back{ background-color: var(--white1); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white2); }
&__top{ background-color: var(--white1); }
&__bottom{ background-color: var(--white4); }
}
&-t{ transform: translateZ(3vw); }
&-l,
&-c,
&-r{
$width-el: 2.5vw;
$height-el: 2.75vw;
$depth-el: .125vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 4vw;
height: .25vw;
transform: translateZ(.25vw);
&__front{ background-color: var(--white3); }
&__back{ background-color: var(--white1); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white2); }
&__top{ background-color: var(--white2); }
&__bottom{ background-color: var(--white4); }
}
&-l{
bottom: 0;
&__back{ background-color: var(--white3); }
}
&-c{
bottom: calc(50% - .125vw);
&__back{ background-color: var(--white3); }
&__right{ background-color: var(--white3); }
}
&-puertas{
width: 100%;
height: 100%;
}
&-puerta{
$width-el: .25vw;
$height-el: 3.25vw;
$depth-el: 1.95vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: .25vw;
height: 3.9vw;
left: 100%;
transition: transform .3s linear ;
transform-origin: bottom left;
&__front{ background-color: var(--white3); }
&__back{ background-color: var(--white1); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white3); }
&__top{ background-color: var(--white1); }
&__bottom{ background-color: var(--white4); }
&:nth-of-type(2){ bottom: 0; }
}
}
.is-repisa-open{
transform: rotateZ(40deg);
transform-origin: bottom left;
transition: transform .5s linear;
}
/***************/
.buro{
position: absolute;
left: 1.5vw;
top: 20.5vw;
width: 3vw;
height: 4vw;
transform: translateZ(.6vw);
cursor: pointer;
&-b,
&-c,
&-t{
$width-el: 3vw;
$height-el: .25vw;
$depth-el: 2vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 3vw;
height: 5vw;
&__front{ background-color: var(--wood3); }
&__back{ background-color: var(--wood1); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood2); }
&__top{ background-color: var(--wood2); }
&__bottom{ background-color: var(--wood4); }
}
&-b{
&__top{ background-color: var(--wood3b); }
}
&-t{
transform: translateZ(4vw);
&__top{ background-color: var(--wood1); }
}
&-c{
transform: translateZ(2vw);
&__top{ background-color: var(--wood3b); }
&__right{ background-color: var(--wood3b); }
}
&-l,
&-r{
$width-el: 3vw;
$height-el: 4.25vw;
$depth-el: .125vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: .25vw;
height: 5vw;
&__front{ background-color: var(--wood4); }
&__back{ background-color: var(--wood1); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood2); }
&__top{ background-color: var(--wood1); }
&__bottom{ background-color: var(--wood4); }
}
&-l{
top: 100%;
&__back{ background-color: var(--wood3); }
&__front{ background-color: var(--wood3); }
}
&-puerta{
$width-el: .25vw;
$height-el: 2vw;
$depth-el: 2.125vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: .25vw;
height: 4.25vw;
left: 100%;
transform: translateZ(0.125vw);
&__front{ background-color: var(--wood3); }
&__back{ background-color: var(--wood1); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood3); }
&__top{ background-color: var(--wood1); }
&__bottom{ background-color: var(--wood4); }
&:nth-of-type(2){ transform: translateZ(2.25vw);}
}
}
/***************/
.bocina{
position: absolute;
left: 2.75vw;
top: 21vw;
width: .5vw;
height: 3vw;
transform: translateZ(5vw);
display: flex;
flex-direction: column;
justify-content: space-between;
cursor: pointer;
&-l,
&-r{
$width-el: .5vw;
$height-el: 1.75vw;
$depth-el: .3vw;
@include cube($width-el, $height-el, $depth-el);
width: .5vw;
height: .5vw;
&__front{ background-color: var(--black3); }
&__back{ background-color: var(--black1); }
&__right{ background-color: var(--black2); }
&__left{ background-color: var(--black2); }
&__top{ background-color: var(--black2); }
&__bottom{ background-color: var(--black3); }
}
&-stereo{
$width-el: .5vw;
$height-el: .75vw;
$depth-el: .75vw;
@include cube($width-el, $height-el, $depth-el);
width: .5vw;
height: 1.5vw;
&__front{ background-color: var(--black3); }
&__back{ background-color: var(--black1); }
&__right{
background-color: var(--black2);
display: flex;
justify-content: center;
align-items: center;
&::before{
content: '';
position: absolute;
width: .25vw;
height: .25vw;
border-radius: 50%;
background-color: var(--white1);
}
}
&__left{ background-color: var(--black2); }
&__top{ background-color: var(--black2); }
&__bottom{ background-color: var(--black3); }
}
}
.is-bocina-active{ animation: bocina .5s ease infinite;}
@keyframes bocina {
0%, 10%, 50%{ transform: translateZ(0);}
40%, 60%, 90%, 100%{ transform: translateZ(-.05vw);}
}
.is-librero-open{
transform: rotateZ(30deg);
transform-origin: bottom left;
transition: transform .5s linear;
}
.libro{
position: absolute;
width: 2vw;
height: .5vw;
$width-el: 2vw;
$height-el: 2vw;
$depth-el: .25vw;
@include cube($width-el, $height-el, $depth-el);
cursor: pointer;
&:nth-of-type(1){
left: 1.9vw;
top: 10vw;
transform: translateZ(6.9vw);
}
&:nth-of-type(2){
left: 2vw;
top: 9.45vw;
transform: translateZ(6.8vw);
}
&:nth-of-type(3){
left: 2vw;
top: 8.9vw;
transform: translateZ(6.8vw);
}
&:nth-of-type(4){
left: 2vw;
top: 8vw;
transform: translateZ(6.9vw) rotateX(-8deg);
}
&:nth-of-type(5){
left: 1.9vw;
top: 6.5vw;
transform: translateZ(6.9vw) rotateX(-8deg);
}
&:nth-of-type(6){
left: 2vw;
top: 5.9vw;
transform: translateZ(6.9vw) rotateX(-10deg);
}
&:nth-of-type(7){
left: 2.1vw;
top: 5.3vw;
transform: translateZ(6.9vw) rotateX(-12deg);
}
&:nth-of-type(8){
left: 2vw;
top: 2vw;
transform: translateZ(7vw) rotateX(-90deg);
}
&:nth-of-type(9){
left: 2.1vw;
top: 10vw;
transform: translateZ(3.9vw);
}
&:nth-of-type(10){
left: 2vw;
top: 9.45vw;
transform: translateZ(3.8vw);
}
&:nth-of-type(11){
left: 1.9vw;
top: 8.9vw;
transform: translateZ(3.8vw);
}
&:nth-of-type(12){
left: 2vw;
top: 8vw;
transform: translateZ(3.9vw) rotateX(-8deg);
}
&:nth-of-type(13){
left: 2.05vw;
top: 7.5vw;
transform: translateZ(3.9vw) rotateX(-8deg);
}
transition: left 1s;
&:hover{
left: 4vw;
transition: left 1s;
}
&--azul{
.libro__front{ background-color: var(--blue3); }
.libro__back{ background-color: var(--blue3); }
.libro__right{ background-color: var(--blue2); }
.libro__left{ background-color: var(--white3); }
.libro__top{ background-color: var(--white2); }
.libro__bottom{ background-color: var(--white2); }
}
&--verde{
.libro__front{ background-color: var(--green3); }
.libro__back{ background-color: var(--green3); }
.libro__right{ background-color: var(--green2); }
.libro__left{ background-color: var(--white3); }
.libro__top{ background-color: var(--white2); }
.libro__bottom{ background-color: var(--white2); }
}
&--amarillo{
.libro__front{ background-color: var(--bg3); }
.libro__back{ background-color: var(--bg3); }
.libro__right{ background-color: var(--bg2); }
.libro__left{ background-color: var(--white3); }
.libro__top{ background-color: var(--white2); }
.libro__bottom{ background-color: var(--white2); }
}
&--blanco{
.libro__front{ background-color: var(--white3); }
.libro__back{ background-color: var(--white3); }
.libro__right{ background-color: var(--white3); }
.libro__left{ background-color: var(--white3); }
.libro__top{ background-color: var(--white2); }
.libro__bottom{ background-color: var(--white2); }
}
}
/***************/
.librero{
position: absolute;
left: 1.5vw;
top: 11vw;
width: 3vw;
height: 9vw;
transform: translateZ(.6vw);
cursor: pointer;
&:nth-of-type(1) { top: 1.5vw; }
&-base{
position: absolute;
left: .1vw;
width: 12vw;
height: 9vw;
background-color: var(--wood4);
transform-origin: bottom left;
transform: rotateY(-90deg);
}
&-b,
&-m1,
&-m2,
&-m3,
&-t{
$width-el: 3vw;
$height-el: .25vw;
$depth-el: 4.5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 3vw;
height: 9vw;
&__front{ background-color: var(--wood3); }
&__back{ background-color: var(--wood1); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood2); }
&__top{ background-color: var(--wood3); }
&__bottom{ background-color: var(--wood4); }
}
&-m1{
transform: translateZ(3vw);
}
&-m2{
transform: translateZ(6vw);
}
&-m3{
transform: translateZ(9vw);
}
&-t{
transform: translateZ(12vw);
&__top{ background-image: linear-gradient(60deg, var(--wood1) 36%, var(--wood2) 40%); }
}
&-l,
&-r{
$width-el: 3vw;
$height-el: 12.25vw;
$depth-el: .125vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: .25vw;
height: 5vw;
&__front{ background-color: var(--wood3b); }
&__back{ background-color: var(--wood1); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood2); }
&__top{ background-color: var(--wood1); }
&__bottom{ background-color: var(--wood4); }
}
&-r{
&__top{ background-color: var(--wood2); }
}
&-l{
top: 100%;
&__back{ background-color: var(--wood3); }
&__front{ background-color: var(--wood3); }
}
&-l1,
&-l2,
&-l3,
&-l4{
$width-el: 3vw;
$height-el: 3vw;
$depth-el: .125vw;
@include cube($width-el, $height-el, $depth-el);
top: calc(50% - .125vw);
position: absolute;
width: .25vw;
height: 5vw;
transform: translateZ(3vw);
&__front{ background-color: var(--wood3b); }
&__back{ background-color: var(--wood3b); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood2); }
&__top{ background-color: var(--wood1); }
&__bottom{ background-color: var(--wood4); }
}
&-l2{
transform: translateZ(6vw);
top: calc(33% - .125vw);
}
&-l3{
transform: translateZ(6vw);
top: calc(66% - .125vw);
}
&-l4{
transform: translateZ(9vw);
top: calc(50% - .125vw);
}
&-r1,
&-r2,
&-r3{
$width-el: .25vw;
$height-el: 12.25vw;
$depth-el: 1.45vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
left: 3vw;
width: .25vw;
height: 3vw;
&__front{ background-color: var(--wood3b); }
&__back{ background-color: var(--wood3b); }
&__right{ background-color: var(--wood2); }
&__left{ background-color: var(--wood2); }
&__top{ background-color: var(--wood1); }
&__bottom{ background-color: var(--wood4); }
}
&-r1{
transition: transform .5s linear;
transform-origin: bottom left;
}
&-r2{
top: calc(33% + .075vw);
}
&-r3{
bottom: calc(0% - .125vw);
}
&:nth-of-type(2) {
.librero-t .librero-t__top{ background-image: linear-gradient(55deg, var(--wood1) 40%, var(--wood1) 40%); }
.librero-r .librero-r__top{ background-color: var(--wood1); }
}
}
.sillon{
position: absolute;
left: 9vw;
top: 2vw;
width: 14vw;
height: 4vw;
transform: translateZ(.6vw);
.fs{ width: 100%; }
&-l,
&-c,
&-c2,
&-r{
$width-el: 1vw;
$height-el: 3vw;
$depth-el: 2vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 1vw;
height: 4vw;
&__front{ background-color: var(--blue3); }
&__back{ background-color: var(--blue3); }
&__right{ background-color: var(--blue2); }
&__left{ background-color: var(--blue3); }
&__top{ background-color: var(--blue1); }
&__bottom{ background-color: var(--blue3); }
}
&-r{
right: 0;
}
&-c,
&-c2{
left: 1vw;
$width-el: 5.95vw;
$height-el: 2vw;
$depth-el: 1.95vw;
@include cube($width-el, $height-el, $depth-el);
}
&-c2{ left: 7vw; }
&-b,
&-b2{
$width-el: 5.95vw;
$height-el: 4.5vw;
$depth-el: .5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 5.95vw;
height: 1vw;
left: 1vw;
transform: rotateX(10deg);
&__front{ background-color: var(--blue3); }
&__back{ background-color: var(--blue3); }
&__right{ background-color: var(--blue2); }
&__left{ background-color: var(--blue2); }
&__top{ background-color: var(--blue1); }
&__bottom{ background-color: var(--blue3); }
}
&-b2{ left: 7vw; }
}
.arbustos{
transform: rotateZ(25deg);
width: 1vw;
height: 3.5vw;
position: absolute;
left: 22vw;
top: 40vw;
transform: rotateZ(26deg) translateZ(.6vw);
.fs{
left: -.5vw;
top: -.75vw;
opacity: .5;
}
}
.arbusto,
.arbusto2{
position: absolute;
transform: translateZ(.6vw) rotateX(90deg) rotateZ(22.5deg);
&:nth-of-type(2){ top: 2.5vw;}
&-el{
$width: 1vw;
$height: $width;
$depth: .75vw;
@include wheel($width, $height, $depth);
&__front{ background-color: var(--black3); }
&__back{ background-color: var(--black2); }
&__right{ background-color: var(--black3); }
&__left{ background-color: var(--black2); }
&__top{ background-color: var(--black1); }
&__bottom{ background-color: var(--black3); }
}
}
.arbusto2{
top: 1.25vw;
&-el{
$width: .25vw;
$height: $width;
$depth: 2.5vw;
@include wheel($width, $height, $depth);
&__front{ background-color: var(--floor3); }
&__back{ background-color: var(--floor2); }
&__right{ background-color: var(--floor3); }
&__left{ background-color: var(--floor2); }
&__top{ background-color: var(--floor1); }
&__bottom{ background-color: var(--floor3); }
}
}
.maceta{
position: absolute;
right: 2vw;
top: 2vw;
width: 3vw;
height: 3vw;
transform: translateZ(.61vw);
&-base{
position: absolute;
left: .5vw;
top: .5vw;
width: 2vw;
height: 2vw;
transform: translateZ(1.5vw);
background-color: var(--white1);
}
&-hoja{
position: absolute;
width: .5vw;
height: 1.35vw;
border-radius: 50%;
transform: translateZ(.85vw) rotateX(90deg) rotateY(-25deg);
background-color: var(--green1);
&:nth-of-type(1){
left: .1vw; top: .1vw;
transform: translateZ(.8vw) rotateX(90deg) rotateY(-65deg);
}
&:nth-of-type(2){
left: .5vw; top: .2vw;
background-color: var(--green2);
}
&:nth-of-type(3){
left: .95vw; top: 0vw;
transform: translateZ(.75vw) rotateX(90deg) rotateY(-30deg);
background-color: var(--green3);
}
&:nth-of-type(4){
left: 1.25vw; top: .4vw;
background-color: var(--green2);
}
&:nth-of-type(5){ left: 1.5vw; top: .6vw; }
&:nth-of-type(6){
left: .35vw; top: .56vw;
transform: translateZ(.65vw) rotateX(90deg) rotateY(-55deg);
}
&:nth-of-type(7){ left: .55vw; top: 1.46vw; }
&:nth-of-type(8){
left: .935vw; top: 1.2vw;
transform: translateZ(.75vw) rotateX(90deg) rotateY(-40deg);
}
&:nth-of-type(9){
left: 1vw; top: 1.2vw;
background-color: var(--green3);
}
&:nth-of-type(10){
left: 1.5vw; top: 0vw;
transform: translateZ(.85vw) rotateX(90deg) rotateY(-65deg);
background-color: var(--green3);
}
&:nth-of-type(11){
left: .1vw; top: .1vw;
transform: translateZ(.5vw) rotateX(90deg) rotateY(-85deg);
}
&:nth-of-type(12){
left: .5vw; top: .2vw;
background-color: var(--green2);
}
&:nth-of-type(13){
left: .95vw; top: 0vw;
transform: translateZ(.75vw) rotateX(90deg) rotateY(90deg);
background-color: var(--green3);
}
&:nth-of-type(14){
left: 1.25vw; top: .4vw;
transform: translateZ(.5vw) rotateX(90deg) rotateY(90deg);
}
&:nth-of-type(15){
left: 1.35vw; top: .6vw;
transform: translateZ(.75vw) rotateX(90deg) rotateY(-100deg);
background-color: var(--green2);
}
}
&-l,
&-r{
$width-el: .5vw;
$height-el: 2vw;
$depth-el: 1.5vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: .5vw;
height: 3vw;
&__front{ background-color: var(--white3); }
&__back{ background-color: var(--white3); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white3); }
&__top{ background-color: var(--white1); }
&__bottom{ background-color: var(--white3); }
}
&-r{ right: 0; }
&-b,
&-t{
$width-el: 2vw;
$height-el: 2vw;
$depth-el: .25vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
left: .5vw;
width: 2vw;
height: .5vw;
&__front{ background-color: var(--white3); }
&__back{ background-color: var(--white3); }
&__right{ background-color: var(--white2); }
&__left{ background-color: var(--white3); }
&__top{ background-color: var(--white1); }
&__bottom{ background-color: var(--white3); }
}
&-b{ bottom: 0; }
}
.manija{
$width-el: 1vw;
$height-el: .25vw;
$depth-el: .125vw;
@include cube($width-el, $height-el, $depth-el);
position: absolute;
width: 1vw;
height: .25vw;
&__front{ background-color: var(--white3); }
&__back{ background-color: var(--white1); }
&__right{ background-color: var(--white1); }
&__left{ background-color: var(--white3); }
&__top{ background-color: var(--white2); }
&__bottom{ background-color: var(--white3); }
}
/*
Designed by: Allen·Z
Original image: https://dribbble.com/shots/6377158-My-Home-1-4
*/
let bocina = document.querySelector("#bocina");
let bocinaA = document.querySelectorAll(".bocina-a");
let librero = document.querySelector("#librero");
let libreroPuerta = document.querySelector(".librero-r1");
let repisa = document.querySelector("#repisa");
let repisaPuerta = document.querySelector(".repisa-p");
let buro = document.querySelector("#buro");
let a = document.querySelector("#audio");
let a2 = document.querySelector("#audio2");
let a3 = document.querySelector("#audio3");
let a4 = document.querySelector("#audio4");
/*******************/
let radioTocando = () => {
bocinaA[0].classList.toggle('is-bocina-active')
bocinaA[1].classList.toggle('is-bocina-active')
a.loop = true;
if (a.paused) a.play();
else {
a.pause();
a.currentTime = 0;
}
}
let libreroAbiero = () => {
libreroPuerta.classList.toggle('is-librero-open')
a2.loop = false;
if (a2.paused) a2.play();
else {
a2.pause();
a2.currentTime = 0;
}
}
let repisaAbierto = () => {
repisaPuerta.classList.toggle('is-repisa-open')
a3.loop = false;
if (a3.paused) a3.play();
else {
a3.pause();
a3.currentTime = 0;
}
}
let buroAbierto = () => {
a4.loop = false;
if (a4.paused) a4.play();
else {
a4.pause();
a4.currentTime = 0;
}
}
/*******************/
bocina.addEventListener("click", radioTocando)
librero.addEventListener("click", libreroAbiero)
repisa.addEventListener("click", repisaAbierto)
buro.addEventListener("click", buroAbierto)
Also see: Tab Triggers