atome 0.5.5.9.1 → 0.5.6.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +9 -2
- data/documentation/deep learning/basic_infos.txt +9 -17
- data/exe/atome +13 -13
- data/lib/atome/atome.rb +5 -6
- data/lib/atome/eve.rb +0 -0
- data/lib/atome/extensions/atome.rb +52 -0
- data/lib/atome/genesis/generators/atome.rb +3 -0
- data/lib/atome/genesis/generators/communication.rb +7 -2
- data/lib/atome/genesis/generators/geometry.rb +0 -3
- data/lib/atome/genesis/generators/spatial.rb +19 -40
- data/lib/atome/genesis/generators/utility.rb +16 -12
- data/lib/atome/genesis/genesis.rb +2 -1
- data/lib/atome/genesis/sparkle.rb +5 -2
- data/lib/atome/helpers/essentials.rb +9 -9
- data/lib/atome/helpers/utilities.rb +26 -0
- data/lib/atome/kernel/ruby +0 -0
- data/lib/atome/presets/atome.rb +4 -1
- data/lib/atome/version.rb +2 -1
- data/lib/atome.rb +1 -1
- data/lib/atome_relative.rb +1 -1
- data/lib/renderers/html/geometry.rb +30 -18
- data/lib/renderers/html/html.rb +11 -1
- data/lib/renderers/html/identity.rb +2 -1
- data/lib/renderers/html/spatial.rb +6 -7
- data/server/atome_server.rb +148 -0
- data/server/atome_server_wasm.rb +112 -0
- data/server/capture.rb +10 -0
- data/server/config.ru +13 -0
- data/src/css/style.css +162 -0
- data/src-tauri/.gitignore +4 -0
- data/src-tauri/Cargo.toml +27 -0
- data/src-tauri/build.rs +3 -0
- data/src-tauri/icons/128x128.png +0 -0
- data/src-tauri/icons/128x128@2x.png +0 -0
- data/src-tauri/icons/32x32.png +0 -0
- data/src-tauri/icons/Square107x107Logo.png +0 -0
- data/src-tauri/icons/Square142x142Logo.png +0 -0
- data/src-tauri/icons/Square150x150Logo.png +0 -0
- data/src-tauri/icons/Square284x284Logo.png +0 -0
- data/src-tauri/icons/Square30x30Logo.png +0 -0
- data/src-tauri/icons/Square310x310Logo.png +0 -0
- data/src-tauri/icons/Square44x44Logo.png +0 -0
- data/src-tauri/icons/Square71x71Logo.png +0 -0
- data/src-tauri/icons/Square89x89Logo.png +0 -0
- data/src-tauri/icons/StoreLogo.png +0 -0
- data/src-tauri/icons/icon.icns +0 -0
- data/src-tauri/icons/icon.ico +0 -0
- data/src-tauri/icons/icon.png +0 -0
- data/src-tauri/src/main.rs +71 -0
- data/src-tauri/tauri.conf.json +70 -0
- data/src-wasm/wasm/wasi-vfs-osx_arm +0 -0
- data/src-wasm/wasm/wasi-vfs-osx_x86 +0 -0
- data/src-wasm/wasm/wasi-vfs-unix +0 -0
- data/src-wasm/wasm/wasi-vfs.exe +0 -0
- data/vendor/assets/application/examples/center.rb +2 -3
- data/vendor/assets/application/examples/compute.rb +1 -1
- data/vendor/assets/application/examples/css.rb +6 -0
- data/vendor/assets/application/examples/int8.rb +4 -1
- data/vendor/assets/application/examples/selected.rb +6 -0
- data/vendor/assets/application/examples/sub_atome_manipulation.rb +19 -0
- data/vendor/assets/application/examples/test.rb +19 -12
- data/vendor/assets/application/examples/unit.rb +1 -1
- data/vendor/assets/application/index.rb +1 -1
- data/vendor/assets/server/atome_server.rb +178 -33
- data/vendor/assets/src/index_server.html +2 -0
- data/vendor/assets/src/index_server_wasm.html +1 -0
- data/vendor/assets/src/js/atome/atome_helpers/communication.js +2 -4
- metadata +38 -12
- data/vendor/assets/application/required_example.rb +0 -1
- data/vendor/assets/application/test.rb +0 -29
- data/vendor/assets/application/works/photos.rb +0 -672
- data/vendor/assets/application/works/photos2.rb +0 -218
- data/vendor/assets/application/works/photos3.rb +0 -343
- data/vendor/assets/application/works/photos4.rb +0 -34
- data/vendor/assets/application/works/photos6.rb +0 -6
- data/vendor/assets/application/works/vie.rb +0 -196
- /data/{vendor/assets/application/works/trigga.rb → Guardfile} +0 -0
- /data/vendor/assets/application/examples/{presets.rb → preset.rb} +0 -0
@@ -1,196 +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
|
39
|
-
def initialize
|
40
|
-
@atomes = {}
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
def atome(atome_to_find)
|
45
|
-
@atomes[atome_to_find]
|
46
|
-
end
|
47
|
-
|
48
|
-
def input_box(params = {}, &bloc)
|
49
|
-
# atome_preset = :box
|
50
|
-
# params = atome_common(atome_preset, params)
|
51
|
-
# preset_common(params, &bloc)
|
52
|
-
height_wanted= 15
|
53
|
-
width_wanted= 222
|
54
|
-
input_back = Atome.new(
|
55
|
-
{ renderers: [:html], id: :input_back, type: :shape, attach: :view, apply: [:shape_color],
|
56
|
-
left: 120, top: 120, width: width_wanted, height: height_wanted+height_wanted*20/100, smooth: 6})
|
57
|
-
|
58
|
-
@atomes[:input_back] = input_back
|
59
|
-
|
60
|
-
Atome.new(
|
61
|
-
{ renderers: [:html], id: :input_text_color, type: :color, tag: ({ system: true, persistent: true }),
|
62
|
-
red: 0.1, green: 0.1, blue: 0.1, alpha: 1 }
|
63
|
-
)
|
64
|
-
|
65
|
-
text_input = Atome.new(
|
66
|
-
{ renderers: [:html], id: :input_text, type: :text, apply: [:input_text_color],component:{size: height_wanted},
|
67
|
-
data: :input, left: height_wanted*20/100, top: 0, edit: true, attach: :input_back , height: height_wanted, position: :absolute})
|
68
|
-
|
69
|
-
text_input.touch(true) do
|
70
|
-
puts text_input.data
|
71
|
-
text_input.component({ selected: {color: 'rgba(0,0,0,0.3)', text: :orange} })
|
72
|
-
end
|
73
|
-
@atomes[:input_text] = text_input
|
74
|
-
|
75
|
-
input_back
|
76
|
-
end
|
77
|
-
|
78
|
-
end
|
79
|
-
|
80
|
-
def input_box(params = {}, &proc)
|
81
|
-
text_color=:white
|
82
|
-
text_size= 12
|
83
|
-
back_color= :gray
|
84
|
-
width= 2000
|
85
|
-
in_b = EVe.new()
|
86
|
-
in_b.input_box
|
87
|
-
|
88
|
-
|
89
|
-
# grab(:view).input_box(params, &proc)
|
90
|
-
end
|
91
|
-
|
92
|
-
|
93
|
-
#######
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
new({particle: :controller}) do |msg|
|
100
|
-
Atome.controller_sender(msg)
|
101
|
-
end
|
102
|
-
|
103
|
-
button = box({smooth: 6,left: 12,top: 120, color:{red: 0.3, green: 0.3, blue: 0.3},id: :my_box})
|
104
|
-
button.shadow({
|
105
|
-
id: :s1,
|
106
|
-
left: 3, top: 3, blur: 9,
|
107
|
-
invert: true,
|
108
|
-
red: 0, green: 0, blue: 0, alpha: 0.7
|
109
|
-
})
|
110
|
-
button.touch(true) do
|
111
|
-
button.controller(:hello)
|
112
|
-
end
|
113
|
-
|
114
|
-
|
115
|
-
slider=box({ width: 333, height: 25, top: 45, left: 12, smooth: 9, color:{red: 0.3, green: 0.3, blue: 0.3}})
|
116
|
-
slider.shadow({
|
117
|
-
id: :s2,
|
118
|
-
left: 3, top: 3, blur: 9,
|
119
|
-
invert: true,
|
120
|
-
red: 0, green: 0, blue: 0, alpha: 0.7
|
121
|
-
})
|
122
|
-
cursor= slider.circle({width: 30, height: 30, left: 2, top: 1, color:{red: 0.3, green: 0.3, blue: 0.3}})
|
123
|
-
|
124
|
-
cursor.left(0)
|
125
|
-
cursor.top(0)
|
126
|
-
cursor.shadow({
|
127
|
-
id: :s4,
|
128
|
-
left: 1, top: 1, blur: 3,
|
129
|
-
option: :natural,
|
130
|
-
red: 0, green: 0, blue: 0, alpha: 0.6
|
131
|
-
})
|
132
|
-
label=text({data: 0, top: 69, left: 30, component: { size: 12 }, color: :gray})
|
133
|
-
cursor.drag({ restrict: {max:{ left: 309, top: 0}} }) do |event|
|
134
|
-
puts cursor.left
|
135
|
-
value = cursor.left/309*100
|
136
|
-
label.data(value)
|
137
|
-
cursor.controller({ action: :setModuleParameterValue, params: { moduleId: 6456549897,parameterId: 9846546, value: value} })
|
138
|
-
|
139
|
-
end
|
140
|
-
|
141
|
-
# new({ particle: :import })
|
142
|
-
|
143
|
-
support=box({top: 250, left: 12, width: 300, height: 40, smooth: 9, color:{red: 0.3, green: 0.3, blue: 0.3}, id: :support })
|
144
|
-
|
145
|
-
support.shadow({
|
146
|
-
id: :s3,
|
147
|
-
left: 3, top: 3, blur: 9,
|
148
|
-
invert: true,
|
149
|
-
red: 0, green: 0, blue: 0, alpha: 0.7
|
150
|
-
})
|
151
|
-
|
152
|
-
# support.duplicate
|
153
|
-
support.import(true) do |content|
|
154
|
-
puts "add code here, content: #{content}"
|
155
|
-
end
|
156
|
-
|
157
|
-
|
158
|
-
# input_element = JS.global[:document].createElement("input")
|
159
|
-
# input_element[:type] = "file"
|
160
|
-
#
|
161
|
-
# input_element.addEventListener("change") do |native_event|
|
162
|
-
# event = Native(native_event)
|
163
|
-
# file = event[:target][:files][0]
|
164
|
-
# if file
|
165
|
-
# puts "file requested: #{file[:name]}"
|
166
|
-
# support.controller({ action: :loadProject, params: { path: file[:name]} })
|
167
|
-
# end
|
168
|
-
# end
|
169
|
-
#
|
170
|
-
# view_div = JS.global[:document].querySelector("#support")
|
171
|
-
#
|
172
|
-
# view_div.appendChild(input_element)
|
173
|
-
|
174
|
-
def fill_toolzone(tools_ids)
|
175
|
-
|
176
|
-
end
|
177
|
-
|
178
|
-
fill_toolzone(%i[files edition select group link copy undo settings])
|
179
|
-
# clear play paste mix
|
180
|
-
|
181
|
-
|
182
|
-
in_box=input_box
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
File without changes
|
File without changes
|