Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grains
grains-web
Commits
2e020e06
Commit
2e020e06
authored
May 22, 2017
by
Jens-Christian Fischer
Browse files
Only use two types for now
also make the circle more of an oval
parent
cd82cff6
Changes
3
Show whitespace changes
Inline
Side-by-side
lib/grains/type.ex
View file @
2e020e06
defmodule
Grains
.
Type
do
@nr_types
4
@nr_types
2
@nr_colors
255
@nr_saturations
50
...
...
mix.exs
View file @
2e020e06
...
...
@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def
project
do
[
app:
:grains
,
version:
"0.0.8
4
"
,
version:
"0.0.8
5
"
,
elixir:
"~> 1.2"
,
elixirc_paths:
elixirc_paths
(
Mix
.
env
),
compilers:
[
:phoenix
,
:gettext
]
++
Mix
.
compilers
,
...
...
web/static/js/presencesketch.js
View file @
2e020e06
...
...
@@ -242,8 +242,8 @@ Boid.prototype.polygon = function(x, y, radius, npoints) {
Boid
.
prototype
.
render_circle
=
function
()
{
this
.
p
.
arc
(
0
,
0
,
this
.
radius
-
2
,
this
.
radius
-
2
,
0
,
this
.
p
.
QUARTER_PI
);
this
.
p
.
ellipse
(
0
,
0
,
this
.
radius
,
this
.
radius
);
//
this.p.arc(0, 0, this.radius- 2, this.radius-2, 0, this.p.QUARTER_PI);
this
.
p
.
ellipse
(
0
,
0
,
1.7
*
this
.
radius
,
2
*
this
.
radius
);
}
...
...
@@ -459,13 +459,13 @@ let PresenceSketch = {
PresenceSketch
.
width
-
100
,
100
,
'
circle
'
);
PresenceSketch
.
masters
[
'
triangle
'
]
=
new
Master
(
PresenceSketch
.
p5
,
100
,
PresenceSketch
.
height
-
100
,
'
triangle
'
);
//
PresenceSketch.masters['triangle'] = new Master(PresenceSketch.p5,
//
100,
//
PresenceSketch.height - 100, 'triangle');
PresenceSketch
.
masters
[
'
star
'
]
=
new
Master
(
PresenceSketch
.
p5
,
PresenceSketch
.
width
-
100
,
PresenceSketch
.
height
-
100
,
'
star
'
);
//
PresenceSketch.masters['star'] = new Master(PresenceSketch.p5,
//
PresenceSketch.width - 100,
//
PresenceSketch.height - 100, 'star');
let
b1
=
s
.
color
(
88
,
131
,
120
);
let
b2
=
s
.
color
(
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment