gray_scott_gtk3 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -48
- data/.travis.yml +14 -0
- data/README.md +4 -1
- data/gray_scott_gtk3.gemspec +1 -3
- data/lib/gray_scott/color.rb +2 -2
- data/lib/gray_scott/version.rb +1 -1
- data/resources/gray_scott.glade +52 -52
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29d8ff376e95aff2c77e30e15ba230413677c076ad1038c32eb1e20f260698b9
|
4
|
+
data.tar.gz: 4bc65069599f84d94ea987e756d5dc29a88bdacd27b10bf4f6ed9228aaf69d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2826a66e3db9d15ebc0cfa3fe199b77ceb28c241bd0807b2c730836316199994c7f67c6df57bc10920e313feded2ba1c4830cab1d9a7e69b8c5b7ef3052ba830
|
7
|
+
data.tar.gz: 3a27424b1e0d0127903e54778b975906c4176a882223c913ac80639c449b8a1de7f44d1f1d0fb62447af52c28ca6b1fe63efb187de3e0b67175db94228c59352
|
data/.gitignore
CHANGED
@@ -1,55 +1,7 @@
|
|
1
1
|
*.gem
|
2
2
|
*.rbc
|
3
3
|
*.glade~
|
4
|
-
/.config
|
5
4
|
/coverage/
|
6
|
-
/InstalledFiles
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/spec/examples.txt
|
10
|
-
/test/tmp/
|
11
|
-
/test/version_tmp/
|
12
5
|
/tmp/
|
13
|
-
|
14
|
-
# Used by dotenv library to load environment variables.
|
15
|
-
# .env
|
16
|
-
|
17
|
-
## Specific to RubyMotion:
|
18
|
-
.dat*
|
19
|
-
.repl_history
|
20
|
-
build/
|
21
|
-
*.bridgesupport
|
22
|
-
build-iPhoneOS/
|
23
|
-
build-iPhoneSimulator/
|
24
|
-
|
25
|
-
## Specific to RubyMotion (use of CocoaPods):
|
26
|
-
#
|
27
|
-
# We recommend against adding the Pods directory to your .gitignore. However
|
28
|
-
# you should judge for yourself, the pros and cons are mentioned at:
|
29
|
-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
30
|
-
#
|
31
|
-
# vendor/Pods/
|
32
|
-
|
33
|
-
## Documentation cache and generated files:
|
34
|
-
/.yardoc/
|
35
|
-
/_yardoc/
|
36
|
-
/doc/
|
37
|
-
/rdoc/
|
38
|
-
|
39
|
-
## Environment normalization:
|
40
|
-
/.bundle/
|
41
|
-
/vendor/bundle
|
42
|
-
/lib/bundler/man/
|
43
|
-
|
44
|
-
# for a library or gem, you might want to ignore these files since the code is
|
45
|
-
# intended to run in multiple environments; otherwise, check them in:
|
46
6
|
Gemfile.lock
|
47
|
-
# .ruby-version
|
48
|
-
# .ruby-gemset
|
49
|
-
|
50
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
51
|
-
.rvmrc
|
52
|
-
|
53
|
-
# rspec
|
54
|
-
/spec/reports/
|
55
7
|
.rspec_status
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Gray-Scott
|
2
2
|
|
3
|
+
![Gem](https://img.shields.io/gem/v/gray_scott_gtk3)
|
4
|
+
![build status](https://travis-ci.com/kojix2/Gray-Scott.svg?branch=master)
|
5
|
+
|
3
6
|
Ruby implementation of the Reaction diffusion system (Gray-Scott model).
|
4
7
|
|
5
8
|
![screenshot](https://raw.githubusercontent.com/kojix2/Gray-Scott/screenshot/screenshot/screenshot.gif)
|
@@ -31,7 +34,7 @@ NOTE : You can set the width and height of the model, but the width and height o
|
|
31
34
|
## Known issue
|
32
35
|
|
33
36
|
Glib::Timeout.add(number_of_seconds)
|
34
|
-
If processing can not be completed within the time, it will not be displayed.
|
37
|
+
If processing can not be completed within the time, it will not be displayed.
|
35
38
|
In this case, you should increase the number of seconds.
|
36
39
|
|
37
40
|
## Contributing
|
data/gray_scott_gtk3.gemspec
CHANGED
@@ -14,8 +14,6 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.description = 'Reaction diffusion system (Gray-Scott model).'
|
15
15
|
spec.homepage = 'https://github.com/kojix2/Gray-Scott'
|
16
16
|
|
17
|
-
# Specify which files should be added to the gem when it is released.
|
18
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
17
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
18
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
19
|
end
|
@@ -27,6 +25,6 @@ Gem::Specification.new do |spec|
|
|
27
25
|
spec.add_dependency 'numo-narray'
|
28
26
|
|
29
27
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
30
|
-
spec.add_development_dependency 'rake', '
|
28
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
31
29
|
spec.add_development_dependency 'rspec'
|
32
30
|
end
|
data/lib/gray_scott/color.rb
CHANGED
@@ -39,11 +39,11 @@ module GrayScott
|
|
39
39
|
def hsv2rgb(h)
|
40
40
|
i = UInt8.cast(h * 6)
|
41
41
|
f = (h * 6.0) - i
|
42
|
-
p = UInt8.zeros
|
42
|
+
p = UInt8.zeros(*h.shape)
|
43
43
|
v = UInt8.new(*h.shape).fill 255
|
44
44
|
q = (1.0 - f) * 256
|
45
45
|
t = f * 256
|
46
|
-
rgb = UInt8.zeros
|
46
|
+
rgb = UInt8.zeros(*h.shape, 3)
|
47
47
|
t = UInt8.cast(t)
|
48
48
|
i = uInt8_dstack([i, i, i])
|
49
49
|
rgb[i.eq 0] = uInt8_dstack([v, t, p])[i.eq 0]
|
data/lib/gray_scott/version.rb
CHANGED
data/resources/gray_scott.glade
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!-- Generated with glade 3.
|
2
|
+
<!-- Generated with glade 3.36.0 -->
|
3
3
|
<interface>
|
4
4
|
<requires lib="gtk+" version="3.16"/>
|
5
5
|
<object class="GtkAdjustment" id="f">
|
6
|
-
<property name="upper">0.
|
7
|
-
<property name="value">0.
|
6
|
+
<property name="upper">0.1</property>
|
7
|
+
<property name="value">0.04</property>
|
8
8
|
<property name="step_increment">0.01</property>
|
9
9
|
<property name="page_increment">0.01</property>
|
10
10
|
<signal name="value-changed" handler="on_f_changed" swapped="no"/>
|
@@ -18,8 +18,8 @@
|
|
18
18
|
<signal name="value-changed" handler="on_frames_changed" swapped="no"/>
|
19
19
|
</object>
|
20
20
|
<object class="GtkAdjustment" id="k">
|
21
|
-
<property name="upper">0.
|
22
|
-
<property name="value">0.
|
21
|
+
<property name="upper">0.1</property>
|
22
|
+
<property name="value">0.06</property>
|
23
23
|
<property name="step_increment">0.01</property>
|
24
24
|
<property name="page_increment">0.01</property>
|
25
25
|
<signal name="value-changed" handler="on_k_changed" swapped="no"/>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<property name="upper">1</property>
|
36
36
|
<property name="value">0.5</property>
|
37
37
|
<property name="step_increment">0.01</property>
|
38
|
-
<property name="page_increment">0.
|
38
|
+
<property name="page_increment">0.1</property>
|
39
39
|
</object>
|
40
40
|
<object class="GtkAdjustment" id="pen_radius">
|
41
41
|
<property name="lower">1</property>
|
@@ -50,9 +50,6 @@
|
|
50
50
|
<property name="title" translatable="yes">Gray-Scott model</property>
|
51
51
|
<property name="resizable">False</property>
|
52
52
|
<signal name="destroy" handler="main_quit" swapped="no"/>
|
53
|
-
<child>
|
54
|
-
<placeholder/>
|
55
|
-
</child>
|
56
53
|
<child>
|
57
54
|
<object class="GtkBox">
|
58
55
|
<property name="visible">True</property>
|
@@ -409,52 +406,15 @@
|
|
409
406
|
<property name="visible">True</property>
|
410
407
|
<property name="can_focus">False</property>
|
411
408
|
<child>
|
412
|
-
<object class="
|
413
|
-
<property name="visible">True</property>
|
414
|
-
<property name="can_focus">False</property>
|
415
|
-
<property name="active">0</property>
|
416
|
-
<items>
|
417
|
-
<item translatable="yes">colorful</item>
|
418
|
-
<item translatable="yes">reverse-colorful</item>
|
419
|
-
<item translatable="yes">red</item>
|
420
|
-
<item translatable="yes">green</item>
|
421
|
-
<item translatable="yes">blue</item>
|
422
|
-
<item translatable="yes">reverse-red</item>
|
423
|
-
<item translatable="yes">reverse-green</item>
|
424
|
-
<item translatable="yes">reverse-blue</item>
|
425
|
-
<item translatable="yes">grayscale</item>
|
426
|
-
</items>
|
427
|
-
<signal name="changed" handler="on_color_combobox_changed" swapped="no"/>
|
428
|
-
</object>
|
429
|
-
<packing>
|
430
|
-
<property name="position">0</property>
|
431
|
-
</packing>
|
432
|
-
</child>
|
433
|
-
<child>
|
434
|
-
<object class="GtkComboBoxText" id="uv_combobox">
|
435
|
-
<property name="visible">True</property>
|
436
|
-
<property name="can_focus">False</property>
|
437
|
-
<property name="active">1</property>
|
438
|
-
<items>
|
439
|
-
<item translatable="yes">U</item>
|
440
|
-
<item translatable="yes">V</item>
|
441
|
-
</items>
|
442
|
-
<signal name="changed" handler="on_uv_combobox_changed" swapped="no"/>
|
443
|
-
</object>
|
444
|
-
<packing>
|
445
|
-
<property name="position">0</property>
|
446
|
-
</packing>
|
447
|
-
</child>
|
448
|
-
<child>
|
449
|
-
<object class="GtkScaleButton" id="pen_radius_scale">
|
409
|
+
<object class="GtkScaleButton" id="pen_density_scale">
|
450
410
|
<property name="visible">True</property>
|
451
411
|
<property name="can_focus">True</property>
|
452
412
|
<property name="focus_on_click">False</property>
|
453
413
|
<property name="receives_default">True</property>
|
454
|
-
<property name="tooltip_text" translatable="yes">pen
|
414
|
+
<property name="tooltip_text" translatable="yes">pen density</property>
|
455
415
|
<property name="relief">none</property>
|
456
416
|
<property name="orientation">vertical</property>
|
457
|
-
<property name="adjustment">
|
417
|
+
<property name="adjustment">pen_density</property>
|
458
418
|
<property name="icons">applications-graphics
|
459
419
|
applications-graphics
|
460
420
|
applications-graphics</property>
|
@@ -482,15 +442,15 @@ applications-graphics
|
|
482
442
|
</packing>
|
483
443
|
</child>
|
484
444
|
<child>
|
485
|
-
<object class="GtkScaleButton" id="
|
445
|
+
<object class="GtkScaleButton" id="pen_radius_scale">
|
486
446
|
<property name="visible">True</property>
|
487
447
|
<property name="can_focus">True</property>
|
488
448
|
<property name="focus_on_click">False</property>
|
489
449
|
<property name="receives_default">True</property>
|
490
|
-
<property name="tooltip_text" translatable="yes">pen
|
450
|
+
<property name="tooltip_text" translatable="yes">pen radius</property>
|
491
451
|
<property name="relief">none</property>
|
492
452
|
<property name="orientation">vertical</property>
|
493
|
-
<property name="adjustment">
|
453
|
+
<property name="adjustment">pen_radius</property>
|
494
454
|
<property name="icons">applications-graphics
|
495
455
|
applications-graphics
|
496
456
|
applications-graphics</property>
|
@@ -517,6 +477,43 @@ applications-graphics
|
|
517
477
|
<property name="position">0</property>
|
518
478
|
</packing>
|
519
479
|
</child>
|
480
|
+
<child>
|
481
|
+
<object class="GtkComboBoxText" id="uv_combobox">
|
482
|
+
<property name="visible">True</property>
|
483
|
+
<property name="can_focus">False</property>
|
484
|
+
<property name="active">1</property>
|
485
|
+
<items>
|
486
|
+
<item translatable="yes">U</item>
|
487
|
+
<item translatable="yes">V</item>
|
488
|
+
</items>
|
489
|
+
<signal name="changed" handler="on_uv_combobox_changed" swapped="no"/>
|
490
|
+
</object>
|
491
|
+
<packing>
|
492
|
+
<property name="position">0</property>
|
493
|
+
</packing>
|
494
|
+
</child>
|
495
|
+
<child>
|
496
|
+
<object class="GtkComboBoxText">
|
497
|
+
<property name="visible">True</property>
|
498
|
+
<property name="can_focus">False</property>
|
499
|
+
<property name="active">0</property>
|
500
|
+
<items>
|
501
|
+
<item translatable="yes">colorful</item>
|
502
|
+
<item translatable="yes">reverse-colorful</item>
|
503
|
+
<item translatable="yes">red</item>
|
504
|
+
<item translatable="yes">green</item>
|
505
|
+
<item translatable="yes">blue</item>
|
506
|
+
<item translatable="yes">reverse-red</item>
|
507
|
+
<item translatable="yes">reverse-green</item>
|
508
|
+
<item translatable="yes">reverse-blue</item>
|
509
|
+
<item translatable="yes">grayscale</item>
|
510
|
+
</items>
|
511
|
+
<signal name="changed" handler="on_color_combobox_changed" swapped="no"/>
|
512
|
+
</object>
|
513
|
+
<packing>
|
514
|
+
<property name="position">0</property>
|
515
|
+
</packing>
|
516
|
+
</child>
|
520
517
|
<child>
|
521
518
|
<object class="GtkSpinButton">
|
522
519
|
<property name="visible">True</property>
|
@@ -638,5 +635,8 @@ applications-graphics
|
|
638
635
|
</child>
|
639
636
|
</object>
|
640
637
|
</child>
|
638
|
+
<child type="titlebar">
|
639
|
+
<placeholder/>
|
640
|
+
</child>
|
641
641
|
</object>
|
642
642
|
</interface>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gray_scott_gtk3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk3
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 12.3.3
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 12.3.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,6 +90,7 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- ".gitignore"
|
92
92
|
- ".rspec"
|
93
|
+
- ".travis.yml"
|
93
94
|
- Gemfile
|
94
95
|
- README.md
|
95
96
|
- Rakefile
|