atome 0.5.6.0.4 → 0.5.6.1.0

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: b631fc09724548cd4174533e5268f6372b99666faa476dc825bbc4e37ebcd1b3
4
- data.tar.gz: 55f81e5c141e9a4bada159e02196ae72d47fa60eac7b4c117b6c1c4dea3bddc9
3
+ metadata.gz: 66985b0d1acf2097aa11e2a9689259505c7740df5bfab53aece65f8c1ba41d90
4
+ data.tar.gz: '0012873d2c2b3ffa1ace79916653528bc729930c8d96a56a9fba96dabd36ee66'
5
5
  SHA512:
6
- metadata.gz: cd78709ac74a5ba36f1b5fb047f42f4610460cf38ca77a368585b832a2fbb478f57d9198cd07a3ddbd82352a8916a6885ff6faf6480c253a220a339c179d106c
7
- data.tar.gz: 7b1b793d748434f5a47f8f41843b6ed4e5ef8de0007cffe02ab4a278c5489a89c71e18f8ffa08cce9a8633a890a6970f1f5eb3fc463029801d028b869c3050a1
6
+ metadata.gz: 7ca3e5e5de3d1967319e113e85262fe6c98293c528e90033f474881776effee50bd89882479984b14595422668fb52af06e612cc87c4d3cc83524709e8bf2994
7
+ data.tar.gz: a7b97cff089977811808b83bd04bb30349c9184ad5562c54d43c1268bfc1d7aedecf46911460e90e8376eac6b8beb537644f5c1d886d6e14f73f3e50b33c3289
data/Rakefile CHANGED
@@ -8,6 +8,19 @@ require 'rubygems/uninstaller'
8
8
  require 'bundler/gem_tasks'
9
9
  load 'exe/atome'
10
10
 
11
+
12
+
13
+ folder_name = 'lib/eVe'
14
+
15
+ unless Dir.exist?(folder_name)
16
+ Dir.mkdir(folder_name)
17
+ File.open('lib/eVe/eVe_relative.rb', 'w') do |file|
18
+ end
19
+ File.open('lib/eVe/eVe.rb', 'w') do |file|
20
+ end
21
+ end
22
+
23
+
11
24
  task :cleanup do
12
25
 
13
26
  manager = Gem::CommandManager.instance
@@ -185,7 +198,7 @@ task :test_server do
185
198
  threads = []
186
199
  threads << Thread.new do
187
200
 
188
-
201
+ sleep 1
189
202
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
190
203
  # code to exec for Windows
191
204
  `start http://localhost:9292`
data/atome.gemspec CHANGED
@@ -22,17 +22,32 @@ Gem::Specification.new do |spec|
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
24
 
25
+ # spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ # `git ls-files -z`.split("\x0").reject do |f|
27
+ # (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
+ # end
29
+ # end
25
30
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
- `git ls-files -z`.split("\x0").reject do |f|
31
+ # Utilisez git ls-files pour récupérer les fichiers, puis filtrez-les selon vos besoins
32
+ git_files = `git ls-files -z`.split("\x0").reject do |f|
27
33
  (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
34
  end
35
+
36
+ # Ajoutez manuellement les fichiers du dossier lib/eVe
37
+ eve_files = Dir['lib/eVe/**/*']
38
+
39
+ # Combine les deux listes de fichiers
40
+ git_files + eve_files
29
41
  end
30
42
 
31
43
  spec.bindir = 'exe'
32
44
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
45
  spec.require_paths = ['lib']
34
46
 
47
+
48
+ spec.add_runtime_dependency 'artoo', '~> 1.8.2'
35
49
  # spec.add_runtime_dependency 'arduino_firmata', '~> 0.3'
50
+ spec.add_runtime_dependency 'eVe', '~> 0.1.0'
36
51
  spec.add_runtime_dependency 'eventmachine', '~> 1.2.7'
37
52
  spec.add_runtime_dependency 'faye-websocket', '~> 0.1'
38
53
  spec.add_runtime_dependency 'geocoder', '~> 1.8'
@@ -40,6 +55,7 @@ Gem::Specification.new do |spec|
40
55
  # spec.add_runtime_dependency 'guard-shell', '~> 0.7.2'
41
56
  # spec.add_runtime_dependency 'guard-puma', '~> 0.8.1'
42
57
  # spec.add_runtime_dependency 'shotgun', '~> 0.9.2'
58
+ spec.add_runtime_dependency 'gems', '~> 1.2'
43
59
  spec.add_runtime_dependency 'guard-rake', '~> 1.0'
44
60
  # spec.add_runtime_dependency 'rerun', '~> 0.14.0'
45
61
  spec.add_runtime_dependency 'image_size', '~> 3.0'
@@ -58,12 +74,11 @@ Gem::Specification.new do |spec|
58
74
  spec.add_runtime_dependency 'sequel', '~> 5.5'
59
75
  spec.add_runtime_dependency 'sqlite3', '~> 1.4'
60
76
  spec.add_runtime_dependency 'uglifier', '~> 0.1'
61
- #spec.add_runtime_dependency 'webrick', '~> 1.7.0'
77
+ # spec.add_runtime_dependency 'webrick', '~> 1.7.0'
62
78
  # the gem below are need to make the atome server works on Windows
63
79
  spec.add_runtime_dependency 'tzinfo-data', '~> 1.2023.4'
64
80
  spec.add_runtime_dependency 'win32-security', '~> 0.5.0'
65
81
 
66
-
67
82
  # Uncomment to register a new dependency of your gem
68
83
  # spec.add_dependency "example-gem", "~> 1.0"
69
84
 
data/exe/atome CHANGED
@@ -8,6 +8,8 @@ require 'pathname'
8
8
  require 'opal'
9
9
  require 'parser'
10
10
  require 'uglifier'
11
+ require 'rubygems'
12
+ require 'gems'
11
13
 
12
14
  # utils
13
15
 
@@ -184,7 +186,6 @@ def create_application(source, destination, project_name)
184
186
  end
185
187
 
186
188
  def update_application(source, destination, project_name)
187
- `gem install atome`
188
189
  project_path = "#{destination}/#{project_name}"
189
190
  FileUtils.mkdir_p(destination) unless Dir.exist?(destination)
190
191
  FileUtils.mkdir_p(project_path) unless Dir.exist?(project_path)
@@ -479,34 +480,58 @@ if ARGV.include?('create')
479
480
  end
480
481
 
481
482
  if ARGV.include?('update')
483
+ `gem install atome`
482
484
  # TODO: also update index.html and all other files except the application folder
483
- # first we delete everything but application
485
+ # we check we are in atome app
486
+ if Dir.exist?("#{destination}/application") && !Dir.exist?("#{destination}/vendor")
487
+ # first we delete everything but application
484
488
 
485
- files_to_treat = %w[server src-tauri src-wasm Guardfile Rakefile src/css src/js/atome src/js/third_parties src/medias
489
+ files_to_treat = %w[server src-tauri src-wasm Guardfile Rakefile src/css src/js/atome src/js/third_parties src/medias
486
490
  src/favicon.ico src/index_wasm.html src/index_opal.html src/index_server.html src/index_server_wasm.html]
487
- files_to_treat.each do |item|
488
- item_path = File.join(destination, item)
489
- if File.directory?(item_path)
490
- FileUtils.rm_rf(item_path) unless item == '.' || item == '..'
491
- elsif File.file?(item_path)
492
- File.delete(item_path)
491
+ files_to_treat.each do |item|
492
+ item_path = File.join(destination, item)
493
+ if File.directory?(item_path)
494
+ FileUtils.rm_rf(item_path) unless item == '.' || item == '..'
495
+ elsif File.file?(item_path)
496
+ File.delete(item_path)
497
+ end
498
+ source_item = "#{source}/vendor/assets/#{item}"
499
+ FileUtils.cp_r(source_item, item)
493
500
  end
494
- source_item = "#{source}/vendor/assets/#{item}"
495
- FileUtils.cp_r(source_item, item)
501
+ # now rebuilding aop lib
502
+ # build opal
503
+ build_opal_library(source, destination, project_name)
504
+ # build parser
505
+ build_opal_parser(source, destination, project_name)
506
+ # build atome kernel
507
+ build_atome_kernel_for_opal(source, destination, project_name)
508
+ # build host_mode
509
+ build_host_mode(destination, project_name, 'web-opal')
510
+ # build Opal extensions
511
+ build_opal_extensions(source, destination, project_name)
512
+ # build application
513
+ build_opal_application(source, destination, project_name)
514
+
515
+ ########################
516
+
517
+ # unless Dir.exist?("#{destination}/vendor")
518
+ # Dir.mkdir("#{destination}/vendor")
519
+ # end
520
+
521
+ #######################
522
+
523
+ puts "your application is up to date"
496
524
  end
497
- # now rebuilding aop lib
498
- # build opal
499
- build_opal_library(source, destination, project_name)
500
- # build parser
501
- build_opal_parser(source, destination, project_name)
502
- # build atome kernel
503
- build_atome_kernel_for_opal(source, destination, project_name)
504
- # build host_mode
505
- build_host_mode(destination, project_name, 'web-opal')
506
- # build Opal extensions
507
- build_opal_extensions(source, destination, project_name)
508
- # build application
509
- build_opal_application(source, destination, project_name)
525
+
526
+ # now we get the version of the atome gem
527
+ gem_name = 'atome'
528
+
529
+ # Obtenez les informations du gem depuis RubyGems.org
530
+ gem_info = Gems.info(gem_name)
531
+
532
+ # Extrait la version la plus récente du gem
533
+ latest_version = gem_info['version']
534
+ puts "#{gem_name} #{latest_version} is now installed "
510
535
 
511
536
  end
512
537
 
@@ -690,14 +715,14 @@ else
690
715
  build_opal_application(nil, destination, project_name)
691
716
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
692
717
  # code to exec with Windows
693
- # `start #{destination}\\#{project_name}\\src\\index_server.html`
718
+ # `start #{destination}\\#{project_name}\\src\\index_server.html`
694
719
  `start http://localhost:9292`
695
720
  elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
696
721
  # code to exec with MacOS
697
722
  `open http://localhost:9292`
698
723
  else
699
724
  # code to exec with Unix/Linux
700
- `open http://localhost:9292`
725
+ `open http://localhost:9292`
701
726
  end
702
727
  end
703
728
 
data/lib/atome/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  # return atome version
4
4
  class Atome
5
- VERSION = '0.5.6.0.4'
5
+ VERSION = '0.5.6.1.0'
6
6
  end
7
7
 
data/lib/atome.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
- # require 'eve'
3
2
 
4
3
  # require without relative is needed when using Opal
5
4
  require 'fileutils'
@@ -34,4 +33,5 @@ require 'renderers/html/index'
34
33
  require 'renderers/headless/index'
35
34
  require 'renderers/server/index'
36
35
  require 'atome/helpers/sanitizer'
36
+ require 'eVe/eVe'
37
37
  require 'atome/genesis/sparkle'
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
- # require 'eve'
3
2
  # relative is needed when using ruby wasm
4
3
  require 'fileutils'
5
4
  require 'securerandom'
@@ -33,4 +32,5 @@ require_relative './renderers/html/index_relative'
33
32
  require_relative './renderers/headless/index_relative'
34
33
  require_relative './renderers/server/index_relative'
35
34
  require_relative './atome/helpers/sanitizer'
35
+ require_relative './eVe/eVe_relative'
36
36
  require_relative './atome/genesis/sparkle'
data/lib/eVe/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ /*******************************************************
2
+ * Copyright (C) 2019-2020 atome http://atome.io
3
+ *
4
+ * This file is part of atome.
5
+ *
6
+ * eVe can not be copied and/or distributed without the express
7
+ * permission of atome
8
+ *******************************************************/
data/lib/eVe/README.md ADDED
@@ -0,0 +1,350 @@
1
+ # eVe
2
+
3
+ ![](../ressources/icons/100.png)
4
+
5
+ Cross platform development
6
+ -
7
+
8
+ To install application and run:
9
+
10
+ Insert eVe project at the root of atome framework and run atome
11
+
12
+
13
+ I - The framework
14
+ -
15
+
16
+ - atome is a cross platform development environment.
17
+ all apis work across all platform, to ensure the exact same rendering on Android, Freebsd, linux, MacOs, Web, Windows.
18
+
19
+ - atome can create build web site, mobile or desktop applications, games, presentations...
20
+
21
+ - atome is entirely open source as well as all the included libraries.you can do what you want want with it, the whole framework offer a permissive open source licence.
22
+
23
+ - atome comes with a powerful multi-rendering engine (it can render any atome object across several different render engine simultaneously )
24
+
25
+ - atome's solutions can be deploy as a client, a server or both
26
+
27
+ - the framework is totally hybrid, it means it can be executed in a web browser, a web view or as a full native application
28
+
29
+ - ***(eVe only) when deploy as a server, any machine can host the server even without running, PHP , ruby, ...
30
+
31
+ - any application created with it can be used as a data holder, in this case it behave like an universal multimedia document ( think pdf with sound , videos, animations, interactivity, entirely scriptable, ....)
32
+
33
+ - the powerful scripting engine can script any atome object on the fly at runtime.
34
+
35
+
36
+ II Guideline and philosophy
37
+ -
38
+
39
+ The idea behind the atome concept is to have a kind of "universal portable intelligent document", this means :
40
+
41
+ - no filetype but instead unique objet called an atome (that could a text, an image, a group of object , a video, an efect, ..). This atome can then be mnanipulated by any availlable api.
42
+
43
+ The object uniq architecture bring us lot of new features:
44
+
45
+ - Simplfly the automatisation of batch process as the object is always the same whatever it is (from a simple box thru a video montage to a complex page description) it's always an atome)
46
+ - Simplfy the devellopment and tests of new tools. Ruby language allow you to script anything on the fly
47
+ - Reduce the number of tools needed for an application. (you dont ever have to wrote a specific tool for a specific medias anymore, as the same tool now work on any atome.
48
+ - and many many other ...
49
+ to keep this idea working we have to follow the following rules during atome development :
50
+
51
+ - All Apis must run of all targeted platform (their should be no diiference form one platform to another.
52
+ - any property or new api must always work on any type of atome, to keep the consistency of the "atome uniq object"
53
+
54
+ III - main Open source Software included
55
+ -
56
+ - Cordova : a cross platform framework to create applications with web view rendering (https://cordova.apache.org)
57
+
58
+ - Urho3D : is a cross platform 3D rendering and game engine used create native applications(or web rendering) using Webassembly (https://urho3d.github.io)
59
+
60
+ - FreeBSD : is a Unix environment with jails, allow to create and boot embedded applications on any compatible machine (standard PC, Raspberry, Beaglebone, etc..) (https://www.freebsd.org/fr/)
61
+
62
+ - Ruby : is the language used to script all atomes apis (https://www.ruby-lang.org)
63
+
64
+ - Opal : is a ruby gem used to compile the ruby language to JS (https://opalrb.com)
65
+
66
+ - Roda : is a ruby web framework that hold the server version of atome (https://roda.jeremyevans.net)
67
+
68
+ - Puma : is a ruby web server to start the server version of atome (https://puma.io)
69
+
70
+ - Jquery : is a js framework to simplify JS development (https://jquery.com)
71
+
72
+ - ZimJS : is a html canvas rendering 2D engine (https://zimjs.com)
73
+
74
+ - Konva : is a html canvas rendering 2D engine (https://konvajs.org)
75
+
76
+ - FabricJS : is a html canvas rendering 2D engine (http://fabricjs.com)
77
+
78
+ - ThreeJS :is a html canvas rendering 3D engine (https://threejs.org)
79
+
80
+ - QAudio : a cross-platform C++ library for Audio Digital Signal Processing (https://cycfi.github.io/q/)
81
+
82
+
83
+ IV - Architecture of the folders
84
+ -
85
+ The atome framework is mainly based on a Cordova project, but add the following additional features :
86
+
87
+ - a ruby interpreter
88
+
89
+ - a web server
90
+
91
+ - a native mode with 3D rendering (the 3D engine is currently based on Urho3D).
92
+
93
+ - a low latency audio system
94
+
95
+ -a bootable option for embedded applications
96
+
97
+ The folders dedicated to the atome framework are :
98
+
99
+ - The app folder : contain all end user scripts
100
+
101
+ - The atome folder : it contain the atome ruby's gem, this is basically the heart of the framework
102
+ - atome : this is the object it self
103
+ - atome class is found in the atome.rb files
104
+ - this class contain 5 main methods named SAGED for Set - Add - Get - Enliven - Delete
105
+
106
+ - proton : contain all the default property's value when creating new object
107
+
108
+ - photon : contain all properties that define the physical aspect of the object to be renderer on a device, (visuals, sound , haptic...) ex: color, width
109
+
110
+ - neutron : contain all properties that are conceptual and do not need to be rendered in the view.
111
+ ex : selector, touch , child
112
+
113
+ - electron : contain a collection of utilities (functions) to work easier with atomes's objects
114
+
115
+ - big bang : initiate the atome environment
116
+
117
+ - The documentations folder : it contains infos and documentations of the framework ( how to install it , enhance it or use it )
118
+
119
+ - The opal_compiler : contains two files:
120
+
121
+ - opal_add_on.rb is a set of functions to enhance opal renderer, the parser
122
+
123
+ - parser.rb is used to allow 'on the fly' atome scripting in the web view when using the opal compiler
124
+
125
+ - The renderers folder :contains any rendering engine such as :
126
+
127
+ - html for pure js rendering
128
+
129
+ - Headless for text only rendering of atome's objects
130
+
131
+ - Vocals to render atomes as an audio description
132
+
133
+ - Urho3D for native rendering
134
+
135
+ - FabricJS for 2D rendering in canvas's web view
136
+
137
+ - ZIMJS for an alternative 2D rendering in canvas's web view
138
+
139
+ - Konva for an alternative 2D rendering in canvas's web view
140
+
141
+ - ThreeJS for 3D rendering in canvas's web view
142
+
143
+ - The scripts folder contains all the files to automatise the install of atome framework
144
+
145
+ - The rakefile file use to automatise the launch of atome framework
146
+
147
+ - The index.js in www/public/js contains js functions and utility for the web rendering of atome engine
148
+
149
+ - The index.html in www/public/ to initiate the web version of atome
150
+
151
+
152
+ V - Rendering engine
153
+ -
154
+
155
+ - NativeJS (web)
156
+ - ZimJS (web)
157
+ - Konva (web)
158
+ - FabricJS (web)
159
+ - ThreeJS (web)
160
+ - Urho3D (native or web with web assemebly)
161
+ - futur use case ( Unity, Unreal, Juce, ....)
162
+
163
+
164
+ VI - running method
165
+ -
166
+
167
+ - web (opal)
168
+ - server (roda)
169
+ - stand alone (Freebsd )
170
+ - native (urho 3D)
171
+
172
+
173
+
174
+ VII - what is an atome object
175
+ -
176
+ an atome is a collection of properties
177
+
178
+
179
+ - Anything that define an atome is a property.
180
+ any atome can contain an other atome or a group of atomes as a property ex:
181
+
182
+
183
+ b=box()
184
+ i=image(:logo)
185
+ c=circle()
186
+ t=text("hello)
187
+ c.atome(b)
188
+ puts c.child #=> c (b is now a child of c
189
+ b.group([i,t])
190
+ puts b.child #=> [i,t] (i and t ares now a child of b
191
+
192
+ please note that child method is always singular, even when if it return many children!
193
+
194
+ The atome properties are always define using a key-value pair (Hash type). those values can be a String, an Integer, a hash(key-value) or an array.
195
+ The atome can receive a second optional parameters to refresh the view or not.
196
+ in this case the atome is till rendered in the view but the newly added parameters does not refresh the objet.
197
+ (Please not the 'refresh option' behavior is not the same as the render property, the refresh option is used when a property is modify by the view it self we want to modification to be stored into the atome structure, but but want the view to be re-rendered)
198
+
199
+ - Any property can be define using an unique value (passed as a String , Symbole or a numeric value)
200
+
201
+
202
+ a=box({color: :red})
203
+ a.color(:red)
204
+ a.set({color: :red})
205
+
206
+ - Any property define are store internally as a Hash or an array if the property is define many times
207
+
208
+
209
+ a=box()
210
+ a.color(:red)
211
+ puts a.color #=> {color: :red}
212
+
213
+ - to set a complex property such as shadow that needs more more than one parameters we have to send a hash to the atome
214
+
215
+ please note that any property can potentially have multiples parameters even the simplest one
216
+
217
+ a=box()
218
+ a.set({x: {content: 200, unit: :meters})
219
+
220
+ - Any property are stackable (even the simplest one), in this case we used the 'add' method to stack prop. alternatively it's possible to used an array to stack properties
221
+
222
+ a simple gradient :
223
+
224
+ b=box()
225
+ b.color([{color: :red, top: 0}, {color: :blue, bottom: 0}])
226
+
227
+
228
+ - all properties are treated identically and can be swap at any time.Type mutation is also possible : ex change the type of object from an image to text type
229
+
230
+ x=image(:boat)
231
+ x.type(:text) #now the objet is rendered as a text object
232
+
233
+
234
+ here some possible definition of an atome
235
+
236
+
237
+ a=box({color: red}) # an red box is created
238
+ a.set(smooth: 3) # the box has rounded corner the view is refreshed
239
+ a.set({width: 250},true )# the box is now 250px wide the view is forced to refresh
240
+ a.set({border: :orange, thickness: 3}, false) #the atome is still red the view is not refreshed (no border!)
241
+ a.set([[color: :red, top: 20],[color: :blue, bottom: 0]], false) #the first parameters is an array that contain an array of color to allow a gradient , finally the view is not refreshed the atome remains 'red'.
242
+ a.color([{color: :yellow, top: 0}, {color: :orange, bottom: 0}]) # another way to set the atome property using the property name instead of using the 'set' methods, this time the view is refreshed
243
+
244
+ VIII - Enhancing the atome framework
245
+ -
246
+
247
+ how to create new type:
248
+ ex create a "web" type
249
+
250
+ - if a visuals are required for the new created, you have to add the following lines in the proton.rb file within 'module Proton':
251
+
252
+
253
+ @@web = @@visual.merge(@@shape).merge(type: :web, preset: :web)
254
+
255
+
256
+ the presets method create a new hash that hold the basics properties of the new atome type(in this case web type), it is need if you want to define the visual default representation of the type
257
+
258
+ - in proton.rb, the module Proton contains the 'presets' method you have to return the newly created ex:
259
+ return {box: box, circle: circle, text: text, image: image, video: video, audio: audio, particle: particle, tool: tool, web: web}
260
+
261
+
262
+ - optionally you can define a new function that behave like a shortcut to create a preconfigured object. In this case a "web" function
263
+ will create the shortcut.
264
+ ex add the following function in the big_bang.rb file:
265
+ (To be consistent the function should have the name of the newly created type)
266
+
267
+
268
+ def web(options = nil)
269
+ if options && (options[:render]==false || options[:render]==:false )
270
+ refresh=false
271
+ else
272
+ refresh=true
273
+ end
274
+ atome = Atome.new(:web, refresh)
275
+ if options && (options.class == Symbol || options.class == String)
276
+ atome.send(:content, options)
277
+ elsif options && options.class == Hash
278
+ options.each_key do |param|
279
+ value = options[param]
280
+ atome.send(param, value)
281
+ end
282
+ end
283
+ return atome
284
+ end
285
+
286
+
287
+ - neutron.rb file add the following lines :
288
+
289
+
290
+ def web params = nil, refresh = true, add = false
291
+ tag = :web
292
+ web = Atome.new(tag)
293
+ if params.class == String || params.class == Symbol
294
+ params = {content: params}
295
+ elsif params.class == Hash
296
+ self.child.each do |child|
297
+ if child.type == tag
298
+ params.keys.each do |key|
299
+ value = params[key]
300
+ child.send(key, value)
301
+ end
302
+ end
303
+ end
304
+ end
305
+ web.set(params)
306
+ self.group(web)
307
+ web.x(0)
308
+ web.y(0)
309
+ return web
310
+ end
311
+
312
+ def web= params = nil, refresh = true, add = false
313
+ web(params, refresh, add)
314
+ end
315
+
316
+
317
+ There two possibles ways to build an atome object:
318
+
319
+ - using the Atome class
320
+
321
+ a=Atome.new(:box)
322
+
323
+
324
+ - or the lazy the way using preset
325
+
326
+ a=box()
327
+
328
+
329
+
330
+
331
+ IX - working with atome framework
332
+ -
333
+ any atome properties can be set using a unique value using the syntax below :
334
+
335
+ a=box()
336
+ a.color(:red)
337
+ a.x=200
338
+
339
+
340
+ you can send also the properties to the atome using parenthesis ou the equal sign:
341
+
342
+ a=box()
343
+ a.x(300)
344
+ a.y=500
345
+
346
+
347
+ X - logic and datas flows
348
+ -
349
+
350
+
@@ -0,0 +1,2 @@
1
+ # Adress atome.one :
2
+ 5.196.69.103
data/lib/eVe/eVe.rb ADDED
@@ -0,0 +1 @@
1
+ puts "so cool!!!"
@@ -0,0 +1 @@
1
+ puts "so good!!!"
data/lib/eVe/todo.txt ADDED
@@ -0,0 +1,147 @@
1
+
2
+ Urgent :
3
+ - Drag and drop
4
+ - Save
5
+ - user strategy
6
+ - U.I.
7
+ - IDE
8
+ - Embeded versionnb v
9
+
10
+ tool composition tool :
11
+ - Examples
12
+ - Api name
13
+ - Definition
14
+ - usages
15
+ - copyright
16
+ - price
17
+ - Author
18
+ - presets
19
+ - connex tools
20
+ - code
21
+ - version of Api
22
+ - create a two way return method. ex : e.x => 50 e.x_incept => {content: :50, dynamic => true, reference: :view}
23
+ - suppress all @@ class varaible
24
+ - find a solution when setting text if we want to position it corecctly and obtain the correct size using the value api when have to set prop in this order:find a way to set the prop in any order : text_title.width(:auto)
25
+ text_title.x = 80
26
+ text_title.xx = 80
27
+ text_title.y = 0
28
+ - add adaptive size: for width and height too:
29
+ - create method accumulate so the next obect is postioned after the precedent etheir along x or y axis, with an optional offset
30
+ - to modify text lines aligenments t.child.align(:distribute/x/xx, center) text_title.size(34)
31
+ - bug when inserting an object into another if the insertted object is centererd before grouping its position is incorect
32
+ - change width according to the right align
33
+ - enliven still need a bit od refinement
34
+ - to test: read_code in help.rb ( reactive the commented lines)
35
+ - if object position is specified using xx then when dragging it should remain relative to xx not to x
36
+ - todo objet masking and stencil with boolean
37
+ - bug width anim help error with border radius
38
+ - add or check if a delete property exist and relaly delete the property and it's value
39
+ - bug text menu on resize start in method render_resize in html.rb file
40
+ - finish to add monitor to all apis
41
+ - verify object in object
42
+ - check old group method for group in group!!
43
+ - create detach method
44
+ - .bat script on windows to install atome
45
+ - check group add child nd parent respectively
46
+ - check ungroup both remove parent and child property
47
+ - unify (group/child) - (attach-parent) (detach-ungroup)
48
+ - Help.render bug, Help.volume_example bug
49
+ - reflection if presets are global or specific to a atype , cf preset :red only available for color or also for text
50
+ - allow to create new preset
51
+ - Better alert system
52
+ - create objext in object example
53
+ - create rotation example
54
+ - finish attach api (group inverse)
55
+ - Important : Objet created in objet are not centered anymore!!
56
+ - Important : check if event are re-injected when setting events before sending type to the view
57
+ - create a console objet and redirect the js console to the new console
58
+ - bug when enliven a draggable object
59
+ - bug when enliven an object whith children. Children are nor enliven
60
+ - add Urho 3D rendering (Mruby)
61
+ - Arduino (shell acces from cordova)
62
+ - Create menu
63
+ - U.I.
64
+ - Save mecanism (DB and file)
65
+ - check Roda and native Ruby
66
+ - websocket
67
+ - restore ide
68
+ - create console
69
+ - Add Q-Audio native library binding
70
+ - remove all comment when creating production version
71
+ - Kind of bug, if we run the script 'default_values' in Help then the 'enliven' script position are not consistent because the position is first set using x and then override by left and top (is it a bug?)
72
+ - record media
73
+ - allow iframe integration
74
+ - object type permutation
75
+ - Help.drag bug object are persistent when modifying or re running the script
76
+ - drag api is badly formated and not send the same manner to the render when restoring from @drag other event api with proc may have the same propblem
77
+ - when using b=box(); c=b.circle({x: 20}) objet are badly positioned
78
+ - text tabulation is rendered
79
+ - Align bug for text
80
+ - unify all finite value with value 0 to 1
81
+ - render_fill bug when using % or px (html.rb line 308 - 317
82
+ - enhancement check Preset algorythm behavior, it should create an atome accordingg to the type then apply the preset's optional proprties (also check if the type and the the presetare corectly fromated and saved)
83
+ - bug when changing image content if a size it is reset
84
+ - better integration of web iframe
85
+ - image can't be created using Atome.new({"id"=>"logo", "type"=>"image", "content"=>"atome", "preset"=>"box", "size"=>33.33333333333333, "top"=>8.333333333333334, "left"=>8.333333333333334, "shadow"=>{"color"=>"rgba(0,0,0,0.3)", "blur"=>16, "x"=>0, "y"=>0}})
86
+ - rename drag event page_x to x
87
+ - out api (when over)
88
+ - ensure atome_id unicity
89
+ - drag api on mobile kill any touch set before the drag but doesn't on desktop
90
+ - conflict between get(id) and atome.get
91
+ - anim callback
92
+ - internationalisation
93
+ - multi render engine
94
+ - group store only the iD of the object grouped not the atome
95
+ - add dynamic option to center api to allow recentering on resize
96
+ - add an offset option when using the center api
97
+ - add target option to center api to allow centering according to another object
98
+ - parent api should return the id instead of the atome_id to be easier for coder
99
+ - bug : when writing b=box();b.x=b.y=300;alert b.info.join("\n") it crash
100
+ - add rotation pivot option
101
+ - infos tools
102
+ - select tool
103
+ - Make tests
104
+ - unify unit ( 0 to 1) for all values
105
+ - change color so when a user specify a purple color it create a "purple" preset, the atome then look like this :
106
+ [type: :shape, preset: :box, red: [child: :purple],green: [child: :purple],blue: [child: :purple],alpha: [child: :purple],cyan: [child: :purple],magenta: [child: :purple],yellow: [child: :purple],key: [child: :purple]]
107
+ - anim param as a block and param used to acitvate desavtivate anim : b.anim(true) do |evt|; start: {x: 0}, end: {x: 200}, duration: 150, target: b.id; end
108
+ - Collaboration
109
+ - User account
110
+ - Rights managements
111
+ - Multidevice acccount access and datas retreive
112
+ - import asset with drag an drop
113
+ - Int8!
114
+ - Accessibility
115
+ - keep current content in event (allow the use of self in bloc) proc.call(evt) if proc.is_a?(Proc) #instance_eval(&proc) if proc.is_a?(Proc)
116
+ - on overflow
117
+ - name and store events in a list to remove those events by their names
118
+
119
+ - remove all code in backtick from html.rb file
120
+ - pb de css filter qui s'efface le precedent quand on en ajoute un nouveau
121
+
122
+
123
+ eVe Tools to do :
124
+ done - bug with Help module and topic name if topic is an atome function etheir the topic is not display or the atome methode doesnt work
125
+ pone - bug if help is call before background the app is freeze
126
+ done - pb drag ex a.drag(true) (sans bloc do end)
127
+ done - remove jquery UI css error
128
+ done - add romain Arc
129
+ done - put all render methods in html.rb file in a module
130
+ done - delete child when deleting group
131
+ done - clean up code
132
+ done - correct deletion strategy for object
133
+ done - on resize (for view)
134
+ done - Allow youtube integration
135
+ done - replace refresh by render property in atome api ex: box({color: :red, render: false})
136
+ done - bug in 'every' api that stop after 5 times
137
+ done - Help.render crash the help application
138
+ done - finish fit function
139
+ done - catch eror when a media is messing to avoid : "[]: undefined method `[]' for nil"
140
+ done - add_prop_to_all child crash
141
+ done - allow default value for atome to be parametric
142
+ done - verify selectable is possible( for objet and text)
143
+ Done - a regression prevent resurection to work
144
+ Done - refresh rake compile when modifying atome libs
145
+ done - resize method (scale)
146
+ Done - puts render in a class Render with optional rendering engine( mfor multiples simultaneaous rendering)
147
+ Done - puts the render methods in a module
@@ -2,3 +2,4 @@
2
2
 
3
3
  # render methods
4
4
  require 'opal'
5
+
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.0.4
4
+ version: 0.5.6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Eric Godard
@@ -10,6 +10,34 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2024-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: artoo
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.8.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.8.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: eVe
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.0
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: eventmachine
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +94,20 @@ dependencies:
66
94
  - - "~>"
67
95
  - !ruby/object:Gem::Version
68
96
  version: '2.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: gems
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.2'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.2'
69
111
  - !ruby/object:Gem::Dependency
70
112
  name: guard-rake
71
113
  requirement: !ruby/object:Gem::Requirement
@@ -388,7 +430,6 @@ files:
388
430
  - exe/atome
389
431
  - lib/atome.rb
390
432
  - lib/atome/atome.rb
391
- - lib/atome/eve.rb
392
433
  - lib/atome/extensions/atome.rb
393
434
  - lib/atome/extensions/geolocation.rb
394
435
  - lib/atome/extensions/mathematics.rb
@@ -433,6 +474,13 @@ files:
433
474
  - lib/atome/presets/atome.rb
434
475
  - lib/atome/version.rb
435
476
  - lib/atome_relative.rb
477
+ - lib/eVe/LICENSE
478
+ - lib/eVe/README.md
479
+ - lib/eVe/documentation/Backup_docs.zip
480
+ - lib/eVe/documentation/server.md
481
+ - lib/eVe/eVe.rb
482
+ - lib/eVe/eVe_relative.rb
483
+ - lib/eVe/todo.txt
436
484
  - lib/platform_specific/opal/atome_opal_extensions.rb
437
485
  - lib/platform_specific/opal/extensions/color.rb
438
486
  - lib/platform_specific/opal/extensions/geolocation.rb
data/lib/atome/eve.rb DELETED
File without changes