geo_pattern 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -90,10 +90,6 @@ You can then use this string to set the background:
90
90
 
91
91
  ![](http://jasonlong.github.io/geo_pattern/examples/triangles.png)
92
92
 
93
- ### triangles_rotated
94
-
95
- ![](http://jasonlong.github.io/geo_pattern/examples/triangles_rotated.png)
96
-
97
93
  ### squares
98
94
 
99
95
  ![](http://jasonlong.github.io/geo_pattern/examples/squares.png)
@@ -24,7 +24,6 @@ module GeoPattern
24
24
  tessellation
25
25
  nested_squares
26
26
  mosaic_squares
27
- triangles_rotated
28
27
  chevrons
29
28
  ].freeze
30
29
 
@@ -538,50 +537,6 @@ module GeoPattern
538
537
  end
539
538
  end
540
539
 
541
- def geo_triangles_rotated
542
- scale = hex_val(0, 1)
543
- side_length = map(scale, 0, 15, 15, 80)
544
- triangle_width = side_length/2 * Math.sqrt(3)
545
- triangle = build_rotated_triangle_shape(side_length, triangle_width)
546
-
547
- svg.set_width(triangle_width * 6)
548
- svg.set_height(side_length * 3)
549
-
550
- i = 0
551
- for y in 0..5
552
- for x in 0..5
553
- val = hex_val(i, 1)
554
- opacity = opacity(val)
555
- fill = fill_color(val)
556
-
557
- styles = {
558
- "fill" => fill,
559
- "fill-opacity" => opacity,
560
- "stroke" => STROKE_COLOR,
561
- "stroke-opacity" => STROKE_OPACITY
562
- }
563
-
564
- rotation = ""
565
- if y % 2 == 0
566
- rotation = x % 2 == 0 ? 180 : 0
567
- else
568
- rotation = x % 2 != 0 ? 180 : 0
569
- end
570
-
571
- svg.polyline(triangle, styles.merge({
572
- "transform" => "translate(#{triangle_width*x}, #{y*side_length*0.5 - side_length/2}) rotate(#{rotation}, #{triangle_width/2}, #{side_length/2})"}))
573
-
574
- # Add an extra one at top-right, for tiling.
575
- if (y == 0)
576
- svg.polyline(triangle, styles.merge({
577
- "transform" => "translate(#{triangle_width*x}, #{6*side_length*0.5 - side_length/2}) rotate(#{rotation}, #{triangle_width/2}, #{side_length/2})"}))
578
-
579
- end
580
- i += 1
581
- end
582
- end
583
- end
584
-
585
540
  def geo_diamonds
586
541
  diamond_width = map(hex_val(0, 1), 0, 15, 10, 50)
587
542
  diamond_height = map(hex_val(1, 1), 0, 15, 10, 50)
@@ -1,3 +1,3 @@
1
1
  module GeoPattern
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_pattern
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-06 00:00:00.000000000 Z
12
+ date: 2014-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: color