atome 0.5.2.8 → 0.5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -1
- data/app_builder_helpers/Rakefile +2 -2
- data/exe/atome +1 -1
- data/lib/atome/atome.rb +28 -26
- data/lib/atome/extensions/atome.rb +4 -0
- data/lib/atome/extensions/matrix.rb +349 -122
- data/lib/atome/genesis/generators/atome.rb +5 -1
- data/lib/atome/genesis/generators/identity.rb +43 -13
- data/lib/atome/genesis/generators/material.rb +20 -5
- data/lib/atome/genesis/generators/time.rb +1 -1
- data/lib/atome/genesis/generators/utility.rb +26 -2
- data/lib/atome/genesis/genesis.rb +12 -4
- data/lib/atome/genesis/sparkle.rb +35 -3
- data/lib/atome/helpers/essentials.rb +24 -15
- data/lib/atome/helpers/utilities.rb +42 -3
- data/lib/atome/kernel/batch.rb +48 -0
- data/lib/atome/presets/atome.rb +22 -6
- data/lib/atome/renderers/browser/atome.rb +1 -3
- data/lib/atome/renderers/browser/browser.rb +14 -1
- data/lib/atome/renderers/browser/geometry.rb +10 -2
- data/lib/atome/renderers/browser/helpers/video_helper.rb +1 -1
- data/lib/atome/renderers/browser/helpers/web_helper.rb +1 -5
- data/lib/atome/renderers/browser/identity.rb +7 -11
- data/lib/atome/renderers/browser/material.rb +10 -0
- data/lib/atome/renderers/html/atome.rb +2 -0
- data/lib/atome/renderers/renderer.rb +3 -2
- data/lib/atome/version.rb +1 -1
- data/lib/atome.rb +2 -1
- data/sig/atome.rbs +14 -0
- data/vendor/assets/Rakefile +1 -1
- data/vendor/assets/src/css/style.css +6 -6
- data/vendor/assets/src/medias/rubies/examples/_2_solve.rb +41 -27
- data/vendor/assets/src/medias/rubies/examples/_attach.rb +12 -0
- data/vendor/assets/src/medias/rubies/examples/_audio.rb +81 -28
- data/vendor/assets/src/medias/rubies/examples/_dataset.rb +191 -111
- data/vendor/assets/src/medias/rubies/examples/clone.rb +4 -4
- data/vendor/assets/src/medias/rubies/examples/delete.rb +2 -2
- data/vendor/assets/src/medias/rubies/examples/drag.rb +2 -1
- data/vendor/assets/src/medias/rubies/examples/table.rb +479 -0
- data/vendor/assets/src/medias/rubies/examples/to_px.rb +10 -0
- metadata +7 -4
- data/vendor/assets/src/medias/rubies/examples/attach.rb +0 -12
@@ -0,0 +1,479 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
params = {
|
4
|
+
|
5
|
+
id: :my_table, left: 0, top: 0, width: 500, height: 399, smooth: 8, color: :yellowgreen,
|
6
|
+
columns: { count: 8,
|
7
|
+
titles: { 1 => :col1, 3 => :mycol },
|
8
|
+
data: { 3 => :col_content },
|
9
|
+
actions: { 2 => { touch: :the_action } },
|
10
|
+
particles: { color: :blue }
|
11
|
+
},
|
12
|
+
rows: { count: 6,
|
13
|
+
titles: { 1 => :my_first_row, 5 => :other_row },
|
14
|
+
data: { 0 => :col_content },
|
15
|
+
actions: {},
|
16
|
+
particles: { shadows: :black }
|
17
|
+
},
|
18
|
+
cells: {
|
19
|
+
# data: { 0 => :here, 2 => "hello", 4 => :hi, 5 => :good, 7 => :super },
|
20
|
+
# actions: { 2 => { touch: :my_lambda } },
|
21
|
+
particles: { margin: 9, color: :blue, smooth: 9, shadow: { blur: 9, left: 3, top: 3 } }
|
22
|
+
},
|
23
|
+
exceptions: {
|
24
|
+
columns: {
|
25
|
+
# divided: { 2 => 3 },
|
26
|
+
fusion: { 1 => [3, 5], 7 => [2, 5] }
|
27
|
+
},
|
28
|
+
rows: {
|
29
|
+
divided: { 1 => 3 },
|
30
|
+
fusion: { 2 => [0, 3], 5 => [2, 5] }
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
m = matrix(params)
|
35
|
+
|
36
|
+
found = m.columns(5) do |el|
|
37
|
+
el.color(:yellow)
|
38
|
+
end
|
39
|
+
|
40
|
+
m.rows(3) do |el|
|
41
|
+
el.color(:orange)
|
42
|
+
end
|
43
|
+
|
44
|
+
m.rows(1) do |el|
|
45
|
+
el.color(:lightgray)
|
46
|
+
end
|
47
|
+
|
48
|
+
found.data.each do |el|
|
49
|
+
el.color(:red)
|
50
|
+
end
|
51
|
+
|
52
|
+
# found.data[0..2].each do |el|
|
53
|
+
# el.color(:cyan)
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
grab(:my_table_21).color(:pink)
|
57
|
+
grab(:my_table_26).color(:purple)
|
58
|
+
# m.cells([20, 5]).rotate(15)
|
59
|
+
# m.cell(9).color(:black)
|
60
|
+
# test = m.cells([23, 26])
|
61
|
+
# test.color(:blue)
|
62
|
+
# m.columns(6).data[0..3].color(:white)
|
63
|
+
|
64
|
+
grab(m.id.value).drag({ move: true }) do |e|
|
65
|
+
puts e
|
66
|
+
end
|
67
|
+
wait 1 do
|
68
|
+
m.add_columns(3)
|
69
|
+
m.rows(3) do |el|
|
70
|
+
el.color(:orange)
|
71
|
+
end
|
72
|
+
wait 1 do
|
73
|
+
m.add_rows(4)
|
74
|
+
m.rows(1) do |el|
|
75
|
+
el.color(:lightgray)
|
76
|
+
end
|
77
|
+
wait 1 do
|
78
|
+
found.data.each do |el|
|
79
|
+
el.color(:red)
|
80
|
+
end
|
81
|
+
m.resize(330, 300)
|
82
|
+
|
83
|
+
m.fusion(rows: { 2 => [0, 3], 3 => [2, 5] })
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
m.fusion(columns: { 3=> [3, 5], 4 => [2, 5] })
|
90
|
+
m.fusion(rows: { 0 => [0, 3], 3 => [5, 9] })
|
91
|
+
# m.override( {
|
92
|
+
# columns: { number: [ 0, 3 ] ,width: 200},
|
93
|
+
# rows: { number: [ 1, 4 ] ,height: 200},
|
94
|
+
# })
|
95
|
+
m.last(:rows) do |el|
|
96
|
+
el.color(:violet)
|
97
|
+
end
|
98
|
+
m.divide( rows: {1 => 3})
|
99
|
+
m.cell(9).box({left: 0, top: 0, id: :poireau, width: 66, height: 66})
|
100
|
+
m.cell(9).content([box({ left: 0, top: 0, id: :poireau, width: 66, height: 66 })])
|
101
|
+
# puts m.cell(9).content
|
102
|
+
m.relations({ relation_1: {
|
103
|
+
# start: {cell_id => out_nb},
|
104
|
+
# end: {cell_id => in_nb},
|
105
|
+
start: { 9 => 2 },
|
106
|
+
end: { 2 => 3 }
|
107
|
+
} })
|
108
|
+
m.add({ relations: {
|
109
|
+
# start: {cell_id => out_nb},
|
110
|
+
# end: {cell_id => in_nb},
|
111
|
+
rel_2: { start: { 7 => 3 },
|
112
|
+
end: { 1 => 4 } }
|
113
|
+
}
|
114
|
+
})
|
115
|
+
m.delete({ relations: :rel_2 })
|
116
|
+
# alert m.relations
|
117
|
+
# "sourceComponent": 0,
|
118
|
+
# "sourceOutputSlot": 1,
|
119
|
+
# "targetComponent": 1,
|
120
|
+
# "targetInputSlot": 1
|
121
|
+
# puts m.cell(9)
|
122
|
+
# m.children.each do |child|
|
123
|
+
# puts "#{grab(child).id} : #{grab(child).width}"
|
124
|
+
# end
|
125
|
+
|
126
|
+
# alert(grab("my_table_9"))
|
127
|
+
# grab("my_table_9").children .each do |child|
|
128
|
+
# grab(child).color(:white)
|
129
|
+
# end
|
130
|
+
matrix_ratio=m.height.value/m.width.value
|
131
|
+
# alert prev_size
|
132
|
+
$window.on :resize do |e|
|
133
|
+
# m.top(0)
|
134
|
+
# m.left(0)
|
135
|
+
# ratio_w=m.width.value/$window.view.width
|
136
|
+
# ratio_h=m.height.value/$window.view.height
|
137
|
+
# puts "=====> :#{ratio_w}"
|
138
|
+
# m.resize(ratio_w*$window.view.width,ratio_h*$window.view.height)
|
139
|
+
m.resize($window.view.width, $window.view.width*matrix_ratio)
|
140
|
+
end
|
141
|
+
# m.ratio(:fixed)
|
142
|
+
|
143
|
+
#TODO : add cell => style, actions, data, content, relation
|
144
|
+
#TODO : mega important => I must have a reflection on .value
|
145
|
+
|
146
|
+
|
147
|
+
# TODO : try matrix in a matrix's cell
|
148
|
+
# TODO : store data, actions, and titles
|
149
|
+
# alert m.cell(0)
|
150
|
+
# ############################## end table tests #############
|
151
|
+
# TODO : alteration data persistence when resizing color, and other particles are lost
|
152
|
+
|
153
|
+
# generator = Genesis.generator
|
154
|
+
############
|
155
|
+
|
156
|
+
# generator.build_option(:pre_render_parents) do |parents_ids|
|
157
|
+
# parents_ids.each do |parents_id|
|
158
|
+
# parents_found = grab(parents_id)
|
159
|
+
# parents_found.atome[:children] << id if parents_found
|
160
|
+
# end
|
161
|
+
# family(parents_ids)
|
162
|
+
# end
|
163
|
+
#
|
164
|
+
# generator.build_option(:pre_render_children) do |children_pass|
|
165
|
+
# children_pass.each do |child_found|
|
166
|
+
# atome_found = grab(child_found)
|
167
|
+
# atome_found.parents([@atome[:id]])
|
168
|
+
# end
|
169
|
+
# end
|
170
|
+
#
|
171
|
+
# generator.build_particle(:family)
|
172
|
+
#
|
173
|
+
# generator.build_option(:pre_render_family) do |parents_ids|
|
174
|
+
#
|
175
|
+
# end
|
176
|
+
#
|
177
|
+
# ###### render #####
|
178
|
+
#
|
179
|
+
# generator.build_render(:browser_family) do |parents_found|
|
180
|
+
# parents_found.each do |parent_found|
|
181
|
+
# BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
182
|
+
# end
|
183
|
+
# end
|
184
|
+
############################## new attempt
|
185
|
+
#
|
186
|
+
# generator.build_sanitizer(:color) do |params|
|
187
|
+
# parent_found = found_parents_and_renderers[:parent]
|
188
|
+
# render_found = found_parents_and_renderers[:renderers]
|
189
|
+
# default_params = { renderers: render_found, id: "color_#{Universe.atomes.length}", type: :color,
|
190
|
+
# parents: parent_found,children: [],
|
191
|
+
# red: 0, green: 0, blue: 0, alpha: 1 }
|
192
|
+
# params = create_color_hash(params) unless params.instance_of? Hash
|
193
|
+
# new_params = default_params.merge!(params)
|
194
|
+
# atome[:color] = new_params
|
195
|
+
# new_params
|
196
|
+
# end
|
197
|
+
#
|
198
|
+
# generator.build_option(:pre_render_parents) do |parents_ids|
|
199
|
+
# # family(parents_ids)
|
200
|
+
# end
|
201
|
+
# generator.build_option(:pre_render_children) do |children_pass|
|
202
|
+
# # children_pass.each do |child_found|
|
203
|
+
# # atome_found = grab(child_found)
|
204
|
+
# # atome_found.parents([@atome[:id]])
|
205
|
+
# # end
|
206
|
+
# end
|
207
|
+
# # render
|
208
|
+
# generator.build_render(:browser_parent) do |parents_found|
|
209
|
+
# # parents_found.each do |parent_found|
|
210
|
+
# # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
211
|
+
# # end
|
212
|
+
# end
|
213
|
+
#
|
214
|
+
# generator.build_render(:browser_children) do |parents_found|
|
215
|
+
# # parents_found.each do |parent_found|
|
216
|
+
# # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
217
|
+
# # end
|
218
|
+
# end
|
219
|
+
|
220
|
+
########### #########
|
221
|
+
|
222
|
+
# module BrowserHelper
|
223
|
+
# def self.browser_document
|
224
|
+
# # Work because of the patched version of opal-browser(0.39)
|
225
|
+
# Browser.window
|
226
|
+
# end
|
227
|
+
#
|
228
|
+
# def self.browser_attach_div(parents, html_object, _atome)
|
229
|
+
# html_object.append_to(browser_document[parents])
|
230
|
+
# end
|
231
|
+
#
|
232
|
+
# def self.browser_attach_style(parents, _html_object, atome)
|
233
|
+
# browser_document[parents].add_class(atome[:id])
|
234
|
+
# end
|
235
|
+
# end
|
236
|
+
|
237
|
+
# generator.build_option(:pre_render_parents) do |parents_ids|
|
238
|
+
# parents_ids.each do |parents_id|
|
239
|
+
# if parents_id.instance_of? Atome
|
240
|
+
# parents_id = parents_id.value
|
241
|
+
# end
|
242
|
+
# parents_found = grab(parents_id)
|
243
|
+
# family(parents_id)
|
244
|
+
# parents_found.atome[:children] << atome[:id]
|
245
|
+
# end
|
246
|
+
# end
|
247
|
+
#
|
248
|
+
# generator.build_option(:pre_render_children) do |children_ids|
|
249
|
+
# children_ids.each do |child_id|
|
250
|
+
# if child_id.instance_of? Atome
|
251
|
+
# child_id = child_id.value
|
252
|
+
# end
|
253
|
+
# child_found = grab(child_id)
|
254
|
+
# parents_found=@atome[:id]
|
255
|
+
# child_found.family(parents_found)
|
256
|
+
# child_found.atome[:parents] = [parents_found]
|
257
|
+
# end
|
258
|
+
# end
|
259
|
+
#
|
260
|
+
|
261
|
+
# generator.build_particle(:family, { render: true, store: false })
|
262
|
+
# generator.build_render(:browser_family) do |parents_found|
|
263
|
+
# BrowserHelper.send("browser_attach_#{@browser_type}", parents_found, @browser_object, @atome)
|
264
|
+
# end
|
265
|
+
|
266
|
+
# class Universe
|
267
|
+
# def add_to_atomes(id, atome)
|
268
|
+
# # instance_variable_get('@atomes').merge!(atome)
|
269
|
+
# @atomes[id] = atome
|
270
|
+
# end
|
271
|
+
#
|
272
|
+
# def update_atome_id(id, atome, prev_id)
|
273
|
+
# puts :ok
|
274
|
+
# @atomes[id] = atome
|
275
|
+
# @atomes.delete(prev_id)
|
276
|
+
# end
|
277
|
+
# end
|
278
|
+
|
279
|
+
# generator.build_sanitizer(:id) do |params|
|
280
|
+
# if @atome[:id] != params
|
281
|
+
# Universe.update_atome_id(params, self, @atome[:id])
|
282
|
+
# else
|
283
|
+
# Universe.add_to_atomes(params, self)
|
284
|
+
# end
|
285
|
+
# params
|
286
|
+
# end
|
287
|
+
#
|
288
|
+
# generator.build_render(:browser_id) do |params|
|
289
|
+
# browser_object.id = params if @atome[:id] != params
|
290
|
+
# end
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
# b = box({ id: :titi })
|
295
|
+
# c = color(:orange)
|
296
|
+
# c.id(:tutu)
|
297
|
+
# b.children([:tutu])
|
298
|
+
|
299
|
+
|
300
|
+
# alert b.children
|
301
|
+
# alert b
|
302
|
+
# b.circle({id: :toto})
|
303
|
+
# grab(:box_color).parents([:titi])
|
304
|
+
# b.children([:box_color])
|
305
|
+
# alert b
|
306
|
+
|
307
|
+
# generator.build_render(:browser_parents) do |parents_found|
|
308
|
+
# # p :number_parents
|
309
|
+
# # parents_found.each do |parent_found|
|
310
|
+
# # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
311
|
+
# # end
|
312
|
+
# end
|
313
|
+
#
|
314
|
+
# generator.build_render(:browser_children) do |children_found|
|
315
|
+
# # p :number_children
|
316
|
+
# # children_found.each do |child_found|
|
317
|
+
# # BrowserHelper.send("browser_attach_#{@browser_type}", child_found, @browser_object, @atome)
|
318
|
+
# # end
|
319
|
+
# end
|
320
|
+
|
321
|
+
# b = box({ id: :the_test_box })
|
322
|
+
# i = 0
|
323
|
+
# while i < 9
|
324
|
+
# # puts :ok
|
325
|
+
# box({ left: i * 30, width: 9 })
|
326
|
+
# i += 1
|
327
|
+
# end
|
328
|
+
# # c = color({red: 0, green: 1, blue: 0.3, alpha: 1, id: :thcol, children: []})
|
329
|
+
# c = color(:red)
|
330
|
+
# # alert a
|
331
|
+
# # wait 1 do
|
332
|
+
# b.children([c.id])
|
333
|
+
# # c.parents([b.id])
|
334
|
+
# # puts "box is :\n#{b}\n\n color is :\n#{c}"
|
335
|
+
#
|
336
|
+
# puts '-----'
|
337
|
+
# puts "familly content #{b.family}"
|
338
|
+
# # end
|
339
|
+
|
340
|
+
# generator.build_option(:pre_render_parents) do |parents_ids|
|
341
|
+
# parents_ids.each do |parents_id|
|
342
|
+
# parents_found = grab(parents_id)
|
343
|
+
# parents_found.atome[:children]<< id if parents_found
|
344
|
+
# end
|
345
|
+
# family({parents: parents_ids, children: [] })
|
346
|
+
# end
|
347
|
+
#
|
348
|
+
#
|
349
|
+
# #mess below
|
350
|
+
# generator.build_option(:pre_render_children) do |children_ids|
|
351
|
+
# children_ids.each do |child_found|
|
352
|
+
# atome_found = grab(child_found)
|
353
|
+
# atome_found.atome[:parents]=[@atome[:id]]
|
354
|
+
# end
|
355
|
+
# # family({children: children_ids, parents: [] })
|
356
|
+
# end
|
357
|
+
#
|
358
|
+
#
|
359
|
+
# generator.build_particle(:family)
|
360
|
+
#
|
361
|
+
#
|
362
|
+
# ####################
|
363
|
+
# generator.build_render(:browser_family) do |params|
|
364
|
+
# # puts "kool super kool! : #{parents_found} , type : #{@browser_type}, object : #{@browser_object} ,atome : #{@atome}"
|
365
|
+
# # puts "atome : #{@atome[:id]}, parent : #{parents_found}}"
|
366
|
+
# # puts "atome : #{@atome} : #{params[:parents]}"
|
367
|
+
# puts " #{params[:parents]}"
|
368
|
+
# parents_found=params[:parents]
|
369
|
+
# children_found=params[:children]
|
370
|
+
# parents_found.each do |parent_found|
|
371
|
+
# # atome=
|
372
|
+
# BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
373
|
+
# end
|
374
|
+
#
|
375
|
+
# children_found.each do |parent_found|
|
376
|
+
# BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
377
|
+
# end
|
378
|
+
#
|
379
|
+
# end
|
380
|
+
#
|
381
|
+
# generator.build_render(:browser_parents) do |parents_found|
|
382
|
+
# # puts "moinskool super kool! : #{parents_found} "
|
383
|
+
# # puts "moinskool super kool! : #{parents_found} , type : #{@browser_type}, object : #{@browser_object} ,atome : #{@atome}"
|
384
|
+
# # parents_found.each do |parent_found|
|
385
|
+
# # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
386
|
+
# # end
|
387
|
+
# end
|
388
|
+
|
389
|
+
###################
|
390
|
+
# class Atome
|
391
|
+
#
|
392
|
+
# def store_value(element)
|
393
|
+
# params=instance_variable_get("@#{element}")
|
394
|
+
# @atome[element] = params
|
395
|
+
# end
|
396
|
+
#
|
397
|
+
# def build_particle(particle_name,options,&particle_proc)
|
398
|
+
# type = options[:type]
|
399
|
+
# type = :string if options[:type].nil?
|
400
|
+
# store = options[:store]
|
401
|
+
# store = true if options[:store].nil?
|
402
|
+
# render = options[:render]
|
403
|
+
# render = true if options[:render].nil?
|
404
|
+
#
|
405
|
+
# # we add the new method to the particle's collection of methods
|
406
|
+
# Universe.add_to_particle_list(particle_name, type)
|
407
|
+
# auto_render_generator(particle_name) if render # automatise the creation of an empty render method for current particle
|
408
|
+
# new_particle(particle_name,store,render , &particle_proc)
|
409
|
+
# additional_particle_methods(particle_name, &particle_proc) # create alternative methods such as create 'method='
|
410
|
+
# end
|
411
|
+
#
|
412
|
+
# def additional_particle_methods(element, &method_proc)
|
413
|
+
# Atome.define_method "#{element}=" do |params = nil, &user_proc|
|
414
|
+
# instance_exec(params, user_proc, &method_proc) if method_proc.is_a?(Proc)
|
415
|
+
# end
|
416
|
+
# end
|
417
|
+
#
|
418
|
+
# def new_particle(element,store,render, &method_proc)
|
419
|
+
# Atome.define_method element do |params = nil, &user_proc|
|
420
|
+
# if params || params == false
|
421
|
+
# # the line below execute the proc created when using the build_particle method
|
422
|
+
# instance_exec(params, user_proc, &method_proc) if method_proc.is_a?(Proc)
|
423
|
+
# params = sanitize(element, params)
|
424
|
+
# create_particle(element,store,render)
|
425
|
+
# send("set_#{element}", params, &user_proc)
|
426
|
+
# else
|
427
|
+
# get_particle(element, &user_proc)
|
428
|
+
# end
|
429
|
+
# end
|
430
|
+
# end
|
431
|
+
# def run_optional_proc(proc_name, atome = self, element, &user_proc)
|
432
|
+
# params=instance_variable_get("@#{element}")
|
433
|
+
# option_found = Universe.get_optional_method(proc_name)
|
434
|
+
# atome.instance_exec(params, user_proc, atome, &option_found) if option_found.is_a?(Proc)
|
435
|
+
# end
|
436
|
+
#
|
437
|
+
# def rendering(element, &user_proc)
|
438
|
+
# params=instance_variable_get("@#{element}")
|
439
|
+
# render_engines = @atome[:renderers]
|
440
|
+
# render_engines.each do |render_engine|
|
441
|
+
# send("#{render_engine}_#{element}", params, &user_proc)
|
442
|
+
# end
|
443
|
+
# end
|
444
|
+
#
|
445
|
+
# def broadcasting(element)
|
446
|
+
# params=instance_variable_get("@#{element}")
|
447
|
+
# @broadcast.each_value do |particle_monitored|
|
448
|
+
# if particle_monitored[:particles].include?(element)
|
449
|
+
# code_found=particle_monitored[:code]
|
450
|
+
# instance_exec(self, element, params, &code_found) if code_found.is_a?(Proc)
|
451
|
+
# end
|
452
|
+
# end
|
453
|
+
# end
|
454
|
+
#
|
455
|
+
# def particle_creation(element, params,store,render, &user_proc)
|
456
|
+
# return false unless security_pass(element, params)
|
457
|
+
# # we create a proc holder of any new particle if user pass a bloc
|
458
|
+
# store_code_bloc(element, &user_proc) if user_proc
|
459
|
+
# # Params is now an instance variable so it should be passed thru different methods
|
460
|
+
# instance_variable_set("@#{element}", params)
|
461
|
+
# run_optional_proc("pre_render_#{@atome[:type]}".to_sym, self, element, &user_proc)
|
462
|
+
# run_optional_proc("pre_render_#{element}".to_sym, self, element, &user_proc)
|
463
|
+
# rendering(element, &user_proc) if render
|
464
|
+
# run_optional_proc("post_render_#{@atome[:type]}".to_sym, self, element, &user_proc)
|
465
|
+
# run_optional_proc("post_render_#{element}".to_sym, self, element, &user_proc)
|
466
|
+
# broadcasting(element)
|
467
|
+
# store_value(element) if store
|
468
|
+
# self
|
469
|
+
# end
|
470
|
+
#
|
471
|
+
# def create_particle(element,store,render)
|
472
|
+
# Atome.define_method "set_#{element}" do |params, &user_proc|
|
473
|
+
# particle_creation(element, params, store,render,&user_proc)
|
474
|
+
# end
|
475
|
+
# end
|
476
|
+
#
|
477
|
+
# end
|
478
|
+
|
479
|
+
|
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.2
|
4
|
+
version: 0.5.3.2
|
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:
|
11
|
+
date: 2023-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: arduino_firmata
|
@@ -427,6 +427,7 @@ files:
|
|
427
427
|
- lib/atome/helpers/essentials.rb
|
428
428
|
- lib/atome/helpers/sanitizer.rb
|
429
429
|
- lib/atome/helpers/utilities.rb
|
430
|
+
- lib/atome/kernel/batch.rb
|
430
431
|
- lib/atome/kernel/essentials.rb
|
431
432
|
- lib/atome/kernel/universe.rb
|
432
433
|
- lib/atome/presets/atome.rb
|
@@ -644,6 +645,7 @@ files:
|
|
644
645
|
- vendor/assets/src/medias/javascripts/test.js
|
645
646
|
- vendor/assets/src/medias/rubies/examples/!run.rb
|
646
647
|
- vendor/assets/src/medias/rubies/examples/_2_solve.rb
|
648
|
+
- vendor/assets/src/medias/rubies/examples/_attach.rb
|
647
649
|
- vendor/assets/src/medias/rubies/examples/_audio.rb
|
648
650
|
- vendor/assets/src/medias/rubies/examples/_dataset.rb
|
649
651
|
- vendor/assets/src/medias/rubies/examples/_os.rb
|
@@ -652,7 +654,6 @@ files:
|
|
652
654
|
- vendor/assets/src/medias/rubies/examples/add.rb
|
653
655
|
- vendor/assets/src/medias/rubies/examples/animation.rb
|
654
656
|
- vendor/assets/src/medias/rubies/examples/atome_new.rb
|
655
|
-
- vendor/assets/src/medias/rubies/examples/attach.rb
|
656
657
|
- vendor/assets/src/medias/rubies/examples/auto_height.rb
|
657
658
|
- vendor/assets/src/medias/rubies/examples/auto_width.rb
|
658
659
|
- vendor/assets/src/medias/rubies/examples/blur.rb
|
@@ -700,8 +701,10 @@ files:
|
|
700
701
|
- vendor/assets/src/medias/rubies/examples/smooth.rb
|
701
702
|
- vendor/assets/src/medias/rubies/examples/sort.rb
|
702
703
|
- vendor/assets/src/medias/rubies/examples/style.rb
|
704
|
+
- vendor/assets/src/medias/rubies/examples/table.rb
|
703
705
|
- vendor/assets/src/medias/rubies/examples/text.rb
|
704
706
|
- vendor/assets/src/medias/rubies/examples/time.rb
|
707
|
+
- vendor/assets/src/medias/rubies/examples/to_px.rb
|
705
708
|
- vendor/assets/src/medias/rubies/examples/top.rb
|
706
709
|
- vendor/assets/src/medias/rubies/examples/touch.rb
|
707
710
|
- vendor/assets/src/medias/rubies/examples/video.rb
|
@@ -742,7 +745,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
742
745
|
- !ruby/object:Gem::Version
|
743
746
|
version: '0'
|
744
747
|
requirements: []
|
745
|
-
rubygems_version: 3.
|
748
|
+
rubygems_version: 3.4.2
|
746
749
|
signing_key:
|
747
750
|
specification_version: 4
|
748
751
|
summary: the creative framework
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
# TODO : debug the attach method it color the view by default
|
6
|
-
# box({id: :my_box})
|
7
|
-
# c=color(:red)
|
8
|
-
# grab(:view).color(:black)
|
9
|
-
# c.attach([:my_box])
|
10
|
-
|
11
|
-
box({id: :my_box})
|
12
|
-
color({red: 1, blue: 1, attach: [:my_box]})
|