atome 0.5.7.0.4 → 0.5.7.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atome/genesis/particles/geometry.rb +1 -1
- data/lib/atome/genesis/particles/identity.rb +15 -14
- data/lib/atome/genesis/particles/material.rb +14 -18
- data/lib/atome/genesis/particles/utility.rb +1 -4
- data/lib/atome/genesis/sparkle.rb +4 -0
- data/lib/atome/kernel/universe.rb +2 -1
- data/lib/atome/utilities/utilities.rb +1 -1
- data/lib/atome/version.rb +1 -1
- data/lib/molecules/intuition/utillities.rb +46 -6
- data/lib/renderers/html/html.rb +7 -0
- data/lib/renderers/html/material.rb +3 -3
- data/vendor/assets/application/examples/clones&monitoring.rb +1 -1
- data/vendor/assets/application/examples/matrix.rb +30 -71
- data/vendor/assets/application/examples/refresh.rb +6 -7
- data/vendor/assets/application/examples/selected.rb +45 -38
- data/vendor/assets/src/css/style.css +5 -4
- metadata +3 -3
- /data/vendor/assets/src/medias/images/{icons → logos}/vie.svg +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64323bdc4b0ecf2f9a130c3632dcf0934dc15797035b20bf6549c11b11dcd672
|
4
|
+
data.tar.gz: 00ee111af8d4bed4b7ab415173fdd1aaa4aa84cbfbb5298457ff18dcad5f2c3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b47d3e83540561669ad27ebe0ad2a3f7fa7cb74c8ec7524248aa67edc9dd42f50d57b9aa32bd627940e02fd60b0289245a26b162791ceaf2de5856c7df4a9eff
|
7
|
+
data.tar.gz: 2c6bdc853586f7c0f9a516212c2f972b7070fcf2e229b64f16a70f76862c0443087c6d3d7b233f77620890130064d45691f8e8a93580476070b1f53bff1e7126
|
@@ -14,7 +14,7 @@ new({ particle: :size, category: :geometry, type: :int }) do |params|
|
|
14
14
|
if params[:reference] == :x
|
15
15
|
original_width = width
|
16
16
|
width(params[:value])
|
17
|
-
height(height * params[:value] / original_width)
|
17
|
+
height(height * params[:value] / original_width) if value
|
18
18
|
else
|
19
19
|
original_height = height
|
20
20
|
height(params[:value])
|
@@ -15,7 +15,6 @@ new({ sanitizer: :id }) do |params|
|
|
15
15
|
# Universe.add_to_atomes(params, self)
|
16
16
|
# end
|
17
17
|
|
18
|
-
|
19
18
|
# Universe.atomes.each do |_aid,atome_f|
|
20
19
|
#
|
21
20
|
# if atome_f.id == params
|
@@ -64,24 +63,26 @@ end
|
|
64
63
|
|
65
64
|
new(particle: :selected, category: :identity, type: :boolean) do |params|
|
66
65
|
if params == true
|
67
|
-
@selection_style=[]
|
68
|
-
|
66
|
+
@selection_style = []
|
67
|
+
default_style = Universe.default_selection_style
|
68
|
+
select_style = ''
|
69
|
+
default_style.each do |atome_f, part_f|
|
70
|
+
select_style = send(atome_f, part_f)
|
71
|
+
end
|
69
72
|
@selection_style << select_style.id
|
70
73
|
grab(Universe.current_user).selection << @id
|
71
74
|
elsif params == false
|
72
|
-
@selection_style
|
73
|
-
|
74
|
-
|
75
|
-
@selection_style=nil
|
75
|
+
@selection_style&.each do |style_f|
|
76
|
+
remove(style_f)
|
77
|
+
end
|
78
|
+
@selection_style = nil
|
76
79
|
grab(Universe.current_user).selection.collect.delete(@id)
|
77
80
|
else
|
78
|
-
@selection_style=[]
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
# border({ thickness: 3, red: 1, green: 0, blue: 1, alpha: 1, pattern: :dotted })
|
84
|
-
# border({ thickness: 10, pattern: :solid, color: :red})
|
81
|
+
@selection_style = []
|
82
|
+
params.each do |part_f, val_f|
|
83
|
+
select_style = send(part_f, val_f)
|
84
|
+
@selection_style << select_style.id
|
85
|
+
end
|
85
86
|
grab(Universe.current_user).selection << @id
|
86
87
|
end
|
87
88
|
params
|
@@ -13,37 +13,33 @@ new({ particle: :hide, category: :material, type: :boolean })
|
|
13
13
|
|
14
14
|
new({ particle: :remove, category: :property, type: :hash }) do |params|
|
15
15
|
|
16
|
-
|
17
|
-
if params.instance_of? Hash
|
16
|
+
if params.instance_of? Hash
|
18
17
|
if params[:row]
|
19
18
|
data.delete_at(params[:row])
|
20
|
-
|
21
19
|
elsif params[:column]
|
22
20
|
column = params[:column]
|
23
21
|
data.map do |hash|
|
24
22
|
hash.delete(hash.keys[column]) if hash.keys[column]
|
25
|
-
hash
|
26
23
|
end
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
# elsif params[:all]
|
25
|
+
# apply.each do |applied_atome|
|
26
|
+
# if grab(applied_atome).type.to_sym == params[:all].to_sym
|
27
|
+
# puts "!go"
|
28
|
+
# end
|
29
|
+
# end
|
33
30
|
# puts "so_good #{params}"
|
34
31
|
# puts "***> #{apply}"
|
35
32
|
end
|
33
|
+
|
36
34
|
params
|
37
35
|
else
|
38
36
|
|
39
37
|
params
|
40
38
|
end
|
41
39
|
|
42
|
-
|
43
40
|
end
|
44
41
|
# new({ particle: :remove, category: :property, type: :hash })
|
45
42
|
|
46
|
-
|
47
43
|
new({ post: :remove }) do |params|
|
48
44
|
# TODO : we have to rethink the removal of atome and particles (with exception like category) and maybe 'use particle type' to handle removal
|
49
45
|
if params.instance_of?(Hash)
|
@@ -100,22 +96,22 @@ end
|
|
100
96
|
new({ particle: :gradient, category: :material, type: :int })
|
101
97
|
|
102
98
|
new({ particle: :thickness, category: :material, type: :int })
|
103
|
-
new({ after: :thickness}) do |params|
|
104
|
-
a=affect.dup # FIXME we have to dup else some items in the array array other duplicated
|
99
|
+
new({ after: :thickness }) do |params|
|
100
|
+
a = affect.dup # FIXME we have to dup else some items in the array array other duplicated
|
105
101
|
a.each do |atome_to_refresh|
|
106
102
|
grab(atome_to_refresh).apply(id)
|
107
103
|
end
|
108
104
|
params
|
109
105
|
end
|
110
106
|
new({ particle: :pattern, category: :material, type: :string })
|
111
|
-
new({ after: :pattern })do |params|
|
112
|
-
a=affect.dup # FIXME we have to dup else some items in the array array other duplicated
|
107
|
+
new({ after: :pattern }) do |params|
|
108
|
+
a = affect.dup # FIXME we have to dup else some items in the array array other duplicated
|
113
109
|
a.each do |atome_to_refresh|
|
114
110
|
grab(atome_to_refresh).apply(id)
|
115
111
|
end
|
116
112
|
params
|
117
113
|
end
|
118
114
|
# new({ particle: :border, category: :material, type: :int })
|
119
|
-
new({particle: :fill, category: :material, type: :array })
|
115
|
+
new({ particle: :fill, category: :material, type: :array })
|
120
116
|
|
121
|
-
new({particle: :opacity, category: :material, type: :int })
|
117
|
+
new({ particle: :opacity, category: :material, type: :int })
|
@@ -25,7 +25,6 @@ def delete_recursive(atome_id)
|
|
25
25
|
end
|
26
26
|
|
27
27
|
new({ particle: :delete, category: :utility, type: :boolean, render: false }) do |params|
|
28
|
-
|
29
28
|
if params == true
|
30
29
|
# We use the tag persistent to exclude color of system object and other default colors
|
31
30
|
unless @tag && (@tag[:persistent] || @tag[:system])
|
@@ -38,13 +37,11 @@ new({ particle: :delete, category: :utility, type: :boolean, render: false }) do
|
|
38
37
|
parent_found = grab(@attach)
|
39
38
|
parent_found.attached.delete(id_found)
|
40
39
|
end
|
41
|
-
|
42
|
-
@affect.each do |affected_atome|
|
40
|
+
@affect&.each do |affected_atome|
|
43
41
|
affected_found = grab(affected_atome)
|
44
42
|
affected_found.apply.delete(id_found)
|
45
43
|
affected_found.refresh
|
46
44
|
end
|
47
|
-
end
|
48
45
|
|
49
46
|
# Universe.delete(@aid)
|
50
47
|
end
|
@@ -215,3 +215,7 @@ end
|
|
215
215
|
# Universe.allow_localstorage = true # to stop data to be stored in localstorage
|
216
216
|
# Universe.allow_sync= false # to stop data to be sync on server
|
217
217
|
touch_allow(false) # this lock the system right click in web view
|
218
|
+
# add a few default font
|
219
|
+
# A.add_text_visual({ path: 'Roboto', name: 'Roboto-Bold' })
|
220
|
+
# A.add_text_visual({ path: 'Roboto', name: 'Roboto-Thin' })
|
221
|
+
# A.add_text_visual({ path: 'Roboto', name: 'Roboto-LightItalic' })
|
@@ -27,13 +27,14 @@ class Universe
|
|
27
27
|
@allow_tool_operations = false
|
28
28
|
@active_tools = []
|
29
29
|
@atome_preset = []
|
30
|
+
@default_selection_style={border: { thickness: 1, red: 1, green: 0, blue: 0, alpha: 1, pattern: :dotted }}
|
30
31
|
@applicable_atomes= %i[color shadow border paint animation]
|
31
32
|
# @historicize=false
|
32
33
|
class << self
|
33
34
|
attr_reader :atomes, :atomes_ids, :renderer_list, :molecule_list, :atome_list, :particle_list, :classes, :counter,
|
34
35
|
:atomes_specificities
|
35
36
|
attr_accessor :connected, :allow_sync, :allow_localstorage, :database_ready, :edit_mode, :tools,
|
36
|
-
:allow_tool_operations, :active_tools, :atome_preset, :applicable_atomes
|
37
|
+
:allow_tool_operations, :active_tools, :atome_preset, :applicable_atomes, :default_selection_style
|
37
38
|
|
38
39
|
def messages
|
39
40
|
@messages
|
@@ -388,7 +388,7 @@ class Atome
|
|
388
388
|
def particles_to_hash
|
389
389
|
hash = {}
|
390
390
|
instance_variables.each do |var|
|
391
|
-
next if %i[@html_object @history @initialized @tick @controller_proc].include?(var)
|
391
|
+
next if %i[@selection_style @html_object @history @initialized @tick @controller_proc].include?(var)
|
392
392
|
hash[var.to_s.delete('@').to_sym] = instance_variable_get(var)
|
393
393
|
end
|
394
394
|
hash
|
data/lib/atome/version.rb
CHANGED
@@ -309,6 +309,46 @@ new(molecule: :button) do |params, bloc|
|
|
309
309
|
button
|
310
310
|
end
|
311
311
|
|
312
|
+
new({ particle: :cells })
|
313
|
+
|
314
|
+
class Atome
|
315
|
+
def resize_matrix(params)
|
316
|
+
|
317
|
+
width(params[:width])
|
318
|
+
height(params[:height])
|
319
|
+
current_matrix=self
|
320
|
+
real_width = current_matrix.to_px(:width)
|
321
|
+
real_height = current_matrix.to_px(:height)
|
322
|
+
spacing = current_matrix.data[:spacing]
|
323
|
+
matrix_cells= current_matrix.data[:matrix]
|
324
|
+
|
325
|
+
total_spacing_x = spacing * (matrix_cells.collect.length ** (0.5) + 1)
|
326
|
+
total_spacing_y = spacing * (matrix_cells.collect.length ** (0.5) + 1)
|
327
|
+
|
328
|
+
if real_width > real_height
|
329
|
+
full_size = real_width
|
330
|
+
available_width = full_size - total_spacing_x
|
331
|
+
available_height = full_size - total_spacing_y
|
332
|
+
else
|
333
|
+
full_size = real_width
|
334
|
+
available_width = full_size - total_spacing_x
|
335
|
+
available_height = full_size - total_spacing_y
|
336
|
+
end
|
337
|
+
|
338
|
+
box_width = available_width / matrix_cells.collect.length ** (0.5)
|
339
|
+
box_height = available_height / matrix_cells.collect.length ** (0.5)
|
340
|
+
|
341
|
+
matrix_cells.collect.each_with_index do |box_id, index|
|
342
|
+
box = grab(box_id)
|
343
|
+
box.width(box_width)
|
344
|
+
box.height(box_height)
|
345
|
+
box.left((box_width + spacing) * (index % matrix_cells.collect.length ** (0.5)) + spacing)
|
346
|
+
box.top((box_height + spacing) * (index / matrix_cells.collect.length ** (0.5)).floor + spacing)
|
347
|
+
end
|
348
|
+
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
312
352
|
new(molecule: :matrix) do |params, &bloc|
|
313
353
|
id = params[:id]
|
314
354
|
rows = params[:rows]
|
@@ -333,13 +373,13 @@ new(molecule: :matrix) do |params, &bloc|
|
|
333
373
|
matrix_back = box({ id: "#{id}_background", width: size, height: size, color: { alpha: 0 } })
|
334
374
|
|
335
375
|
if view_width > view_height
|
336
|
-
full_size=view_height * size_coefficient
|
376
|
+
full_size = view_height * size_coefficient
|
337
377
|
available_width = full_size - total_spacing_x
|
338
378
|
available_height = full_size - total_spacing_y
|
339
379
|
matrix_back.width(full_size)
|
340
380
|
matrix_back.height(full_size)
|
341
381
|
else
|
342
|
-
full_size=view_width * size_coefficient
|
382
|
+
full_size = view_width * size_coefficient
|
343
383
|
available_width = full_size - total_spacing_x
|
344
384
|
available_height = full_size - total_spacing_y
|
345
385
|
matrix_back.width(full_size)
|
@@ -360,15 +400,15 @@ new(molecule: :matrix) do |params, &bloc|
|
|
360
400
|
end
|
361
401
|
end
|
362
402
|
current_matrix.collect(matrix_cells)
|
363
|
-
current_matrix
|
364
|
-
|
403
|
+
matrix_back.cells(current_matrix)
|
404
|
+
params= params.merge({matrix: current_matrix})
|
405
|
+
matrix_back.data(params)
|
406
|
+
matrix_back
|
365
407
|
end
|
366
408
|
new(molecule: :page) do |params, &bloc|
|
367
|
-
|
368
409
|
b = box({ color: :red, left: 99, drag: true })
|
369
410
|
b.text(params)
|
370
411
|
end
|
371
|
-
|
372
412
|
new(molecule: :application) do |params, &bloc|
|
373
413
|
|
374
414
|
main_page = box({ drag: true, width: :auto, height: :auto, top: 0, bottom: 0, left: 0, right: 0 })
|
data/lib/renderers/html/html.rb
CHANGED
@@ -4,6 +4,12 @@
|
|
4
4
|
|
5
5
|
class HTML
|
6
6
|
|
7
|
+
|
8
|
+
|
9
|
+
# def id
|
10
|
+
# :poil
|
11
|
+
# end
|
12
|
+
|
7
13
|
def self.locate(selector, base_element = JS.global[:document][:body])
|
8
14
|
return base_element if selector.empty?
|
9
15
|
|
@@ -21,6 +27,7 @@ class HTML
|
|
21
27
|
end
|
22
28
|
|
23
29
|
def initialize(id_found, current_atome)
|
30
|
+
|
24
31
|
@element ||= JS.global[:document].getElementById(id_found.to_s)
|
25
32
|
@id = id_found
|
26
33
|
@original_atome = current_atome
|
@@ -44,13 +44,13 @@ new({ method: :remove, renderer: :html, type: :string }) do |object_id_to_remove
|
|
44
44
|
html.style("boxShadow", 'none')
|
45
45
|
html.style("filter", 'none')
|
46
46
|
@apply.delete(object_id_to_remove)
|
47
|
-
apply(@apply)
|
47
|
+
# apply(@apply)
|
48
48
|
when :border
|
49
49
|
# alert :poipoipoipoipo
|
50
50
|
html.style("border", 'none')
|
51
|
-
|
51
|
+
html.style("filter", 'none')
|
52
52
|
@apply.delete(object_id_to_remove)
|
53
|
-
apply(@apply)
|
53
|
+
# apply(@apply)
|
54
54
|
when :paint
|
55
55
|
atome_to_remove = grab(object_id_to_remove)
|
56
56
|
atome_to_remove.gradient.each do |color_id|
|
@@ -11,7 +11,7 @@ t.touch(true) do
|
|
11
11
|
puts "#{b.touch} , #{b.touch_code}"
|
12
12
|
b.touch_code[:touch].call
|
13
13
|
end
|
14
|
-
|
14
|
+
color({ id: :col1, red: 1, blue: 1 })
|
15
15
|
# #######################
|
16
16
|
atomes_monitored = [c, b]
|
17
17
|
# particles_monitored=[:left, :width, :touch, :apply]
|
@@ -1,77 +1,20 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
matrix_zone=box({width: 333, height: 333, drag: true, id: :the_box})
|
4
|
-
|
5
|
-
# matrix creation
|
1
|
+
# # frozen_string_literal: true
|
2
|
+
#
|
3
|
+
matrix_zone = box({ width: 333, height: 333, drag: true, id: :the_box })
|
4
|
+
#
|
5
|
+
# # matrix creation
|
6
6
|
main_matrix = matrix_zone.matrix({ id: :vie_0, rows: 8, columns: 8, spacing: 6, size: '100%' })
|
7
7
|
main_matrix.smooth(3)
|
8
8
|
main_matrix.color(:red)
|
9
9
|
|
10
|
-
# on resize
|
11
|
-
def resize_matrix(current_matrix, new_width, new_height, spacing, size)
|
12
|
-
parent_found = current_matrix
|
13
|
-
if size.instance_of? String
|
14
|
-
size_coefficient = size.end_with?('%') ? (size.to_f / 100) : size.to_f / parent_found.to_px(:width)
|
15
|
-
matrix_back = grab(:vie_0_background)
|
16
|
-
spacing = spacing * size_coefficient
|
17
|
-
total_spacing_x = spacing * (current_matrix.collect.length ** (0.5) + 1)
|
18
|
-
total_spacing_y = spacing * (current_matrix.collect.length ** (0.5) + 1)
|
19
|
-
|
20
|
-
if new_width > new_height
|
21
|
-
full_size = new_height * size_coefficient
|
22
|
-
available_width = full_size - total_spacing_x
|
23
|
-
available_height = full_size - total_spacing_y
|
24
|
-
matrix_back.width(full_size)
|
25
|
-
matrix_back.height(full_size)
|
26
|
-
else
|
27
|
-
full_size = new_width * size_coefficient
|
28
|
-
available_width = full_size - total_spacing_x
|
29
|
-
available_height = full_size - total_spacing_y
|
30
|
-
matrix_back.width(full_size)
|
31
|
-
matrix_back.height(full_size)
|
32
|
-
end
|
33
|
-
|
34
|
-
box_width = available_width / current_matrix.collect.length ** (0.5)
|
35
|
-
box_height = available_height / current_matrix.collect.length ** (0.5)
|
36
|
-
current_matrix.collect.each_with_index do |box_id, index|
|
37
|
-
box = grab(box_id)
|
38
|
-
box.width(box_width)
|
39
|
-
box.height(box_height)
|
40
|
-
box.left((box_width + spacing) * (index % current_matrix.collect.length ** (0.5)) + spacing)
|
41
|
-
box.top((box_height + spacing) * (index / current_matrix.collect.length ** (0.5)).floor + spacing)
|
42
|
-
end
|
43
|
-
else
|
44
|
-
# dunno if we have to resize if size is specified in px
|
45
|
-
# size.to_f / parent_found.to_px(:width)
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
10
|
grab(:view).on(:resize) do
|
51
|
-
matrix_parent = grab(:view)
|
52
|
-
new_width = matrix_parent.width
|
53
|
-
new_height = matrix_parent.height
|
54
|
-
unless new_width.instance_of?(Numeric)
|
55
|
-
new_width = matrix_parent.to_px(:width)
|
56
|
-
end
|
57
|
-
unless new_height.instance_of?(Numeric)
|
58
|
-
new_height = matrix_parent.to_px(:height)
|
59
|
-
end
|
60
|
-
new_size = if new_height > new_width
|
61
|
-
new_width
|
62
|
-
else
|
63
|
-
new_height
|
64
|
-
end
|
65
|
-
ratio = new_size / grab(:vie_0_background).width.to_f
|
66
|
-
main_matrix.data[:spacing] = main_matrix.data[:spacing] * ratio
|
67
|
-
matrix_spacing = main_matrix.data[:spacing]
|
68
|
-
matrix_size = main_matrix.data[:size]
|
69
|
-
resize_matrix(main_matrix, new_width, new_height, matrix_spacing, matrix_size)
|
70
|
-
end
|
71
|
-
|
72
|
-
matrix_to_treat=main_matrix
|
73
11
|
|
74
|
-
|
12
|
+
end
|
13
|
+
#
|
14
|
+
# matrix_to_treat=main_matrix
|
15
|
+
#
|
16
|
+
# #######################################################@
|
17
|
+
matrix_to_treat = main_matrix.cells
|
75
18
|
matrix_to_treat.color(:blue)
|
76
19
|
matrix_to_treat.smooth(6)
|
77
20
|
matrix_to_treat.shadow({
|
@@ -80,15 +23,15 @@ matrix_to_treat.shadow({
|
|
80
23
|
invert: false,
|
81
24
|
red: 0, green: 0, blue: 0, alpha: 0.6
|
82
25
|
})
|
83
|
-
###################
|
26
|
+
# ###################
|
84
27
|
col_1 = color(:yellow)
|
85
28
|
col_2 = color({ red: 1, id: :red_col })
|
86
29
|
|
87
30
|
wait 3 do
|
88
|
-
matrix_to_treat.paint({ gradient: [col_1.id, col_2.id], direction: :top })
|
31
|
+
matrix_to_treat.paint({ gradient: [col_1.id, col_2.id], direction: :top })
|
89
32
|
end
|
90
33
|
|
91
|
-
###################
|
34
|
+
# ###################
|
92
35
|
|
93
36
|
test_cell = grab(:vie_0_2_3)
|
94
37
|
wait 1 do
|
@@ -116,3 +59,19 @@ wait 2 do
|
|
116
59
|
grab(:vie_0_background).left(250)
|
117
60
|
grab(:vie_0_background).drag(true)
|
118
61
|
end
|
62
|
+
matrix_to_treat.touch(:down) do |event|
|
63
|
+
# alert el.inspect
|
64
|
+
current_cell= grab(event[:target][:id].to_s)
|
65
|
+
current_cell.color(:blue)
|
66
|
+
current_cell.selected(true)
|
67
|
+
end
|
68
|
+
main_matrix.cells.smooth(9)
|
69
|
+
main_matrix.color(:red)
|
70
|
+
main_matrix.cells.color(:yellow)
|
71
|
+
wait 5 do
|
72
|
+
main_matrix.resize_matrix({width: 555, height: 555})
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
@@ -9,7 +9,6 @@ b.instance_variable_set("@path", './medias/images/red_planet.png' )
|
|
9
9
|
|
10
10
|
b.instance_variable_set("@smooth", 30)
|
11
11
|
wait 1 do
|
12
|
-
# alert b.inspect
|
13
12
|
b.refresh
|
14
13
|
b.instance_variable_set("@left", 300)
|
15
14
|
wait 1 do
|
@@ -24,13 +23,13 @@ wait 1 do
|
|
24
23
|
end
|
25
24
|
end
|
26
25
|
end
|
27
|
-
|
26
|
+
i=image(:green_planet)
|
28
27
|
# alert i.path
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
#
|
33
|
-
|
28
|
+
i.instance_variable_set("@path", './medias/images/red_planet.png')
|
29
|
+
wait 2 do
|
30
|
+
i.refresh
|
31
|
+
# i.path'./medias/images/red_planet.png'
|
32
|
+
end
|
34
33
|
|
35
34
|
|
36
35
|
#
|
@@ -1,49 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
|
5
|
-
|
6
|
-
c
|
7
|
-
|
3
|
+
# t = text({ data: 'touch me to select all', id: :the_text })
|
4
|
+
# b = box({ left: 12, id: :the_box })
|
5
|
+
# c = circle({ left: 230, id: :the_circle, color: { blue: 1, id: :c1 } })
|
6
|
+
# c.color({ green: 1, id: :c2 })
|
7
|
+
# # to change default selection style
|
8
|
+
# Universe.default_selection_style = { border: { thickness: 3, red: 1, green: 0, blue: 1, alpha: 1, pattern: :dotted } }
|
9
|
+
#
|
8
10
|
# c.touch(true) do
|
9
11
|
# if c.selected
|
10
12
|
# c.selected(false)
|
11
13
|
# else
|
14
|
+
# # c.selected(true)
|
12
15
|
# # example of custom selection style
|
13
|
-
# c.selected({ shadow: {
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# }, border: { thickness: 5, red: 1, green: 1, blue: 1, alpha: 1,
|
16
|
+
# c.selected({ shadow: { id: :titi,
|
17
|
+
# left: 9, top: 3, blur: 9,
|
18
|
+
# invert: false,
|
19
|
+
# red: 0, green: 0, blue: 0, alpha: 1
|
20
|
+
# }, border: { id: :toto, thickness: 5, red: 1, green: 1, blue: 1, alpha: 1,
|
21
|
+
# pattern: :dotted, inside: true }
|
22
|
+
# })
|
18
23
|
# end
|
19
24
|
# end
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
25
|
+
#
|
26
|
+
# image({ path: 'medias/images/red_planet.png', id: :the__red_planet, top: 233 })
|
27
|
+
#
|
28
|
+
# t.touch(true) do
|
29
|
+
# puts "1 current_user - #{grab(Universe.current_user).selection}"
|
30
|
+
# puts "1 - b selected : #{b.selected}"
|
31
|
+
# grab(:view).attached.each do |atome_found|
|
32
|
+
# grab(atome_found).selected(true)
|
33
|
+
# end
|
34
|
+
# puts "2 - current_user : #{grab(Universe.current_user).selection}"
|
35
|
+
# puts "2 - b selected : #{b.selected}"
|
36
|
+
# selected_items = grab(Universe.current_user).selection # we create a group
|
37
|
+
#
|
38
|
+
# selected_items.each do |atome_id_selected|
|
39
|
+
# atome_selected = grab(atome_id_selected)
|
40
|
+
# atome_selected.width = rand(333)
|
41
|
+
# atome_selected.height = rand(333)
|
42
|
+
#
|
43
|
+
# end
|
44
|
+
# b.selected(false)
|
45
|
+
# puts "3 current_user- #{grab(Universe.current_user).selection}"
|
46
|
+
# puts "3 - b selected : #{b.selected}"
|
47
|
+
#
|
48
|
+
# grab(Universe.current_user).selection.color(:red)
|
49
|
+
# grab(Universe.current_user).selection.each do |el|
|
50
|
+
# puts el
|
51
|
+
# end
|
52
|
+
# puts grab(Universe.current_user).selection.collect
|
53
|
+
# end
|
48
54
|
|
55
|
+
image({ path: "./medias/images/logos/vie.svg", left: :auto, right: 3, top: 0 , size: 30})
|
49
56
|
|
@@ -16,10 +16,11 @@ html, body {
|
|
16
16
|
z-index: 0;
|
17
17
|
color: lightgray;
|
18
18
|
}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
@font-face {
|
20
|
+
font-family: 'Roboto-Thin';
|
21
|
+
src: url('../medias/fonts/Roboto/Roboto-Thin.ttf') format('truetype');
|
22
|
+
}
|
23
|
+
|
23
24
|
pre {
|
24
25
|
min-width: 100px;
|
25
26
|
margin: 0;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.7.0.
|
4
|
+
version: 0.5.7.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Eric Godard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: artoo
|
@@ -814,7 +814,6 @@ files:
|
|
814
814
|
- vendor/assets/src/medias/images/icons/undo.svg
|
815
815
|
- vendor/assets/src/medias/images/icons/undo2.svg
|
816
816
|
- vendor/assets/src/medias/images/icons/validate.svg
|
817
|
-
- vendor/assets/src/medias/images/icons/vie.svg
|
818
817
|
- vendor/assets/src/medias/images/icons/wave-saw.svg
|
819
818
|
- vendor/assets/src/medias/images/icons/wave-sine.svg
|
820
819
|
- vendor/assets/src/medias/images/icons/wave-square-.svg
|
@@ -850,6 +849,7 @@ files:
|
|
850
849
|
- vendor/assets/src/medias/images/logos/gray/youtube2.svg
|
851
850
|
- vendor/assets/src/medias/images/logos/instagram.svg
|
852
851
|
- vendor/assets/src/medias/images/logos/tiktok_back.svg
|
852
|
+
- vendor/assets/src/medias/images/logos/vie.svg
|
853
853
|
- vendor/assets/src/medias/images/logos/vimeo.svg
|
854
854
|
- vendor/assets/src/medias/images/noise.svg
|
855
855
|
- vendor/assets/src/medias/images/red_planet.png
|
File without changes
|