atome 0.5.6.6.0 → 0.5.6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/atome/genesis/particles/material.rb +1 -0
- data/lib/atome/genesis/sparkle.rb +0 -1
- data/lib/atome/version.rb +1 -1
- data/lib/renderers/html/html.rb +12 -0
- data/lib/renderers/html/material.rb +5 -1
- data/vendor/assets/application/examples/fill.rb +17 -0
- data/vendor/assets/application/examples/test.rb +3 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48cee602f2cd349974871fde44b32bafb512e38eaa9c9b0206f0bbead1336092
|
4
|
+
data.tar.gz: cd531edc3f602e907a21fab41249021a1e096c5045b41654780927a85bfbe94f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97920b22233d015e31d819acf7f4ca2dcc9300c24d8a395f99b05d0e6c20d97a60c9604f68423a009dac9adf723c9cea3d463ac6380fb9fc62c32b40cbc40948
|
7
|
+
data.tar.gz: f736aae0c6cfbe55daf4a9a6083e33eb769ba00d2e129c53001f792335a829614e69cf06ba568c48cfc46e3deec0ca3f8295f02c6be509cc6c6d789ce4c77ab4
|
data/lib/atome/version.rb
CHANGED
data/lib/renderers/html/html.rb
CHANGED
@@ -495,6 +495,18 @@ class HTML
|
|
495
495
|
end
|
496
496
|
end
|
497
497
|
|
498
|
+
def fill(params)
|
499
|
+
atome_path= grab(params[:atome]).path
|
500
|
+
@element[:style][:backgroundImage] = "url('#{atome_path}')"
|
501
|
+
@element[:style][:backgroundRepeat] = 'repeat'
|
502
|
+
# @element[:style][:backgroundPosition] = '0 0, 110px 110px'
|
503
|
+
# @element[:style][:backgroundPosition] = "99px 0px"
|
504
|
+
# background-size: auto auto;
|
505
|
+
# @element[:style][:backgroundSize] = "cover"
|
506
|
+
@element[:style][:backgroundSize] = "#{params[:width]}px #{params[:height]}px"
|
507
|
+
|
508
|
+
end
|
509
|
+
|
498
510
|
def filter(property, value)
|
499
511
|
filter_needed = "#{property}(#{value})"
|
500
512
|
@element[:style][:filter] = filter_needed
|
@@ -72,4 +72,8 @@ end
|
|
72
72
|
new({ method: :thickness, type: :integer, renderer: :html})
|
73
73
|
|
74
74
|
# end
|
75
|
-
new({ method: :pattern, type: :integer, renderer: :html})
|
75
|
+
new({ method: :pattern, type: :integer, renderer: :html})
|
76
|
+
|
77
|
+
new({ method: :fill, renderer: :html }) do |params|
|
78
|
+
html.fill(params)
|
79
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
b=box({width: 300, height: 333})
|
4
|
+
image({id: :logo,path: 'medias/images/logos/atome.svg', width: 66, left: 555})
|
5
|
+
grab(:black_matter).image({id: :planet,path: 'medias/images/red_planet.png', width: 66,height: 66, left: 555, top: 180})
|
6
|
+
|
7
|
+
|
8
|
+
new({particle: :fill})
|
9
|
+
|
10
|
+
new({ method: :fill, renderer: :html }) do |params|
|
11
|
+
html.fill(params)
|
12
|
+
end
|
13
|
+
b.fill({atome: :logo, width: 33, height: 33 })
|
14
|
+
|
15
|
+
wait 1 do
|
16
|
+
b.fill({atome: :planet, width: 33, height: 33 })
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.6.6.
|
4
|
+
version: 0.5.6.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Eric Godard
|
@@ -553,6 +553,7 @@ files:
|
|
553
553
|
- vendor/assets/application/examples/encrypt.rb
|
554
554
|
- vendor/assets/application/examples/example.rb
|
555
555
|
- vendor/assets/application/examples/file.rb
|
556
|
+
- vendor/assets/application/examples/fill.rb
|
556
557
|
- vendor/assets/application/examples/find.rb
|
557
558
|
- vendor/assets/application/examples/fit.rb
|
558
559
|
- vendor/assets/application/examples/generator_and_build.rb
|