gray_scott_gtk3 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/exe/grayscott +5 -4
- data/gray_scott_gtk3.gemspec +2 -0
- data/lib/gray_scott.rb +2 -0
- data/lib/gray_scott/color.rb +3 -1
- data/lib/gray_scott/controller.rb +3 -1
- data/lib/gray_scott/controller/aboutdialog.rb +14 -7
- data/lib/gray_scott/model.rb +2 -0
- data/lib/gray_scott/utils/math.rb +2 -0
- data/lib/gray_scott/version.rb +3 -1
- data/resources/gray_scott.glade +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fd6bafca69957ca5cc59d33544dc6b9952d0b5d225efb65e8ad27afa800fda5
|
4
|
+
data.tar.gz: cdafc69e4ef9de1c28831734394d99bef2dded4b1aba75e7045d95f204f67ce6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3e837611848aeb5e9dc566c3da244c5872590eefbc539bdf9111761f6d0180f584d721bc50b630b6ab008a25ecb4f017b12021820c45bd1bf8c3712b7c7516c
|
7
|
+
data.tar.gz: 331f8d90692858a220e60ce3a3a42eaf5b170dc80f8ae3b44b8182079bb8fc022d178fc934cebfd63fc134c1d0dc99b5a195c8a3aecc96c1b7bf66ef6bc02931
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/exe/grayscott
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'optparse'
|
4
5
|
|
5
|
-
opt = {}
|
6
|
+
opt = { width: 256, height: 256 }
|
6
7
|
OptionParser.new do |op|
|
7
|
-
op.on('-h val', '--height', 'height of the model') { |v| opt[:height] = v
|
8
|
-
op.on('-w val', '--width', 'width of the model') { |v| opt[:width] = v
|
8
|
+
op.on('-h val', '--height', 'height of the model', Integer) { |v| opt[:height] = v }
|
9
|
+
op.on('-w val', '--width', 'width of the model', Integer) { |v| opt[:width] = v }
|
9
10
|
op.on('-g', '--gpu', 'use GPU(Cumo)') { |v| opt[:gpu] = v }
|
10
11
|
op.parse!(ARGV)
|
11
12
|
end
|
@@ -19,7 +20,7 @@ module GrayScott
|
|
19
20
|
class << self
|
20
21
|
def run(opt)
|
21
22
|
xml_path = File.expand_path('../resources/', __dir__)
|
22
|
-
Controller.new(xml_path, opt)
|
23
|
+
Controller.new(xml_path, height: opt[:height], width: opt[:width])
|
23
24
|
Gtk.main
|
24
25
|
end
|
25
26
|
end
|
data/gray_scott_gtk3.gemspec
CHANGED
data/lib/gray_scott.rb
CHANGED
data/lib/gray_scott/color.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'controller/aboutdialog'
|
2
4
|
|
3
5
|
module GrayScott
|
@@ -13,7 +15,7 @@ module GrayScott
|
|
13
15
|
@model = Model.new(height: height, width: width)
|
14
16
|
@show_u = false
|
15
17
|
@color = 'colorful'
|
16
|
-
@frames =
|
18
|
+
@frames = 5
|
17
19
|
@msec = 40
|
18
20
|
|
19
21
|
builder = Gtk::Builder.new
|
@@ -1,14 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module GrayScott
|
2
4
|
class Controller
|
3
5
|
class AboutDialog
|
4
6
|
def initialize(resource_dir)
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
Gtk::AboutDialog.new.tap do |d|
|
8
|
+
d.program_name = 'Gray-Scott'
|
9
|
+
d.comments = 'Reaction diffusion system'
|
10
|
+
d.logo = GdkPixbuf::Pixbuf.new(file: File.join(resource_dir, 'about_icon.png'))
|
11
|
+
d.copyright = 'Copyright (C) kojix2'
|
12
|
+
d.authors = ['kojix2']
|
13
|
+
d.version = GrayScott::VERSION
|
14
|
+
d.website = 'https://github.com/kojix2/Gray-Scott'
|
15
|
+
d.website_label = 'Github kojix2/Gray-Scott'
|
16
|
+
d.run
|
17
|
+
d.destroy
|
18
|
+
end
|
12
19
|
end
|
13
20
|
end
|
14
21
|
end
|
data/lib/gray_scott/model.rb
CHANGED
data/lib/gray_scott/version.rb
CHANGED
data/resources/gray_scott.glade
CHANGED
@@ -10,8 +10,9 @@
|
|
10
10
|
<signal name="value-changed" handler="on_f_changed" swapped="no"/>
|
11
11
|
</object>
|
12
12
|
<object class="GtkAdjustment" id="frames">
|
13
|
+
<property name="lower">1</property>
|
13
14
|
<property name="upper">1000</property>
|
14
|
-
<property name="value">
|
15
|
+
<property name="value">5</property>
|
15
16
|
<property name="step_increment">1</property>
|
16
17
|
<property name="page_increment">10</property>
|
17
18
|
<signal name="value-changed" handler="on_frames_changed" swapped="no"/>
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk3
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
127
|
+
rubygems_version: 3.1.2
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Gray-Scott model.
|