plumcube 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/readme.md +67 -2
- data/stylesheets/_plumcube.scss +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OThlNTVjNjc2ODc3YTcwNjI5NWQwMGU5NWMwZTFmOWU4MjA1MjM5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2VhZTJlMWRiNzQ0ZGY1Yzg1MTVjY2YzMDAzMDJmYjFjMGFmNmEwYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Nzc0MDM0NjkzY2RmMDFiN2Y1M2RlZTIxZWQyNmEyOWZlYmJhMzRkYTIzZmE2
|
10
|
+
YjA1NjkxOWYxNDlkZTg5ZGFlZTJkNjM4Y2FjYTNkZWM4ZTZlYjIzYTdjY2Y3
|
11
|
+
NTY1YzdhMjJlZGI0NGZmNWEwODRjNzJkYzdhNDJhY2RmOWQ3NGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDFkZTUxNDJhYmExOGJhYWMyNDI3NGM0YzBhNDQ0YzVjOWExYWQyMzllNThm
|
14
|
+
Y2U1MDIyZmQyNTJlZTk5MzkzNTM5YWI2OTUyNGVmYjMzMDhhZWVkYzI5YmZm
|
15
|
+
OTE1Y2NkZWM2Y2VhMThmOTk1ZTdhMWI5YjgwNzA2MDUxZjFhYzQ=
|
data/readme.md
CHANGED
@@ -1,3 +1,68 @@
|
|
1
|
-
#
|
1
|
+
# plumcube
|
2
2
|
|
3
|
-
|
3
|
+
**A compass mixin for creating 3D cubes of all shapes and sizes... as long as that shape is a cube.**
|
4
|
+
|
5
|
+
## Ex-ante
|
6
|
+
|
7
|
+
If you think that Boy Scouts use [Compass](http://compass-style.org/) and Girl Scouts have [SASS](http://sass-lang.com/), you might want to click those links first. Plumcube is a Compass extension, so you'll need both SASS and Compass in order to use it. Find your [compass](http://compass-style.org/install/), get [SASS](http://sass-lang.com/download.html)-y, and you'll be good to go.
|
8
|
+
|
9
|
+
Note that the plumcube plugin relies on the 'Bleeding Edge' version of SASS, because 3D CSS animation is the Internet of the future. If you are already a SASS-y individual, be sure to check your currently installed version (`sass -v`) and upgrade to the pre-release gem (3.3.0.alpha - get it with `gem install sass --pre`) if necessary.
|
10
|
+
|
11
|
+
## Get plumcube'n
|
12
|
+
|
13
|
+
### On the command line
|
14
|
+
Install the plumcube gem with `gem install plumcube`.
|
15
|
+
|
16
|
+
### In config.rb
|
17
|
+
Add `require 'plumcube'` to the top of your config.rb file, along with calls to any other compass plugins you may be including in your project.
|
18
|
+
|
19
|
+
### In the HTML
|
20
|
+
Each face of your plumcube must be marked up as an unordered list, wrapped up in a few `<div>` elements to control the different 3D axes. The base markup for the cube is:
|
21
|
+
|
22
|
+
<div class="your-cube">
|
23
|
+
<div class="cube-z">
|
24
|
+
<div class="cube-y">
|
25
|
+
<ul class="cube-x">
|
26
|
+
<li></li>
|
27
|
+
<li></li>
|
28
|
+
<li></li>
|
29
|
+
<li></li>
|
30
|
+
<li></li>
|
31
|
+
<li></li>
|
32
|
+
</ul>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
Note that the `your-cube` class can have any name, but the `cube-z`, `cube-y`, and `cube-x` classes need to remain in place in order for your cube to render properly. You can also add any additional classes or unique identifiers to the list items, the unordered list, and/or the container elements.
|
38
|
+
|
39
|
+
### In the scss
|
40
|
+
Import compass and plumcube:
|
41
|
+
|
42
|
+
@import "compass/css3;"
|
43
|
+
@import "plumcube";
|
44
|
+
|
45
|
+
Include the plumcube mixin in the styles of the outermost wrapper element. The plumcube mixin parameters are:
|
46
|
+
|
47
|
+
@mixin plumcube($x, $y, $z, $perspective, $origin);
|
48
|
+
|
49
|
+
/* ====================================================================================
|
50
|
+
where
|
51
|
+
$x = cube width, in pixels
|
52
|
+
$y = cube length, in pixels
|
53
|
+
$z = cube depth, in pixels
|
54
|
+
$perspective = distance of shape from screen along z-axis
|
55
|
+
(smaller numbers create more shape/perspective distortion)
|
56
|
+
$origin = defines the origin of the 3D perspective
|
57
|
+
(see https://developer.mozilla.org/en-US/docs/Web/CSS/perspective-origin
|
58
|
+
for all possible values)
|
59
|
+
==================================================================================== */
|
60
|
+
|
61
|
+
If you wanted a cube 200px x 200px x 200px, with a perspective of 1200px originating at the center of the cube, your code would look like:
|
62
|
+
|
63
|
+
.your-cube {
|
64
|
+
@include plumcube(200, 200, 200, 1200, 50%); /* cube it up */
|
65
|
+
margin: 100px 26%;
|
66
|
+
}
|
67
|
+
|
68
|
+
### Stay tuned for the next installment, in which I actually attempt to sit down and focus for long enough to complete these instructions!
|
data/stylesheets/_plumcube.scss
CHANGED
@@ -8,7 +8,7 @@ cube it up
|
|
8
8
|
================================================== */
|
9
9
|
@mixin plumcube($x, $y, $z, $perspective, $origin) {
|
10
10
|
@include perspective($perspective+px);
|
11
|
-
@include perspective-origin($origin
|
11
|
+
@include perspective-origin($origin);
|
12
12
|
width: $x + px;
|
13
13
|
height: $z + px;
|
14
14
|
.cube-z, .cube-y, .cube-x {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plumcube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephanie Plumeri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|