Skip to content

Commit 8151d3b

Browse files
New release.
1 parent 3e859e6 commit 8151d3b

24 files changed

+813
-273
lines changed

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,36 @@ Here's an example of a retro theme (vim) with a **custom texture**:
7777
}
7878
```
7979

80+
81+
### Creating custom designs
82+
83+
You can now use **completely custom designs for each block**! You just link to one image for each block when creating your theme and the plugin takes care of the rest. You can even use lists of images if you want BlockRain to pick a random design for each block.
84+
85+
**Keep in mind that the images need to follow the exact same format (rotation and width/height ratio) as [the blocks that are bundled with the custom theme](https://github.com/Aerolab/blockrain.js/tree/gh-pages/assets/blocks/custom)**.
86+
87+
Fun fact: Now you can rotate the square!
88+
89+
90+
```js
91+
'custom': {
92+
background: '#040304',
93+
backgroundGrid: '#000',
94+
complexBlocks: {
95+
line: ['assets/blocks/custom/line.png', 'assets/blocks/custom/line.png'],
96+
square: 'assets/blocks/custom/square.png',
97+
arrow: 'assets/blocks/custom/arrow.png',
98+
rightHook:'assets/blocks/custom/rightHook.png',
99+
leftHook: 'assets/blocks/custom/leftHook.png',
100+
rightZag: 'assets/blocks/custom/rightZag.png',
101+
leftZag: 'assets/blocks/custom/leftZag.png'
102+
}
103+
}
104+
```
105+
106+
80107
### Available themes:
81108

109+
* custom **NEW!**
82110
* candy
83111
* modern
84112
* retro
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

bower.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
22
"name": "blockrain",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Add a game of tetris to your site",
55
"main": "dist/blockrain.jquery.min.js",
6+
"dependencies": {
7+
"jquery": "~1.11.3"
8+
},
69
"repository": {
710
"type": "git",
811
"url": "git://github.com/Aerolab/blockrain.js.git"

dist/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,36 @@ Here's an example of a retro theme (vim) with a **custom texture**:
7777
}
7878
```
7979

80+
81+
### Creating custom designs
82+
83+
You can now use **completely custom designs for each block**! You just link to one image for each block when creating your theme and the plugin takes care of the rest. You can even use lists of images if you want BlockRain to pick a random design for each block.
84+
85+
**Keep in mind that the images need to follow the exact same format (rotation and width/height ratio) as [the blocks that are bundled with the custom theme](https://github.com/Aerolab/blockrain.js/tree/gh-pages/assets/blocks/custom)**.
86+
87+
Fun fact: Now you can rotate the square!
88+
89+
90+
```js
91+
'custom': {
92+
background: '#040304',
93+
backgroundGrid: '#000',
94+
complexBlocks: {
95+
line: ['assets/blocks/custom/line.png', 'assets/blocks/custom/line.png'],
96+
square: 'assets/blocks/custom/square.png',
97+
arrow: 'assets/blocks/custom/arrow.png',
98+
rightHook:'assets/blocks/custom/rightHook.png',
99+
leftHook: 'assets/blocks/custom/leftHook.png',
100+
rightZag: 'assets/blocks/custom/rightZag.png',
101+
leftZag: 'assets/blocks/custom/leftZag.png'
102+
}
103+
}
104+
```
105+
106+
80107
### Available themes:
81108

109+
* custom **NEW!**
82110
* candy
83111
* modern
84112
* retro

dist/assets/blocks/custom/arrow.png

1.39 KB
Loading
1011 Bytes
Loading

dist/assets/blocks/custom/leftZag.png

1.3 KB
Loading

dist/assets/blocks/custom/line.png

2.06 KB
Loading
1.55 KB
Loading
902 Bytes
Loading

dist/assets/blocks/custom/square.png

2.01 KB
Loading

dist/blockrain.css

+64
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,70 @@
77
line-height: 140%;
88
}
99

10+
/* Touch Controls */
11+
.blockrain-touch {
12+
position: absolute;
13+
width: 50px;
14+
height: 50px;
15+
display: block;
16+
border-radius: 100%;
17+
border: 1px solid white;
18+
background: rgba(255,255,255,0.2);
19+
z-index: 10;
20+
21+
-webkit-touch-callout: none;
22+
-webkit-user-select: none;
23+
-moz-user-select: none;
24+
-ms-user-select: none;
25+
user-select: none;
26+
27+
line-height: 50px;
28+
text-align: center;
29+
}
30+
.blockrain-touch:active {
31+
background: rgba(255,255,255,0.3);
32+
}
33+
34+
.blockrain-touch-left {
35+
left: -60px;
36+
bottom: 10px;
37+
}
38+
.blockrain-touch-left::after {
39+
content: "<";
40+
}
41+
.blockrain-touch-right {
42+
right: -60px;
43+
bottom: 10px;
44+
}
45+
.blockrain-touch-right::after {
46+
content: ">";
47+
}
48+
49+
.blockrain-touch-rotate-left {
50+
left: -60px;
51+
bottom: 80px;
52+
}
53+
.blockrain-touch-rotate-left::after {
54+
content: "<o";
55+
}
56+
57+
.blockrain-touch-rotate-right {
58+
right: -60px;
59+
bottom: 80px;
60+
}
61+
.blockrain-touch-rotate-right::after {
62+
content: "o>";
63+
}
64+
65+
.blockrain-touch-drop {
66+
left: 50%;
67+
margin-left: -25px;
68+
bottom: -60px;
69+
}
70+
.blockrain-touch-drop::after {
71+
content: ".";
72+
}
73+
1074
/* Buttons */
1175
.blockrain-btn {
1276
position: relative;

0 commit comments

Comments
 (0)