Skip to content

Commit 9501bf8

Browse files
author
Josh Osborne
committed
3d canvas setup
1 parent 2d3cdd3 commit 9501bf8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2323
-58
lines changed

_config.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Site settings
22
title: tinychime 🔔
33
version: "v1"
4-
description: "Design & Code"
4+
tagline: "Design & Code"
55
baseurl: "" # the subpath of your site, e.g. /blog
66
url: "" # the base hostname & protocol for your site
7+
78

89
# Tachyons Version
910
tv: "4.4.2"

_data/features.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
- name: Good Design
2+
description: "Everyone on the team has a deep love for good design but you wouldn't be here if you didn't already know that. We bring a hyper-creative approach to an at times over-logical business."
3+
icon: images/design.svg
4+
link: https://github.com/tinychime
5+
link-text: See what we do
6+
7+
- name: Good Code
8+
description: "Our projects are built in the public and we share solutions to the mistakes we've already made by contributing to the open source community. We like experimenting with functional CSS and "
9+
icon: images/code-black.svg
10+
link: https://github.com/tinychime
11+
link-text: We keep it all on Github
12+
13+
# - name: Right-Sized
14+
# description: "While tinychime’s core team is an army of one, we can grow to meet your needs. We take advantage of a network of designers, artists, musicians, and engineers across the United States. Much like a noxious gas, the team expands to fill the space it occupies."
15+
# icon:
16+
# link: https://github.com/tinychime
17+
# link-text: Meet the team
18+
19+
# - name: For Non-Profits
20+
# description: "With Jekyll's templating engine, you can share partial sections of code across multiple pages. Make your :( static prototype :( feel like a ~*fancy app*~."
21+
# icon:
22+
# link: https://github.com/tinychime
23+
# link-text: Find out more
24+
25+
- name: Beautifully Usable
26+
description: "We care an awful lot about functional design that also happens to be pleasant to look at. Usability and accessibility are are top of mind on all of our projects."
27+
icon: images/research.svg
28+
link: https://github.com/tinychime
29+
link-text: Find out more

_data/slides.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- image: "/images/slides/test-image.png"
2+
width: "w-80"

_includes/background.js

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
var values = {
2+
friction: 0.8,
3+
timeStep: 0.01,
4+
amount: 15,
5+
mass: 2,
6+
count: 0
7+
};
8+
values.invMass = 1 / values.mass;
9+
10+
var path, springs;
11+
var size = view.size * [1.2, 1];
12+
13+
var Spring = function(a, b, strength, restLength) {
14+
this.a = a;
15+
this.b = b;
16+
this.restLength = restLength || 80;
17+
this.strength = strength ? strength : 0.55;
18+
this.mamb = values.invMass * values.invMass;
19+
};
20+
21+
Spring.prototype.update = function() {
22+
var delta = this.b - this.a;
23+
var dist = delta.length;
24+
var normDistStrength = (dist - this.restLength) /
25+
(dist * this.mamb) * this.strength;
26+
delta.y *= normDistStrength * values.invMass * 0.2;
27+
if (!this.a.fixed)
28+
this.a.y += delta.y;
29+
if (!this.b.fixed)
30+
this.b.y -= delta.y;
31+
};
32+
33+
34+
function createPath(strength) {
35+
var path = new Path({
36+
fillColor: 'black'
37+
});
38+
springs = [];
39+
for (var i = 0; i <= values.amount; i++) {
40+
var segment = path.add(new Point(i / values.amount, 0.5) * size);
41+
var point = segment.point;
42+
if (i == 0 || i == values.amount)
43+
point.y += size.height;
44+
point.px = point.x;
45+
point.py = point.y;
46+
// The first two and last two points are fixed:
47+
point.fixed = i < 2 || i > values.amount - 2;
48+
if (i > 0) {
49+
var spring = new Spring(segment.previous.point, point, strength);
50+
springs.push(spring);
51+
}
52+
}
53+
path.position.x -= size.width / 4;
54+
return path;
55+
}
56+
57+
function onResize() {
58+
if (path)
59+
path.remove();
60+
size = view.bounds.size * [2, 1];
61+
path = createPath(0.1);
62+
}
63+
64+
function onMouseMove(event) {
65+
var location = path.getNearestLocation(event.point);
66+
var segment = location.segment;
67+
var point = segment.point;
68+
69+
if (!point.fixed && location.distance < size.height / 4) {
70+
var y = event.point.y;
71+
point.y += (y - point.y) / 6;
72+
if (segment.previous && !segment.previous.fixed) {
73+
var previous = segment.previous.point;
74+
previous.y += (y - previous.y) / 24;
75+
}
76+
if (segment.next && !segment.next.fixed) {
77+
var next = segment.next.point;
78+
next.y += (y - next.y) / 24;
79+
}
80+
}
81+
}
82+
83+
function onFrame(event) {
84+
updateWave(path);
85+
}
86+
87+
function updateWave(path) {
88+
var force = 1 - values.friction * values.timeStep * values.timeStep;
89+
for (var i = 0, l = path.segments.length; i < l; i++) {
90+
var point = path.segments[i].point;
91+
var dy = (point.y - point.py) * force;
92+
point.py = point.y;
93+
point.y = Math.max(point.y + dy, 0);
94+
}
95+
96+
for (var j = 0, l = springs.length; j < l; j++) {
97+
springs[j].update();
98+
}
99+
path.smooth({ type: 'continuous' });
100+
}
101+
102+
function onKeyDown(event) {
103+
if (event.key == 'space') {
104+
path.fullySelected = !path.fullySelected;
105+
path.fillColor = path.fullySelected ? null : 'black';
106+
}
107+
}

_includes/footer.html

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
<footer class="f4 lh-copy w-50-ns tracked-med">
2-
<p>Interested in making something astronomically weird together? <a href="#" class="link black bb bw1 dim">Click here to copy our email address</a> and then go send us your idea along with any other relevant information. We usually respond within the day.<p>
3-
<ul class="list ma0 pa0">
4-
<li class="dib mr3 bb bw1 dim">
5-
<a class="link black" href="http://www.github.com/tinychime">Github</a>
6-
</li>
7-
<li class="dib mr3 bb bw1 dim">
8-
<a class="link black" href="http://www.twitter.com/tinychime">Twitter</a>
9-
</li>
10-
<li class="dib bb bw1 dim">
11-
<a class="link black" href="#">Blog</a>
12-
</li>
13-
</ul>
14-
</footer>
1+
<!-- <div class="cf"></div>
2+
<footer class="bg-black white pa5 f4 lh-copy tracked-med">
3+
<h2 class="fw4 f4">tinychime —</h2>
4+
<div class="w-50 pr3 fl">
5+
<p class="lh-copy">the product studio</p>
6+
</div>
7+
<div class="w-25 pr3 fl">
8+
<ul class="list mt0 pt0">
9+
<li>Twitter</li>
10+
<li>Instagram</li>
11+
</ul>
12+
</div>
13+
<div class="w-25 fl">
14+
{{ site.email }}
15+
</div>
16+
<div class="cf"></div>
17+
</footer> -->

_includes/head.html

+3
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212
<!-- Styles -->
1313
<link rel="stylesheet" href="https://unpkg.com/tachyons@{{ site.tv }}/css/tachyons.min.css"/>
1414
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
15+
16+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
17+
<script src="/scripts/three.min.js"></script>
1518
</head>

_includes/header.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<header class="f4 tracked-med">
1+
<!-- <header class="f4 tracked-med ma5-ns ma4 fixed">
22
<a class="link black dim" href="{{ site.baseurl }}/">{{ site.title }}</a>
3-
<span class="black-60">– {{ site.description }}</span>
4-
<a class="link black dim fr-ns db mt3 mt0-ns" href="information.html">Information &rarr;</a>
5-
</header>
3+
<span class="black-60">– {{ site.tagline }}</span>
4+
</header> -->

_layouts/default.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
{% include head.html %}
55

6-
<body class="system ma4-ns ma3">
6+
<body class="system">
77

88
{% include header.html %}
99

10-
<div class="page-content">
11-
<div class="wrapper">
10+
<div class="">
11+
<div class="">
1212
{{ content }}
1313
</div>
1414
</div>

_layouts/page.html

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
---
44
<article class="post">
55

6-
<header class="post-header">
7-
<h1 class="post-title">{{ page.title }}</h1>
8-
</header>
9-
106
<div class="post-content">
117
{{ content }}
128
</div>

_layouts/post.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
layout: default
33
---
4-
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
4+
<article class="ma5" itemscope itemtype="http://schema.org/BlogPosting">
55

6-
<header class="post-header">
7-
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
8-
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
6+
<header class="">
7+
<h1 class="" itemprop="name headline">{{ page.title }}</h1>
8+
<p class=""><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
99
</header>
1010

1111
<div class="post-content" itemprop="articleBody">
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: post
3+
title: "Hello Tinychime"
4+
image: "/images/work/tc-work-10.png"
5+
description: ""
6+
date: 2016-08-13
7+
categories: jekyll update
8+
---
9+
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
10+
11+
To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
12+
13+
Jekyll also offers powerful support for code snippets:
14+
15+
{% highlight ruby %}
16+
def print_hi(name)
17+
puts "Hi, #{name}"
18+
end
19+
print_hi('Tom')
20+
#=> prints 'Hi, Tom' to STDOUT.
21+
{% endhighlight %}
22+
23+
Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
24+
25+
[jekyll-docs]: http://jekyllrb.com/docs/home
26+
[jekyll-gh]: https://github.com/jekyll/jekyll
27+
[jekyll-talk]: https://talk.jekyllrb.com/

_posts/2016-08-13-welcome-to-jekyll.markdown

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
layout: post
3-
title: "Welcome to Jekyll!"
3+
title: "Functional CSS & You"
4+
image: "/images/work/tc-work-10.png"
5+
description: ""
46
date: 2016-08-13 01:43:32 -0400
57
categories: jekyll update
68
---

css/main.scss

+51-12
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,61 @@
33
---
44
.system { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; }
55
.cf { clear: both; }
6-
.tracked-med { letter-spacing: .03em; }
7-
.bw {
8-
-webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */
9-
filter: grayscale(100%);
6+
.tracked-med { letter-spacing: .04em; }
7+
8+
.blue {
9+
color: #000DFF;
10+
}
11+
12+
svg {
13+
position: absolute;
14+
left: 0;
15+
right: 0;
16+
top: 0;
17+
bottom: 0;
18+
}
19+
20+
#controls{position:absolute;z-index:100;color:white;}
21+
#controls input[type=range]{background:none;}
22+
#controls input[type=number]{width:3em}
23+
label{display:block}
24+
.dg.ac{z-index:100!important}
25+
26+
.absolute-center {
27+
position: fixed;
28+
top: 55%;
29+
left: 50%;
30+
transform: translate(-50%, -50%);
1031
}
1132

12-
.anaglyph {
13-
animation: .1s ani infinite;
14-
filter: drop-shadow(2px 0 1px red) drop-shadow(-2px 0 1px cyan);
15-
&:hover {
16-
animation-play-state: paused;
33+
.w6 {
34+
width: 22rem;
35+
}
36+
37+
// .p-fix {
38+
// &:nth-child(1n) {
39+
// padding-right: 100px;
40+
// }
41+
// }
42+
43+
.mh-p {
44+
min-height: 250px;
45+
}
46+
47+
.cf-4th {
48+
&:nth-child(4n) {
49+
margin-right: 0;
50+
clear: both;
51+
padding-right: 100px;
52+
}
53+
&:nth-child(3n) {
54+
padding-right: 0;
1755
}
1856
}
1957

20-
@keyframes ani {
21-
to {
22-
filter: drop-shadow(-2px 0 1px red) drop-shadow(2px 0 1px cyan);
58+
.p-fix {
59+
&:nth-child(2n) {
60+
padding-right: 0;
61+
margin-right: 0;
2362
}
2463
}

design.svg

+24
Loading

0 commit comments

Comments
 (0)