atome 0.5.6.3.0 → 0.5.6.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -2
  3. data/atome.gemspec +15 -7
  4. data/exe/atome +7 -0
  5. data/lib/atome/genesis/particles/atome.rb +4 -0
  6. data/lib/atome/kernel/universe.rb +1 -1
  7. data/lib/atome/version.rb +1 -1
  8. data/lib/atome.rb +19 -14
  9. data/lib/atome_relative.rb +19 -14
  10. metadata +29 -27
  11. data/lib/eVe/LICENSE +0 -8
  12. data/lib/eVe/README.md +0 -350
  13. data/lib/eVe/documentation/Backup_docs.zip +0 -0
  14. data/lib/eVe/documentation/server.md +0 -2
  15. data/lib/eVe/eVe.rb +0 -4
  16. data/lib/eVe/eVe_relative.rb +0 -4
  17. data/lib/eVe/lib/examples/site.rb +0 -34
  18. data/lib/eVe/lib/init.rb +0 -54
  19. data/lib/eVe/lib/intuition/inputs.rb +0 -111
  20. data/lib/eVe/lib/intuition/sliders.rb +0 -49
  21. data/lib/eVe/lib/intuition/toolbox.rb +0 -280
  22. data/lib/eVe/lib/version.rb +0 -11
  23. data/lib/eVe/todo.txt +0 -147
  24. /data/lib/atome/genesis/{generators/atome.rb → atome.rb} +0 -0
  25. /data/lib/atome/genesis/{generators → particles}/communication.rb +0 -0
  26. /data/lib/atome/genesis/{generators → particles}/effect.rb +0 -0
  27. /data/lib/atome/genesis/{generators → particles}/event.rb +0 -0
  28. /data/lib/atome/genesis/{generators → particles}/geometry.rb +0 -0
  29. /data/lib/atome/genesis/{generators → particles}/hierarchy.rb +0 -0
  30. /data/lib/atome/genesis/{generators → particles}/identity.rb +0 -0
  31. /data/lib/atome/genesis/{generators → particles}/material.rb +0 -0
  32. /data/lib/atome/genesis/{generators → particles}/property.rb +0 -0
  33. /data/lib/atome/genesis/{generators → particles}/security.rb +0 -0
  34. /data/lib/atome/genesis/{generators → particles}/spatial.rb +0 -0
  35. /data/lib/atome/genesis/{generators → particles}/time.rb +0 -0
  36. /data/lib/atome/genesis/{generators → particles}/utility.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b67c526f768d07f3a35dddac7830fcc475aeae494ee6dc60c8c1c0bc3a082377
4
- data.tar.gz: 3c464ae8bb19b68575c7575648546bd73b9b959a36426036a508fdc39e020e2f
3
+ metadata.gz: '096fbd8976e0d3a196119fb1bd219c74493a11fa8c55f2e9318c4d4b32308416'
4
+ data.tar.gz: 460edf9559799b4991287cd0970ff5cba101e57186eef625fc4774f035e2310e
5
5
  SHA512:
6
- metadata.gz: 63c46c74404bc6c010b0e4ce37734a141c98ded6282e51a4f3ce2cff6e42b90fd1906f712470f7346e4dfe95f76c2d81f9a2d510710ecb809b4b9e164ad91d9d
7
- data.tar.gz: 14c022bfd5e86840306749f5606ea32468322917bde284c396cd841c3cec4a9f70fbb2334ca130ab07472026f792015ec8a63243f6007e1af32a5008cb95f5a1
6
+ metadata.gz: a9ea992a2739715313875de3ec35e36622da17081768966b4870ccc67edd828990aef07e348a5a01b58169a7ad5be9b37de71f113414d0c2876d4b05df0548f9
7
+ data.tar.gz: 0775056d33e35b50280f9645b522d0e05ab0c59de569eb62e19570b81e760dcfc856e2a1ea69768677313ad262f22c6bdab7310f9a7c44d8e74a5049d240a0a6
data/Rakefile CHANGED
@@ -8,8 +8,6 @@ require 'rubygems/uninstaller'
8
8
  require 'bundler/gem_tasks'
9
9
  load 'exe/atome'
10
10
 
11
-
12
-
13
11
  folder_name = 'lib/eVe'
14
12
 
15
13
  unless Dir.exist?(folder_name)
data/atome.gemspec CHANGED
@@ -27,17 +27,24 @@ Gem::Specification.new do |spec|
27
27
  # (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
28
  # end
29
29
  # end
30
+ # spec.files = Dir.chdir(File.expand_path(__dir__)) do
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|
33
+ # (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
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
41
+ # end
42
+
30
43
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
31
44
  # 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|
45
+ `git ls-files -z`.split("\x0").reject do |f|
33
46
  (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
34
47
  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
41
48
  end
42
49
 
43
50
  spec.bindir = 'exe'
@@ -74,6 +81,7 @@ Gem::Specification.new do |spec|
74
81
  spec.add_runtime_dependency 'sequel', '~> 5.5'
75
82
  spec.add_runtime_dependency 'sqlite3', '~> 1.4'
76
83
  spec.add_runtime_dependency 'uglifier', '~> 0.1'
84
+ spec.add_runtime_dependency 'eVe', '~> 0.1.0.0.9'
77
85
  # spec.add_runtime_dependency 'webrick', '~> 1.7.0'
78
86
  # the gem below are need to make the atome server works on Windows
79
87
  spec.add_runtime_dependency 'tzinfo-data', '~> 1.2023.4'
data/exe/atome CHANGED
@@ -156,6 +156,7 @@ def add_to_application_folder(script_source, destination, project_name)
156
156
  end
157
157
 
158
158
  def build_opal_library(atome_source, destination, project_name, production = nil)
159
+
159
160
  user_project_path = "#{destination}/#{project_name}"
160
161
  opal_directory = "#{user_project_path}/src/js/opal"
161
162
  opal_js = "#{opal_directory}/opal.js"
@@ -183,6 +184,11 @@ def create_application(source, destination, project_name)
183
184
  FileUtils.cp_r("#{source}/vendor/assets/#{file}", "#{destination}/#{project_name}/#{file}")
184
185
  end
185
186
  build_aui(destination, project_name)
187
+ # now lets add eVe now
188
+ gem_spec = Gem::Specification.find_by_name('eVe')
189
+ gem_path = gem_spec.gem_dir
190
+ FileUtils.cp_r(Dir["#{gem_path}/*"], source+"/lib/eVe/")
191
+
186
192
  end
187
193
 
188
194
  def update_application(source, destination, project_name)
@@ -591,6 +597,7 @@ destination = current_path.parent.to_s
591
597
  if ARGV.include?('run')
592
598
  case ARGV[1]
593
599
  when 'opal'
600
+
594
601
  guard_content = <<STR
595
602
  guard 'rake', first_match: true, :task => 'build_opal' do
596
603
  watch(%r{^server.+\.rb})
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ new({ particle: :creator, category: :atome, type: :hash })
4
+ new({ particle: :aid, category: :atome, type: :string, store: false })
@@ -12,7 +12,7 @@ class Universe
12
12
  @specificities = {}
13
13
  @messages = {}
14
14
 
15
- @categories = %w[ communication effect event geometry hierarchy identity material
15
+ @categories = %w[atome communication effect event geometry hierarchy identity material
16
16
  property security spatial time utility ]
17
17
  @history = {}
18
18
  @users = {}
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.3.0'
5
+ VERSION = '0.5.6.3.1'
6
6
  end
7
7
 
data/lib/atome.rb CHANGED
@@ -13,20 +13,21 @@ require 'atome/helpers/color_helper/color'
13
13
  require 'atome/extensions/atome'
14
14
  require 'atome/extensions/mathematics'
15
15
  require 'atome/atome'
16
- require 'atome/genesis/generators/atome'
16
+ require 'atome/genesis/atome'
17
17
  require 'atome/presets/atome'
18
- require 'atome/genesis/generators/communication'
19
- require 'atome/genesis/generators/effect'
20
- require 'atome/genesis/generators/event'
21
- require 'atome/genesis/generators/geometry'
22
- require 'atome/genesis/generators/hierarchy'
23
- require 'atome/genesis/generators/identity'
24
- require 'atome/genesis/generators/material'
25
- require 'atome/genesis/generators/property'
26
- require 'atome/genesis/generators/security'
27
- require 'atome/genesis/generators/spatial'
28
- require 'atome/genesis/generators/time'
29
- require 'atome/genesis/generators/utility'
18
+ require 'atome/genesis/particles/atome'
19
+ require 'atome/genesis/particles/communication'
20
+ require 'atome/genesis/particles/effect'
21
+ require 'atome/genesis/particles/event'
22
+ require 'atome/genesis/particles/geometry'
23
+ require 'atome/genesis/particles/hierarchy'
24
+ require 'atome/genesis/particles/identity'
25
+ require 'atome/genesis/particles/material'
26
+ require 'atome/genesis/particles/property'
27
+ require 'atome/genesis/particles/security'
28
+ require 'atome/genesis/particles/spatial'
29
+ require 'atome/genesis/particles/time'
30
+ require 'atome/genesis/particles/utility'
30
31
  require 'atome/helpers/utilities'
31
32
  require 'atome/helpers/security'
32
33
  require 'renderers/html/index'
@@ -34,4 +35,8 @@ require 'renderers/headless/index'
34
35
  require 'renderers/server/index'
35
36
  require 'atome/helpers/sanitizer'
36
37
  require 'atome/genesis/sparkle'
37
- require 'eVe/eVe'
38
+ require 'eVe/lib/eVe'
39
+ # require 'eVe'
40
+ # gem_spec = Gem::Specification.find_by_name(gem_name)
41
+ # gem_path = gem_spec.gem_dir
42
+ # puts "Le chemin vers la gemme '#{gem_name}' est '#{gem_path}'"
@@ -12,20 +12,21 @@ require_relative './atome/helpers/color_helper/color'
12
12
  require_relative './atome/extensions/atome'
13
13
  require_relative './atome/extensions/mathematics'
14
14
  require_relative './atome/atome'
15
- require_relative './atome/genesis/generators/atome'
15
+ require_relative './atome/genesis/atome'
16
16
  require_relative './atome/presets/atome'
17
- require_relative './atome/genesis/generators/communication'
18
- require_relative './atome/genesis/generators/effect'
19
- require_relative './atome/genesis/generators/event'
20
- require_relative './atome/genesis/generators/geometry'
21
- require_relative './atome/genesis/generators/hierarchy'
22
- require_relative './atome/genesis/generators/identity'
23
- require_relative './atome/genesis/generators/material'
24
- require_relative './atome/genesis/generators/property'
25
- require_relative './atome/genesis/generators/security'
26
- require_relative './atome/genesis/generators/spatial'
27
- require_relative './atome/genesis/generators/time'
28
- require_relative './atome/genesis/generators/utility'
17
+ require_relative './atome/genesis/particles/atome'
18
+ require_relative './atome/genesis/particles/communication'
19
+ require_relative './atome/genesis/particles/effect'
20
+ require_relative './atome/genesis/particles/event'
21
+ require_relative './atome/genesis/particles/geometry'
22
+ require_relative './atome/genesis/particles/hierarchy'
23
+ require_relative './atome/genesis/particles/identity'
24
+ require_relative './atome/genesis/particles/material'
25
+ require_relative './atome/genesis/particles/property'
26
+ require_relative './atome/genesis/particles/security'
27
+ require_relative './atome/genesis/particles/spatial'
28
+ require_relative './atome/genesis/particles/time'
29
+ require_relative './atome/genesis/particles/utility'
29
30
  require_relative './atome/helpers/utilities'
30
31
  require_relative './atome/helpers/security'
31
32
  require_relative './renderers/html/index_relative'
@@ -33,5 +34,9 @@ require_relative './renderers/headless/index_relative'
33
34
  require_relative './renderers/server/index_relative'
34
35
  require_relative './atome/helpers/sanitizer'
35
36
  require_relative './atome/genesis/sparkle'
36
- require_relative './eVe/eVe_relative'
37
+ require_relative './eVe/lib/eVe_relative'
37
38
 
39
+ # require 'eVe'
40
+ # gem_spec = Gem::Specification.find_by_name(gem_name)
41
+ # gem_path = gem_spec.gem_dir
42
+ # puts "Le chemin vers la gemme '#{gem_name}' est '#{gem_path}'"
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.3.0
4
+ version: 0.5.6.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Eric Godard
@@ -332,6 +332,20 @@ dependencies:
332
332
  - - "~>"
333
333
  - !ruby/object:Gem::Version
334
334
  version: '0.1'
335
+ - !ruby/object:Gem::Dependency
336
+ name: eVe
337
+ requirement: !ruby/object:Gem::Requirement
338
+ requirements:
339
+ - - "~>"
340
+ - !ruby/object:Gem::Version
341
+ version: 0.1.0.0.9
342
+ type: :runtime
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - "~>"
347
+ - !ruby/object:Gem::Version
348
+ version: 0.1.0.0.9
335
349
  - !ruby/object:Gem::Dependency
336
350
  name: tzinfo-data
337
351
  requirement: !ruby/object:Gem::Requirement
@@ -420,20 +434,21 @@ files:
420
434
  - lib/atome/extensions/mathematics.rb
421
435
  - lib/atome/extensions/ping.rb
422
436
  - lib/atome/extensions/sha.rb
423
- - lib/atome/genesis/generators/atome.rb
424
- - lib/atome/genesis/generators/communication.rb
425
- - lib/atome/genesis/generators/effect.rb
426
- - lib/atome/genesis/generators/event.rb
427
- - lib/atome/genesis/generators/geometry.rb
428
- - lib/atome/genesis/generators/hierarchy.rb
429
- - lib/atome/genesis/generators/identity.rb
430
- - lib/atome/genesis/generators/material.rb
431
- - lib/atome/genesis/generators/property.rb
432
- - lib/atome/genesis/generators/security.rb
433
- - lib/atome/genesis/generators/spatial.rb
434
- - lib/atome/genesis/generators/time.rb
435
- - lib/atome/genesis/generators/utility.rb
437
+ - lib/atome/genesis/atome.rb
436
438
  - lib/atome/genesis/genesis.rb
439
+ - lib/atome/genesis/particles/atome.rb
440
+ - lib/atome/genesis/particles/communication.rb
441
+ - lib/atome/genesis/particles/effect.rb
442
+ - lib/atome/genesis/particles/event.rb
443
+ - lib/atome/genesis/particles/geometry.rb
444
+ - lib/atome/genesis/particles/hierarchy.rb
445
+ - lib/atome/genesis/particles/identity.rb
446
+ - lib/atome/genesis/particles/material.rb
447
+ - lib/atome/genesis/particles/property.rb
448
+ - lib/atome/genesis/particles/security.rb
449
+ - lib/atome/genesis/particles/spatial.rb
450
+ - lib/atome/genesis/particles/time.rb
451
+ - lib/atome/genesis/particles/utility.rb
437
452
  - lib/atome/genesis/sparkle.rb
438
453
  - lib/atome/helpers/color_helper/color.rb
439
454
  - lib/atome/helpers/color_helper/color/cmyk.rb
@@ -459,19 +474,6 @@ files:
459
474
  - lib/atome/presets/atome.rb
460
475
  - lib/atome/version.rb
461
476
  - lib/atome_relative.rb
462
- - lib/eVe/LICENSE
463
- - lib/eVe/README.md
464
- - lib/eVe/documentation/Backup_docs.zip
465
- - lib/eVe/documentation/server.md
466
- - lib/eVe/eVe.rb
467
- - lib/eVe/eVe_relative.rb
468
- - lib/eVe/lib/examples/site.rb
469
- - lib/eVe/lib/init.rb
470
- - lib/eVe/lib/intuition/inputs.rb
471
- - lib/eVe/lib/intuition/sliders.rb
472
- - lib/eVe/lib/intuition/toolbox.rb
473
- - lib/eVe/lib/version.rb
474
- - lib/eVe/todo.txt
475
477
  - lib/platform_specific/opal/atome_opal_extensions.rb
476
478
  - lib/platform_specific/opal/extensions/color.rb
477
479
  - lib/platform_specific/opal/extensions/geolocation.rb
data/lib/eVe/LICENSE DELETED
@@ -1,8 +0,0 @@
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 DELETED
@@ -1,350 +0,0 @@
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
-
Binary file
@@ -1,2 +0,0 @@
1
- # Adress atome.one :
2
- 5.196.69.103
data/lib/eVe/eVe.rb DELETED
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'eVe/lib/version'
3
- require 'eVe/lib/init'
4
-
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative './lib/version'
4
- require_relative './lib/init'