atome 0.5.6.1.4 → 0.5.6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +44 -0
- data/documentation/deep learning/basic_infos.txt +6 -0
- data/exe/atome +0 -2
- data/lib/atome/atome.rb +1 -1
- data/lib/atome/extensions/atome.rb +33 -23
- data/lib/atome/extensions/sha.rb +8 -8
- data/lib/atome/genesis/generators/atome.rb +1 -1
- data/lib/atome/genesis/generators/communication.rb +14 -20
- data/lib/atome/genesis/generators/effect.rb +2 -2
- data/lib/atome/genesis/generators/event.rb +25 -25
- data/lib/atome/genesis/generators/geometry.rb +3 -3
- data/lib/atome/genesis/generators/hierarchy.rb +6 -6
- data/lib/atome/genesis/generators/identity.rb +13 -13
- data/lib/atome/genesis/generators/material.rb +24 -11
- data/lib/atome/genesis/generators/property.rb +8 -24
- data/lib/atome/genesis/generators/security.rb +1 -1
- data/lib/atome/genesis/generators/spatial.rb +13 -13
- data/lib/atome/genesis/generators/time.rb +1 -1
- data/lib/atome/genesis/generators/utility.rb +39 -37
- data/lib/atome/genesis/genesis.rb +2 -1
- data/lib/atome/genesis/sparkle.rb +31 -11
- data/lib/atome/helpers/utilities.rb +108 -49
- data/lib/atome/kernel/universe.rb +13 -9
- data/lib/atome/version.rb +1 -1
- data/lib/eVe/eVe.rb +1 -1
- data/lib/eVe/eVe_relative.rb +1 -1
- data/lib/platform_specific/opal/extensions/sha.rb +25 -14
- data/lib/renderers/html/html.rb +6 -7
- data/vendor/assets/application/examples/atome_particle_validation.rb +7 -0
- data/vendor/assets/application/examples/attach.rb +3 -3
- data/vendor/assets/application/examples/border.rb +1 -1
- data/vendor/assets/application/examples/categories.rb +5 -0
- data/vendor/assets/application/examples/clones&monitoring.rb +105 -0
- data/vendor/assets/application/examples/database_handling.rb +23 -0
- data/vendor/assets/application/examples/display_bck.rb +1 -1
- data/vendor/assets/application/examples/drag.rb +3 -1
- data/vendor/assets/application/examples/encrypt.rb +6 -0
- data/vendor/assets/application/examples/find.rb +1 -1
- data/vendor/assets/application/examples/import.rb +2 -2
- data/vendor/assets/application/examples/read.rb +2 -0
- data/vendor/assets/application/examples/shadow.rb +2 -1
- data/vendor/assets/server/atome_server.rb +106 -16
- data/vendor/assets/server/atome_server_wasm.rb +1 -1
- data/vendor/assets/src/index.html +21 -21
- data/vendor/assets/src/index_server.html +11 -5
- data/vendor/assets/src/index_server_wasm.html +11 -4
- data/vendor/assets/src/js/atome/atome.js +1 -1
- data/vendor/assets/src/js/atome/atome_helpers/communication.js +39 -30
- metadata +7 -4
- data/vendor/assets/application/examples/a_concat.rb +0 -19
- data/vendor/assets/application/examples/clones.rb +0 -177
@@ -1,14 +1,25 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# addon for the Atome class
|
4
|
-
class Atome
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
# # frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# # # addon for the Atome class
|
4
|
+
# class Atome
|
5
|
+
# # def calculate_sha(string)
|
6
|
+
# # if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi'
|
7
|
+
# # # `sha256(#{string})`
|
8
|
+
# # js_code = "sha256('#{string}')"
|
9
|
+
# # JS.eval(js_code)
|
10
|
+
# # else
|
11
|
+
# # Digest::SHA256.hexdigest(string)
|
12
|
+
# # end
|
13
|
+
# # end
|
14
|
+
# #
|
15
|
+
# #
|
16
|
+
# def crypt(string)
|
17
|
+
# # if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi'
|
18
|
+
# # `sha256(#{string})`
|
19
|
+
# js_code = "sha256('#{string}')"
|
20
|
+
# JS.eval(js_code)
|
21
|
+
# # else
|
22
|
+
# Digest::SHA256.hexdigest(string)
|
23
|
+
# # end
|
24
|
+
# end
|
25
|
+
# end
|
data/lib/renderers/html/html.rb
CHANGED
@@ -212,14 +212,13 @@ class HTML
|
|
212
212
|
def connect(params, &bloc)
|
213
213
|
type= params[:type]
|
214
214
|
server= params[:address]
|
215
|
-
user=params[:user]
|
216
|
-
pass=params[:pass]
|
217
|
-
atomes=params[:atomes]
|
218
|
-
particles=params[:particles]
|
219
|
-
|
220
|
-
#
|
215
|
+
# user=params[:user]
|
216
|
+
# pass=params[:pass]
|
217
|
+
# atomes=params[:atomes]
|
218
|
+
# particles=params[:particles]
|
219
|
+
# 'atomeJS.connect' is in the communication.js file ( connect: function (type, server, )
|
220
|
+
JS.eval("atomeJS.connect('#{type}','#{server}')")
|
221
221
|
# JS.eval("atomeJS.connect('ws://#{server}')")
|
222
|
-
# @original_atome.message(:helloworld)
|
223
222
|
end
|
224
223
|
|
225
224
|
def send_message(message)
|
@@ -6,10 +6,10 @@
|
|
6
6
|
# please note that atome.attach([:atome_id]) means that atome will be the parent of the atome with the id :atome_id
|
7
7
|
# to sum up : attach and attached are both setter and getter :
|
8
8
|
# a.attach(b.ib) will attach the current object to the IDs passed in the params. The current atome will be the child of the the atomes width IDS passed in the the params,
|
9
|
-
# a.attach(b.ib) means (insert '
|
9
|
+
# a.attach(b.ib) means (insert 'b' into 'a') or a is parent b is child
|
10
10
|
|
11
|
-
# while a.attached(b.id) (insert '
|
12
|
-
# a.attached(b.ib) means (insert '
|
11
|
+
# while a.attached(b.id) (insert 'a' into 'b')is the opposite to attached it will attach IDs passed in the params to the current atome. The current atome will be the parent of of the the atomes width IDS passed in the the params
|
12
|
+
# a.attached(b.ib) means (insert 'a' into 'b') or a is child b is parent
|
13
13
|
|
14
14
|
# atome.attach([:atome_id]) means that atome will be the child of the atome with the id :atome_id
|
15
15
|
# Here is how to use it as a setter :
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# # frozen_string_literal: true
|
2
|
+
|
3
|
+
# TODO : clones alteration must be bidirectional, to do so :
|
4
|
+
|
5
|
+
c = circle({ id: :the_circle, left: 12, top: 0, color: :orange, drag: { move: true, inertia: true, lock: :start } })
|
6
|
+
b = box({ top: 123 })
|
7
|
+
|
8
|
+
t = text({ data: :hello, left: 300 })
|
9
|
+
|
10
|
+
t.touch(true) do
|
11
|
+
puts "#{b.touch} , #{b.touch_code}"
|
12
|
+
b.touch_code[:touch].call
|
13
|
+
end
|
14
|
+
col = color({ id: :col1, red: 1, blue: 1 })
|
15
|
+
# #######################
|
16
|
+
atomes_monitored = [c, b]
|
17
|
+
# particles_monitored=[:left, :width, :touch, :apply]
|
18
|
+
particles_monitored = [:left, :width, :apply]
|
19
|
+
# particles_monitored = [:touch]
|
20
|
+
Atome.monitoring(atomes_monitored, particles_monitored) do |monitor_infos|
|
21
|
+
puts "1 ==> #{@id} : #{monitor_infos[:particle]},#{monitor_infos[:altered]}"
|
22
|
+
|
23
|
+
atomes_monitored.each do |atome_to_update|
|
24
|
+
# we exclude the current changing atome to avoid infinite loop
|
25
|
+
unless atome_to_update == self || (monitor_infos[:original] == monitor_infos[:altered]) || !monitor_infos[:altered]
|
26
|
+
puts "2 ==> #{atome_to_update.id} : #{monitor_infos[:particle]},#{monitor_infos[:altered]}"
|
27
|
+
atome_to_update.send(monitor_infos[:particle], monitor_infos[:altered])
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
# ####################
|
33
|
+
b.resize(true)
|
34
|
+
c.resize(true) do |l|
|
35
|
+
|
36
|
+
puts c.instance_variable_get("@resize_code")
|
37
|
+
end
|
38
|
+
ccc = color(:red)
|
39
|
+
wait 1 do
|
40
|
+
# b.left(133)
|
41
|
+
b.touch(true) do
|
42
|
+
puts "b width is #{b.width}"
|
43
|
+
end
|
44
|
+
|
45
|
+
c.left(133)
|
46
|
+
wait 1 do
|
47
|
+
# c.color(:red)
|
48
|
+
# c.apply([ccc.id])
|
49
|
+
b.width(155)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# TODO : make multi parents works
|
54
|
+
# TODO : make it works for event like touch , also attach and attached
|
55
|
+
# wait 2 do
|
56
|
+
# col = color({ id: :col1, red: 1, blue: 1 })
|
57
|
+
# Atome.monitoring([col], [:red, :blue], [:variable1, :variable2])
|
58
|
+
#
|
59
|
+
# c.apply([:col1])
|
60
|
+
# wait 2 do
|
61
|
+
# col.red(0)
|
62
|
+
# col.red
|
63
|
+
# c.apply([:col1])
|
64
|
+
# end
|
65
|
+
# end
|
66
|
+
|
67
|
+
############## add class solution
|
68
|
+
the_b = box({ color: :green })
|
69
|
+
|
70
|
+
the_b.resize(true) do
|
71
|
+
puts :j
|
72
|
+
end
|
73
|
+
|
74
|
+
class HTML
|
75
|
+
|
76
|
+
def id(id)
|
77
|
+
@element[:classList].add(id.to_s)
|
78
|
+
attr('id', id)
|
79
|
+
self
|
80
|
+
end
|
81
|
+
|
82
|
+
def add_class(val)
|
83
|
+
@element[:classList].add(val.to_s)
|
84
|
+
# @element.setAttribute('id', val)
|
85
|
+
end
|
86
|
+
|
87
|
+
# def force_top(id,value)
|
88
|
+
# element=JS.global[:document].getElementById(id.to_s)
|
89
|
+
# element[:style][:top] ='33px'
|
90
|
+
# end
|
91
|
+
end
|
92
|
+
|
93
|
+
new({ particle: :add_class }) do |params|
|
94
|
+
html.add_class(params)
|
95
|
+
end
|
96
|
+
#
|
97
|
+
# new({ particle: :force_top }) do |params|
|
98
|
+
# html.force_top(params)
|
99
|
+
# end
|
100
|
+
|
101
|
+
b = box({ id: :toto })
|
102
|
+
bb = box({ id: :toto, left: 333 })
|
103
|
+
bb.add_class(:toto)
|
104
|
+
b.add_class(:toto)
|
105
|
+
# bb.force_top(:toto,3)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# # frozen_string_literal: true
|
2
|
+
#
|
3
|
+
A.message({ action: :insert, data: { table: :security, particle: :password, data: 'my_pass'} })
|
4
|
+
|
5
|
+
A.message({ action: :insert, data: { table: :identity, particle: :name, data: 'jeezs' } }) do |data_received_from_server|
|
6
|
+
puts "my first insert #{data_received_from_server}"
|
7
|
+
end
|
8
|
+
|
9
|
+
A.message({ action: :query, data: { table: :identity } }) do |data_received_from_server|
|
10
|
+
puts "another insert : #{data_received_from_server}"
|
11
|
+
end
|
12
|
+
|
13
|
+
A.message({ action: :query, data: { table: :identity } }) do |data_received|
|
14
|
+
puts "received : #{data_received}"
|
15
|
+
end
|
16
|
+
|
17
|
+
A.message({ action: :insert, data: { table: :identity, particle: :name, data: 'jeezs' } }) do |result|
|
18
|
+
puts "insert done : #{result}"
|
19
|
+
end
|
20
|
+
|
21
|
+
A.message({ action: :insert, data: { table: :identity, particle: :name, data: 'jeezs' } }) do |result|
|
22
|
+
puts "last message received: #{result}"
|
23
|
+
end
|
@@ -70,7 +70,7 @@ new({ particle: :display, render: false }) do |params|
|
|
70
70
|
container = grab(:view).box({ id: grid_id, width: container_width, height: container_height, overflow: :auto, color: :white, depth: 0 })
|
71
71
|
############## deletion
|
72
72
|
container.touch(true) do
|
73
|
-
|
73
|
+
puts "removing container recursively : #{container.id}"
|
74
74
|
val_1= Universe.atomes.length
|
75
75
|
puts "val_1 : #{val_1}"
|
76
76
|
container.delete({ recursive: true })
|
@@ -21,7 +21,7 @@ end
|
|
21
21
|
|
22
22
|
|
23
23
|
importer do |val|
|
24
|
-
|
24
|
+
puts "case 21 #{val}"
|
25
25
|
end
|
26
26
|
|
27
27
|
# importer(:all) do |val|
|
@@ -29,5 +29,5 @@ end
|
|
29
29
|
# end
|
30
30
|
|
31
31
|
importer('the_boxy') do |val|
|
32
|
-
|
32
|
+
puts "yes !!! exception found : #{val}"
|
33
33
|
end
|
@@ -16,21 +16,87 @@ require 'securerandom'
|
|
16
16
|
require 'sequel'
|
17
17
|
|
18
18
|
class EDen
|
19
|
+
|
20
|
+
def self.db_access
|
21
|
+
Database.connect_database
|
22
|
+
end
|
23
|
+
|
19
24
|
def self.terminal(cmd, option, ws, value, user, pass)
|
20
|
-
`#{cmd}`
|
25
|
+
{ return: `#{cmd}` }
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.pass(cmd, option, ws, value, user, pass)
|
29
|
+
{ return: 'pass received' }
|
21
30
|
end
|
22
31
|
|
23
32
|
def self.init_db(cmd, option, ws, value, user, pass)
|
24
|
-
|
33
|
+
# Database.
|
34
|
+
{ return: 'database initialised' }
|
25
35
|
end
|
26
36
|
|
37
|
+
def self.query(cmd, option, ws, value, user, pass)
|
38
|
+
identity_table = db_access[cmd['table'].to_sym]
|
39
|
+
result = identity_table.send(:all).send(:select)
|
40
|
+
{ action: :query, data: cmd['table'], return: result }
|
41
|
+
end
|
42
|
+
|
43
|
+
# def self.insert(cmd, option, ws, value, user, pass)
|
44
|
+
# identity_table = db_access[:identity]
|
45
|
+
# identity_table.insert(email: 'tre@tre')
|
46
|
+
# { action: :insert, data: cmd, return: { email: 'tre@tre' } }
|
47
|
+
# end
|
48
|
+
|
49
|
+
def self.insert(params, option, ws, value, user, pass)
|
50
|
+
table = params['table']
|
51
|
+
particle = params['particle']
|
52
|
+
data = params['data']
|
53
|
+
identity_table = db_access[table.to_sym]
|
54
|
+
# identity_table = db_access[:identity]
|
55
|
+
#######
|
56
|
+
identity_table.insert(particle => data )
|
57
|
+
# identity_table.insert(email: 'tre@tre')
|
58
|
+
#
|
59
|
+
{ return: "column : #{particle}, in table : #{table}, updated with : #{data}" }
|
60
|
+
end
|
61
|
+
|
62
|
+
# def self.authentification(cmd, option, ws, value, user, pass)
|
63
|
+
# db = Database.connect_database
|
64
|
+
# identity_items = db[:identity]
|
65
|
+
# security_items = db[:security]
|
66
|
+
#
|
67
|
+
# identity_items.insert(email: 'tre@tre')
|
68
|
+
# security_items.insert(password: 'poipoi')
|
69
|
+
# # testtest= "Mails count: #{identity_items.count}"
|
70
|
+
#
|
71
|
+
# user_email = value["mail"]
|
72
|
+
# user_password = value["pass"]
|
73
|
+
#
|
74
|
+
# # user_exists = identity_items.all.select{|item| item[:email]==user_email}
|
75
|
+
# user_exists = identity_items.send(:all).send(:select) do |item|
|
76
|
+
# item[:email] == user_email
|
77
|
+
# end
|
78
|
+
#
|
79
|
+
# if user_exists.empty?
|
80
|
+
# # "Mails count: #{identity_items.count}"
|
81
|
+
# # "Mails count: #{identity_items.all}"
|
82
|
+
# "Email non trouvé, erreur"
|
83
|
+
# # Ask to the user if he wants to subscribe
|
84
|
+
# # Send the basic template
|
85
|
+
# else
|
86
|
+
# "Email trouvé, cherche mdp"
|
87
|
+
# # Verify password
|
88
|
+
# # If password isn't ok, send error
|
89
|
+
# # If the password is ok, send the user account template
|
90
|
+
# end
|
91
|
+
# end
|
92
|
+
|
27
93
|
def self.file(source, operation, ws, value, user, pass)
|
28
94
|
file_content = File.send(operation, source, value).to_s
|
29
95
|
file_content = file_content.gsub("'", "\"")
|
30
|
-
"=> operation: #{operation}, source: #{source} , content : #{file_content}
|
96
|
+
{ return: "=> operation: #{operation}, source: #{source} , content : #{file_content}" }
|
31
97
|
end
|
32
98
|
|
33
|
-
# return_message = EDen.safe_send(action_requested,
|
99
|
+
# return_message = EDen.safe_send(action_requested, data,option, current_user, user_pass)
|
34
100
|
|
35
101
|
def self.safe_send(method_name, *args)
|
36
102
|
method_sym = method_name.to_sym
|
@@ -38,7 +104,7 @@ class EDen
|
|
38
104
|
if eden_methods.include?(method_sym)
|
39
105
|
send(method_sym, *args)
|
40
106
|
else
|
41
|
-
"forbidden action: #{method_name}"
|
107
|
+
{ return: "forbidden action: #{method_name}" }
|
42
108
|
end
|
43
109
|
end
|
44
110
|
end
|
@@ -55,12 +121,24 @@ class String
|
|
55
121
|
end
|
56
122
|
end
|
57
123
|
|
58
|
-
puts "kjhj"
|
59
|
-
|
60
124
|
class Database
|
125
|
+
|
126
|
+
def self.table_exists?(table_name)
|
127
|
+
eden = Sequel.connect("sqlite://eden.sqlite3")
|
128
|
+
if eden.table_exists?(table_name)
|
129
|
+
puts "La table #{table_name} existe dans la base de données."
|
130
|
+
else
|
131
|
+
puts "La table suivante : #{table_name} n'existe pas dans la base de données."
|
132
|
+
end
|
133
|
+
|
134
|
+
end
|
135
|
+
|
136
|
+
# def self.create_table(table_name)
|
61
137
|
def self.connect_database
|
62
138
|
if File.exist?("eden.sqlite3")
|
63
139
|
eden = Sequel.connect("sqlite://eden.sqlite3")
|
140
|
+
# now we test if the table exist
|
141
|
+
table_exists?(:table_name)
|
64
142
|
else
|
65
143
|
eden = Sequel.connect("sqlite://eden.sqlite3")
|
66
144
|
eden.create_table :atome do
|
@@ -71,10 +149,22 @@ class Database
|
|
71
149
|
eden.create_table :communication do
|
72
150
|
primary_key :communication_id
|
73
151
|
String :connection
|
74
|
-
JSON :
|
152
|
+
JSON :data
|
75
153
|
JSON :controller
|
76
154
|
end
|
77
155
|
|
156
|
+
###################
|
157
|
+
|
158
|
+
Sequel.extension :migration
|
159
|
+
|
160
|
+
Sequel.migration do
|
161
|
+
change do
|
162
|
+
add_column :communication, :jesaispas, String
|
163
|
+
end
|
164
|
+
end.apply(eden, :up)
|
165
|
+
|
166
|
+
###################
|
167
|
+
|
78
168
|
eden.create_table :effect do
|
79
169
|
primary_key :effect_id
|
80
170
|
Int :smooth
|
@@ -133,6 +223,9 @@ class Database
|
|
133
223
|
String :type
|
134
224
|
Int :id
|
135
225
|
String :name
|
226
|
+
String :firstname
|
227
|
+
String :email
|
228
|
+
String :nickname
|
136
229
|
Boolean :active
|
137
230
|
String :markup
|
138
231
|
String :bundle
|
@@ -245,7 +338,7 @@ end
|
|
245
338
|
class App < Roda
|
246
339
|
|
247
340
|
# comment below when test will be done
|
248
|
-
File.delete("./eden.sqlite3") if File.exist?("./eden.sqlite3")
|
341
|
+
# File.delete("./eden.sqlite3") if File.exist?("./eden.sqlite3")
|
249
342
|
eden = Database.connect_database
|
250
343
|
items = eden[:atome]
|
251
344
|
|
@@ -264,24 +357,21 @@ class App < Roda
|
|
264
357
|
if Faye::WebSocket.websocket?(r.env)
|
265
358
|
ws = Faye::WebSocket.new(r.env)
|
266
359
|
ws.on :open do |event|
|
267
|
-
ws.send('server ready'.to_json)
|
360
|
+
ws.send({ return: 'server ready' }.to_json)
|
268
361
|
# ws.send('asking for synchro data'.to_json)
|
269
362
|
end
|
270
363
|
|
271
364
|
ws.on(:message) do |event|
|
272
365
|
json_string = event.data.gsub(/(\w+):/) { "\"#{$1}\":" }.gsub('=>', ':')
|
273
366
|
full_data = JSON.parse(json_string)
|
274
|
-
|
367
|
+
data = full_data['data']
|
275
368
|
action_requested = full_data['action']
|
276
369
|
value = full_data['value']
|
277
370
|
option = full_data['option']
|
278
371
|
current_user = full_data['user']
|
279
372
|
user_pass = full_data['pass']['global']
|
280
|
-
|
281
|
-
|
282
|
-
else
|
283
|
-
return_message = "no action msg: #{test}"
|
284
|
-
end
|
373
|
+
# return_message = EDen.safe_send(action_requested, data, option, ws, value, current_user, user_pass)
|
374
|
+
return_message = EDen.safe_send(action_requested, data, option, ws, value, current_user, user_pass)
|
285
375
|
ws.send(return_message.to_json)
|
286
376
|
end
|
287
377
|
|
@@ -66,7 +66,7 @@ end
|
|
66
66
|
|
67
67
|
class App < Roda
|
68
68
|
# comment below when test will be done
|
69
|
-
File.delete("./eden.sqlite3") if File.exist?("./eden.sqlite3")
|
69
|
+
# File.delete("./eden.sqlite3") if File.exist?("./eden.sqlite3")
|
70
70
|
eden = Database.connect_database
|
71
71
|
items = eden[:atome]
|
72
72
|
|
@@ -9,39 +9,39 @@
|
|
9
9
|
<meta name="msapplication-tap-highlight" content="no">
|
10
10
|
<link type="text/css" rel="stylesheet" href="css/style.css">
|
11
11
|
<style id="atomic_style"></style>
|
12
|
+
<script defer src="js/third_parties/browser.script.iife.min.js" type="text/javascript"></script>
|
12
13
|
<script type="text/javascript" src="js/third_parties/interact.min.js" defer></script>
|
13
14
|
<script type="text/javascript" src="js/third_parties/popmotion.min.js" defer></script>
|
14
15
|
<script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
|
15
16
|
<script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
|
16
17
|
<script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
|
17
18
|
<script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
|
18
|
-
<script
|
19
|
+
<script type="text/javascript" src="js/third_parties/fabric.min.js" defer></script>
|
19
20
|
<script type="text/javascript" src="js/third_parties/papaparse.min.js" defer></script>
|
20
|
-
<script src='js/opal/opal.js' defer></script>
|
21
|
-
<script src='js/opal/opal_parser.js' defer></script>
|
22
|
-
<script src='js/aui.js' defer></script>
|
23
|
-
<script defer defer src='js/host_mode.js'></script>
|
24
|
-
<script src='js/opal/atome_opal_extensions.js' defer></script>
|
25
|
-
<script src='js/atome/kernel.js' defer></script>
|
26
21
|
<script defer src="js/atome/atome_helpers/communication.js" type="text/javascript"></script>
|
27
22
|
<script defer src="js/atome/atome_helpers/file.js" type="text/javascript"></script>
|
28
|
-
<!-- <script>-->
|
29
|
-
<!-- // to prevent right click-->
|
30
|
-
<!-- document.addEventListener("contextmenu", function (e) {-->
|
31
|
-
<!-- e.preventDefault();-->
|
32
|
-
<!-- });-->
|
33
|
-
<!-- </script>-->
|
23
|
+
<!-- <script>-->
|
24
|
+
<!-- // to prevent right click-->
|
25
|
+
<!-- document.addEventListener("contextmenu", function (e) {-->
|
26
|
+
<!-- e.preventDefault();-->
|
27
|
+
<!-- });-->
|
28
|
+
<!-- </script>-->
|
34
29
|
<title>atome</title>
|
35
30
|
</head>
|
36
31
|
<body id='user_view' class='atome'>
|
37
|
-
|
32
|
+
|
33
|
+
<div id='copyright'>©atome 2023</div>
|
38
34
|
</body>
|
39
|
-
<script
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
35
|
+
<script type="text/ruby">
|
36
|
+
require 'js'
|
37
|
+
require '/lib/platform_specific/wasm/atome_wasm_extensions'
|
38
|
+
require '/utilities/aui'
|
39
|
+
require '/utilities/host_mode'
|
40
|
+
require '/lib/atome_relative'
|
41
|
+
require './index'
|
42
|
+
#puts Universe.host
|
43
|
+
atome_infos
|
46
44
|
</script>
|
45
|
+
<script defer src="js/atome/specific/wasm.js" type="text/javascript"></script>
|
46
|
+
<script defer src="js/atome/atome.js" type="text/javascript"></script>
|
47
47
|
</html>
|
@@ -38,13 +38,19 @@
|
|
38
38
|
</body>
|
39
39
|
<script defer src="js/atome/specific/opal.js" type="text/javascript"></script>
|
40
40
|
<script defer src="js/atome/atome.js" type="text/javascript"></script>
|
41
|
-
<script defer src='js/application.js'></script>
|
42
41
|
<script>
|
42
|
+
function loadApplicationJs() {
|
43
|
+
var script = document.createElement('script');
|
44
|
+
script.src = 'js/application.js';
|
45
|
+
script.onload = function() {
|
46
|
+
rubyVMCallback("A.init_database");
|
47
|
+
};
|
48
|
+
document.body.appendChild(script);
|
49
|
+
}
|
50
|
+
|
43
51
|
window.addEventListener('load', function () {
|
44
|
-
|
45
|
-
Opal.eval("A.server({ address: 'localhost:9292' , type: 'ws'})")
|
46
|
-
Opal.eval('A.init_websocket')
|
52
|
+
rubyVMCallback('atome_genesis');
|
47
53
|
})
|
48
|
-
|
49
54
|
</script>
|
55
|
+
|
50
56
|
</html>
|
@@ -40,10 +40,17 @@
|
|
40
40
|
require '/lib/atome_relative'
|
41
41
|
require './index'
|
42
42
|
#puts Universe.host
|
43
|
-
|
44
|
-
A.server({ address: 'localhost:9292' , type: 'ws'})
|
45
|
-
A.init_websocket
|
43
|
+
atome_genesis
|
46
44
|
</script>
|
47
45
|
<script defer src="js/atome/specific/wasm.js" type="text/javascript"></script>
|
48
|
-
<script
|
46
|
+
<script>
|
47
|
+
function loadApplicationJs() {
|
48
|
+
var script = document.createElement('script');
|
49
|
+
script.src = 'js/application.js';
|
50
|
+
script.onload = function() {
|
51
|
+
rubyVMCallback("A.init_database");
|
52
|
+
};
|
53
|
+
document.body.appendChild(script);
|
54
|
+
}
|
55
|
+
</script>
|
49
56
|
</html>
|