atome_eVe 0.1.0.0.6 → 0.1.0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1cf47e4cdc5b85b545e8ac608bd7e60ce503e2d5aa9c3894c695b9cc6761af2
4
- data.tar.gz: 24dda873d0003bb4601ee8b0b4b3bded94a9c0343f0cd7aa3e39a0a20c48fbb1
3
+ metadata.gz: c912692615f95b8e715cf982e3dfdb18a873703730cdeb1a09a6bc635dcff776
4
+ data.tar.gz: 5a2bcb66002dce1e556b139d1c797672dcabcf422bded7222874b400f879233f
5
5
  SHA512:
6
- metadata.gz: 47e38e24db94c2d34ff15be016017ea3fe886ece643db45439f93481e2265152184e1038bc80575940a5f65f5c066ce9089f41add9a2bf160a34b54db330af4d
7
- data.tar.gz: 209c0e94d5992260b51cfb81022043f3e4763f05c4b62cbe062854f3ac80baa5514e4970194d3c8e8655942a6fddee57e71b5baedce385426419cdec330b43e4
6
+ metadata.gz: 67224496c1357b8950ed520efb26e2f4cfd40d4ff3085c0c50a2b868cfd60ef004a2f820666600409fae9ced8a960eccc1e3347f06ab8fadeed8c491c3259f26
7
+ data.tar.gz: 954d930e7f3d3ab500b53d96bdeb2a02a2cfbcd54d16730c38f54062356f97ef3c36a29d092d790658dde769abb66956ce142a89d6975392eb72633276fa1d72
data/lib/eVe/init.rb CHANGED
@@ -1,54 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Universe.eVe(true)
4
- puts "eVe version : #{EVe::VERSION}"
5
-
6
- module EVe
7
- def new(params, &bloc)
8
- if params[:page]
9
- site_found = grab(params[:page][:application])
10
- site_found.clear(true)
11
- page_id = params[:page][:name]
12
- site_found.box({ id: page_id })
13
- elsif params[:application]
14
-
15
- footer_header_size=33
16
- footer_header_color=color({red: 0, green: 0, blue: 0, id: :footer_header_color})
17
-
18
- if params[:header]
19
- top = footer_header_size
20
- header=box({ left: 0, right: 0, width: :auto, top: 0, height: top, id: :header })
21
- # header.attach(:footer_header_color)
22
- else
23
- top = 0
24
- end
25
- if params[:footer]
26
- bottom = footer_header_size
27
- box({ left: 0, right: 0, width: :auto, top: :auto, bottom: 0, height: bottom, id: :footer })
28
- else
29
- bottom = 0
30
- end
31
- box({ left: 0, right: 0, width: :auto, top: top, bottom: bottom, height: :auto, id: params[:application] })
32
- elsif params[:module]
33
-
34
- end
35
- super if defined?(super)
36
- end
37
- end
38
-
39
- class Object
40
- include EVe
41
- end
42
-
43
- # tests
44
- new({application: :compose, header: true, footer: true })
45
-
46
- # new(page: {name: :home, application: :compose, attach: :root })
47
-
48
- # new(module: {name: :home, application: :compose, attach: :root })
49
-
50
-
51
-
52
-
53
-
54
-
data/lib/eVe/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EVe
4
- VERSION = "0.1.0.0.6"
4
+ VERSION = "0.1.0.0.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atome_eVe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.0.6
4
+ version: 0.1.0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Eric Godard
@@ -29,11 +29,7 @@ files:
29
29
  - Rakefile
30
30
  - atome_eVe.gemspec
31
31
  - lib/eVe.rb
32
- - lib/eVe/examples/site.rb
33
32
  - lib/eVe/init.rb
34
- - lib/eVe/intuition/inputs.rb
35
- - lib/eVe/intuition/sliders.rb
36
- - lib/eVe/intuition/toolbox.rb
37
33
  - lib/eVe/version.rb
38
34
  - lib/eVe_relative.rb
39
35
  - sig/atome_eVe.rbs
@@ -1,34 +0,0 @@
1
-
2
- new(application: {name: :compose })
3
-
4
-
5
- grab(:toto).color(:cyan)
6
-
7
- def layout
8
- compose_back=box
9
-
10
- compose_back.color({ alpha: 0 })
11
- media_reader=compose_back.box({left: 99, width: 250, height: 250, top: 99})
12
- viewer_1=compose_back.box({left: 360, width: 250, height: 250, top: 99})
13
- viewer_2=compose_back.box({left: 690, width: 250, height: 250, top: 99})
14
- timeline=compose_back.box({left: 99, width: 250, height: 250, top: 399})
15
- login=compose_back.text(:log)
16
- login.touch(true) do
17
- compose_back.delete(true)
18
- # grab(:view).clear(true)
19
- form
20
- end
21
-
22
- end
23
-
24
- def form
25
- form1=box
26
- form1.text(:login)
27
-
28
- form1.touch(true) do
29
- form1.delete(true)
30
- layout
31
- end
32
-
33
- end
34
- form
@@ -1,111 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # def atome_common(atome_preset, params)
4
- # basic_params = { renderers: [] }
5
- # # TODO : remove Essentials.default_params[atome_preset] || {} as it is
6
- # # applied twice because preset is now a particle
7
- # preset_params = Essentials.default_params[atome_preset] || {}
8
- #
9
- # basic_params[:type] = preset_params[:type] || :element
10
- # basic_params[:id] = params[:id] || identity_generator(atome_preset)
11
- # basic_params[:renderers] = @renderers || preset_params[:renderers]
12
- # essential_params = basic_params.merge(preset_params)
13
- # reordered_params = essential_params.reject { |key, _| params.has_key?(key) }
14
- # params = reordered_params.merge(params)
15
- #
16
- # # condition to handle color/shadow/paint atomes that shouldn't be attach to view
17
- # # TODO : add category for atome( material/physical vs modifier : color, shadow, .. vs shape, image ..)
18
- # # then add condition same things fo code in genesis new_atome
19
- # if %i[color shadow paint].include?(atome_preset)
20
- # unless params[:affect]
21
- # params[:affect] = if @id == :view
22
- # [:black_matter]
23
- # else
24
- # [@id]
25
- # end
26
- # end
27
- # else
28
- # params[:attach] = params[:attach] || @id || :view
29
- # end
30
- # params
31
- # end
32
- #
33
- # def preset_common(params, &bloc)
34
- # # if an atome with current id exist we update the ID in the params
35
- # params[:id] = "#{params[:id]}_#{Universe.atomes.length}" if grab(params[:id])
36
- # Atome.new(params, &bloc)
37
- # end
38
- # class EVe < Atome
39
- class EVe < Atome
40
- def initialize
41
- @atomes = {}
42
- end
43
-
44
- def atome(atome_to_find)
45
- @atomes[atome_to_find]
46
- end
47
-
48
- def input_box(params = {}, &bloc)
49
- height_wanted = 15
50
- width_wanted = 222
51
- input_back = Atome.new(
52
- { renderers: [:html], id: :input_back, type: :shape, attach: :view, apply: [:shape_color],
53
- left: 120, top: 120,data: '', width: width_wanted, height: height_wanted + height_wanted * 20 / 100, smooth: 6 })
54
-
55
- @atomes[:input_back] = input_back
56
-
57
- Atome.new(
58
- { renderers: [:html], id: :input_text_color, type: :color, tag: ({ system: true, persistent: true }),
59
- red: 0.1, green: 0.1, blue: 0.1, alpha: 1 }
60
- )
61
-
62
- text_input = Atome.new(
63
- { renderers: [:html], id: :input_text, type: :text, apply: [:input_text_color], component: { size: height_wanted },
64
- data: :input, left: height_wanted * 20 / 100, top: 0, edit: true, attach: :input_back, height: height_wanted, position: :absolute })
65
-
66
- text_input.touch(true) do
67
- text_input.component({ selected: { color: 'rgba(0,0,0,0.3)', text: :orange } })
68
- end
69
-
70
- text_input.keyboard(:down) do |native_event|
71
- event = Native(native_event)
72
- if event[:keyCode].to_s == '13'
73
- # we prevent the input
74
- event.preventDefault()
75
- end
76
-
77
- end
78
-
79
- text_input.keyboard(:up) do |native_event|
80
- input_back.data=text_input.data
81
- end
82
- @atomes[:input_text] = text_input
83
-
84
- input_back
85
- end
86
-
87
- end
88
-
89
- def input(params = {}, &proc)
90
- text_color = :white
91
- text_size = 12
92
- back_color = :gray
93
- width = 2000
94
- in_b = EVe.new()
95
- in_b.input_box
96
- end
97
-
98
- i= input
99
-
100
- b=box({top: 0, left: 0, width: 33, height: 33})
101
- b.touch(true) do
102
- puts "i.data : #{i.data}"
103
- end
104
- i.left(66)
105
- i.color(:white)
106
- i.text.left(55)
107
-
108
-
109
-
110
-
111
-
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- button = box({smooth: 6,left: 55,top: 160, color:{red: 0.3, green: 0.3, blue: 0.3},id: :my_box})
4
- button.shadow({
5
- id: :s1,
6
- left: 3, top: 3, blur: 9,
7
- invert: true,
8
- red: 0, green: 0, blue: 0, alpha: 0.7
9
- })
10
- button.touch(true) do
11
- button.controller(:hello)
12
- end
13
- slider=box({ width: 333, height: 25, top: 45, left: 55, smooth: 9, color:{red: 0.3, green: 0.3, blue: 0.3}})
14
- slider.shadow({
15
- id: :s2,
16
- left: 3, top: 3, blur: 9,
17
- invert: true,
18
- red: 0, green: 0, blue: 0, alpha: 0.7
19
- })
20
- cursor= slider.circle({width: 30, height: 30, left: 2, top: 1, color:{red: 0.3, green: 0.3, blue: 0.3}})
21
-
22
- cursor.left(0)
23
- cursor.top(0)
24
- cursor.shadow({
25
- id: :s4,
26
- left: 1, top: 1, blur: 3,
27
- option: :natural,
28
- red: 0, green: 0, blue: 0, alpha: 0.6
29
- })
30
- label=text({data: 0, top: 69, left: 69, component: { size: 12 }, color: :gray})
31
- cursor.drag({ restrict: {max:{ left: 309, top: 0}} }) do |event|
32
- puts cursor.left
33
- value = cursor.left/309*100
34
- label.data(value)
35
- cursor.controller({ action: :setModuleParameterValue, params: { moduleId: 6456549897,parameterId: 9846546, value: value} })
36
-
37
- end
38
- support=box({top: 300, left: 55, width: 300, height: 40, smooth: 9, color:{red: 0.3, green: 0.3, blue: 0.3}, id: :support })
39
- support.shadow({
40
- id: :s3,
41
- left: 3, top: 3, blur: 9,
42
- invert: true,
43
- red: 0, green: 0, blue: 0, alpha: 0.7
44
- })
45
- support.import(true) do |content|
46
- puts "add code here, content: #{content}"
47
- end
48
-
49
- in_box=input_box
@@ -1,280 +0,0 @@
1
- # frozen_string_literal: true
2
- text(:hello)
3
- class Atome
4
-
5
- def build_tool(&bloc)
6
- # alert params[:tool]
7
- a = Atome.instance_exec(&bloc)
8
- puts "===> a is : #{a[:action]}"
9
- # check below
10
- wait 2 do
11
- send a[:action]
12
- end
13
- grab(:toolbox).box({color: :white, width: 33, height: 33})
14
- end
15
- end
16
-
17
- class Object
18
- def new(params, &bloc)
19
- # Genesis = Genesis.Genesis
20
- if params.key?(:atome)
21
- Universe.add_atomes_specificities params[:atome]
22
- Genesis.build_atome(params[:atome], &bloc)
23
- elsif params.key?(:particle)
24
- Atome.instance_variable_set("@main_#{params[:particle]}", bloc)
25
- # render indicate if the particle needs to be rendered
26
- # store tell the system if it need to store the particle value
27
- # type help the system what type of type the particle will receive and store
28
- Genesis.build_particle(params[:particle], { render: params[:render], return: params[:return],
29
- store: params[:store], type: params[:type] }, &bloc)
30
- elsif params.key?(:sanitizer)
31
- Genesis.build_sanitizer(params[:sanitizer], &bloc)
32
- elsif params.key?(:pre)
33
- Atome.instance_variable_set("@pre_#{params[:pre]}", bloc)
34
- elsif params.key?(:post)
35
- Atome.instance_variable_set("@post_#{params[:post]}", bloc)
36
- elsif params.key?(:after)
37
- Atome.instance_variable_set("@after_#{params[:after]}", bloc)
38
- elsif params.key?(:read)
39
- Atome.instance_variable_set("@read_#{params[:read]}", bloc)
40
- elsif params[:renderer]
41
- renderer_found = params[:renderer]
42
- if params[:specific]
43
- Universe.set_atomes_specificities(params)
44
- params[:specific] = "#{params[:specific]}_"
45
- end
46
- render_method = "#{renderer_found}_#{params[:specific]}#{params[:method]}"
47
- Genesis.build_render(render_method, &bloc)
48
- elsif params.key?(:callback)
49
- particle_targetted = params[:callback]
50
- Atome.define_method "#{particle_targetted}_callback" do
51
- bloc.call
52
- end
53
- elsif params.key?(:tool)
54
- A.build_tool(&bloc)
55
- end
56
- end
57
- end
58
-
59
- grab(:intuition).box({id: :toolbox, top: :auto, bottom: 0, left: 0, width: 50, height: 255})
60
-
61
- def record_tool
62
- grab(Universe.current_user).selection
63
- alert "must get selection to treat it "
64
- end
65
-
66
-
67
- module Intuition
68
- def intuition_int8
69
- # tool taxonomy and list
70
- {
71
- capture: { int8: { french: :enregistrement, english: :record, german: :datensatz } },
72
- communication: { french: :communication, english: :communication, german: :communication },
73
- tool: { french: :outils, english: :tools, german: :werkzeuge },
74
- view: { french: :vue, english: :view, german: :aussicht },
75
- time: { french: :horloge, english: :clock, german: :Uhr },
76
- find: { french: :trouve, english: :find, german: :finden },
77
- home: { french: :accueil, english: :home, german: :zuhause },
78
- code: { french: :code, english: :code, german: :code },
79
- impulse: { french: :impulse, english: :impulse, german: :impulse },
80
- }
81
- end
82
- def intuition_taxonomy
83
-
84
- end
85
-
86
- def impulse
87
- # tool start point
88
- [:capture, :communication, :tool, :view, :time, :find, :home]
89
- end
90
-
91
- # def capture
92
- # categories=ATOME.methods_categories
93
- # [categories[:inputs]]
94
- # end
95
- #
96
- # def communication
97
- # categories=ATOME.methods_categories
98
- # [categories[:communications]]
99
- # end
100
- #
101
- # def toolz
102
- # categories=ATOME.methods_categories
103
- # [categories[:spatials],categories[:helpers],categories[:materials],
104
- # categories[:geometries],categories[:effects],
105
- # categories[:medias],categories[:hierarchies],categories[:utilities],categories[:events]]
106
- # end
107
- #
108
- # def tool_style(size = 33)
109
- # # styling
110
- # shadows = [{ x: size / 15, y: size / 15, thickness: 0, blur: size / 3, color: { red: 0, green: 0, blue: 0, alpha: 0.3 } }, { x: -size / 15, y: -size / 15, thickness: 0, blur: size / 6, color: { red: 1, green: 1, blue: 1, alpha: 0.3 } }]
111
- # style = { type: :tool, content: { points: 4 }, color: { red: 0.9, green: 0.9, blue: 0.9, alpha: 0.15 }, parent: :intuition, shadow: shadows, blur: { value: 6, invert: true } }
112
- # return style
113
- # end
114
- #
115
- # def open_tool(tool_id, widthness=3, orientation=:x, speed=0.6)
116
- # if orientation == :x
117
- # orientation = :width
118
- # value = grab(tool_id).width
119
- # else
120
- # orientation = :height
121
- # value = grab(tool_id).height
122
- # end
123
- # animate({
124
- # start: { orientation => value },
125
- # end: { orientation => value * widthness },
126
- # duration: speed * 1000,
127
- # loop: 0,
128
- # curve: :easing,
129
- # target: tool_id
130
- # })
131
- # notification "find why this id #{self.atome_id}, add annimation callback to set overflow when anim complete"
132
- # grab(tool_id).overflow(:visible)
133
- # end
134
- #
135
- # def close_tool(tool_id, widthness, orientation, speed)
136
- # if orientation == :x
137
- # orientation = :width
138
- # value = grab(tool_id).width
139
- # else
140
- # orientation = :height
141
- # value = grab(tool_id).height
142
- # end
143
- # animate({
144
- # start: { orientation => value * widthness },
145
- # end: { orientation => value },
146
- # duration: speed * 1000,
147
- # loop: 0,
148
- # curve: :easing,
149
- # target: tool_id
150
- # })
151
- # # grab(tool_id).overflow(:hidden)
152
- # end
153
- #
154
- # def create_tool(tool_name, size = 33, x_pos = 0, y_pos = 33, offsset=0)
155
- # tool_created = tool(self.tool_style(size).merge({ parent: :main_menu, atome_id: "tool_" + tool_name, id: "tool_" + tool_name,
156
- # width: size, height: size, smooth: size / 9, overflow: :hidden, x: x_pos, y: y_pos, z: 1, content: [] }))
157
- # icon=tool_created.shape({ path: tool_name, width: size - size / 2, height: size - size / 2, center: true })
158
- # # name = intuition_list[tool_name][language]
159
- # particle({ atome_id: :tools_property_container, color: { red: 0.6, green: 0.6, blue: 0.6 } })
160
- # # we get the plugin code only if the plugin hasn't been interpreted before (unless condition below)
161
- # unless grab(:intuition).content.include? tool_name
162
- # ATOME.reader("./medias/e_rubies/tools/#{tool_name}.rb") do |data|
163
- # # todo add a security parser here
164
- # # we set the variable tool that can be used to facilitate plugin creation
165
- # data="tool=grab(:#{tool_created.atome_id})\n"+data
166
- # compile(data)
167
- # # we add the tool to the intuition content so it won't be loaded twice
168
- # grab(:intuition).content |= [tool_name]
169
- # end
170
- # end
171
- # # end
172
- # tool_created.active({ exec: false })
173
- # tool_created.inactive({ exec: false })
174
- # icon.touch(stop: true) do
175
- # if tool_created.active[:exec] == true
176
- # tool_created.color(:transparent)
177
- # tool_created.active(exec: false, proc: tool_created.active[:proc] )
178
- # tool_created.inactive(exec: true, proc: tool_created.inactive[:proc] )
179
- # else
180
- # tool_created.color({alpha: 0.3})
181
- # tool_created.active({ exec: true, proc: tool_created.active[:proc] })
182
- # end
183
- # end
184
- # end
185
- #
186
- # # we get menu entry point
187
- # def open_intuition(position = {})
188
- # position = { x: 0, yy: 0, size: 33, orientation: :vertical, offset: 0 }.merge(position)
189
- # # we get content language from view's language
190
- # if grab(:main_menu)
191
- # grab(:main_menu).delete
192
- # else
193
- # grab(:view).language
194
- # self.language(grab(:view).language)
195
- # orientation = position.delete(:orientation)
196
- # size = position.delete(:size)
197
- # offset = position.delete(:offset)
198
- # # positioning and scaling
199
- # if orientation == :vertical
200
- # requested_width = size
201
- # requested_height = (size+offset)* impulse.length
202
- # else
203
- # requested_width = (size+offset) * impulse.length
204
- # requested_height = size
205
- # end
206
- # tool({ atome_id: :main_menu, parent: :intuition, color: { alpha: 0 } }.merge(position).merge(width: requested_width, height: requested_height))
207
- # impulse.each_with_index do |item, index|
208
- # if orientation == :vertical
209
- # create_tool(item, size, 0, index * (size+offset))
210
- # else
211
- # create_tool(item, size, index * (size+offset), 0)
212
- # end
213
- # end
214
- # end
215
- # end
216
- end
217
- # atome class extension for eVe
218
-
219
- class Atome
220
- include Intuition
221
- # def atome(requested_property)
222
- # # add component list iin the content we maybe ahave to create a tool object because box can't handle this type of content
223
- # new_atome=self.tool({ atome_id: "#{self.atome_id}_#{requested_property}_atome_#{self.content.length}", x: 66})
224
- # new_atome.touch({ stop: true, option: :down}) do
225
- # color(:red)
226
- # new_atome.height = new_atome.height*3
227
- # end
228
- # new_atome.touch({ stop: true, option: :up}) do
229
- # color(:red)
230
- # new_atome.height = new_atome.height/3
231
- # end
232
- # notification "now we have to add an object or a new property (style) to store complete tool style including size and
233
- # orientation so we can position the new atome correctly"
234
- # # alert self.content.class
235
- # # alert self.content.length
236
- # # alert tool_style
237
- # end
238
- end
239
-
240
- # # we initialise the toolbox here :
241
- #
242
- # # the launch bar
243
- # launch_bar = box({ x: 0, y: 0, width: 33, height: "100%", parent: :intuition, z: 0, color: { alpha: 0 } })
244
- # launch_bar.touch({ option: :long }) do |evt|
245
- # size = 33
246
- # yy_touch_position = grab(:view).convert(:height) - evt.page_y
247
- # if yy_touch_position < size
248
- # #if the long touch is within the wanted area( in this at bottom of the screen) we open the menu
249
- # # launch_bar.open_intuition({ x: size, yy: 6,offset: 6, orientation: :horizontal, size: size })
250
- # launch_bar.open_intuition({ x: 6, yy: size,offset: 6, orientation: :vertical, size: size })
251
- # end
252
- # end
253
- #
254
- # # # # # # # # # # # # # # # tests below # # # # # # # # # # # # #
255
- #
256
- # list = molecule_analysis(@molecules_list)
257
- # notif list[:tools]
258
- # notif "======"
259
- # notif list[:molecules]
260
- # notif "======"
261
- # notif list[:atomes]
262
- # notif "======"
263
- # notif list[:molecules][:shadow]
264
-
265
- new({ tool: :capture }) do |params|
266
- tool = { id: :rec_01,
267
-
268
- name: :record, icon: :record, action: {open: [:sub_menu]}, code: :record_tool, position: { root: 1 }, # position can be multiple
269
- option: { opt1: :method_2 }, int8: { french: :enregistrement, english: :record, german: :datensatz } }
270
- tool
271
- end
272
-
273
-
274
- puts A.impulse
275
- # def fill_toolzone(tools_ids)
276
- #
277
- # end
278
- #
279
- # fill_toolzone(%i[files edition select group link copy undo settings])
280
-