Skip to content

Commit e7b6446

Browse files
committed
publish: 6.22.18
1 parent 7c3bac9 commit e7b6446

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

README.md

+22-4
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ It contains this initialization steps:
5454
dosbox -c DIGGER.COM
5555
```
5656

57-
Dos has couple configuration [options](http://js-dos.com/6.22/docs/api/generate.html?page=js-dos-options) that you can pass as second argument.
57+
Dos has couple configuration [options](http://js-dos.com/6.22/docs/api/generate.html?page=js-dos-options) that you can pass as second argument `Dos(canvas, options)`.
5858

5959
## API Reference
6060

61-
Read more how to use js-dos in [**API Reference**](http://js-dos.com/6.22/docs/)
61+
Read about api provided by js-dos in [**API Reference**](http://js-dos.com/6.22/docs/)
6262

6363
## FAQ
6464

@@ -141,7 +141,7 @@ do this you need define onprogress handler in [DosOptions](http://js-dos.com/6.2
141141
```javascript
142142
Dos(canvas, {
143143
onprogress: (stage, total, loaded) => {
144-
console.log(stage, loaded * 100 / loaded + "%");
144+
console.log(stage, loaded * 100 / total + "%");
145145
},
146146
}).ready(...);
147147
```
@@ -158,6 +158,19 @@ override `log` and `onerror` property
158158
}).ready(...);
159159
```
160160

161+
### Resizing canvas
162+
163+
You can easily resize canvas by changing **css** (style) properties `width` and `height`.
164+
Take attention, you **should not** change width and height properties of canvas.
165+
166+
```html
167+
<canvas width="640" height="320" style="width: 1280px; height: 640px"></canvas>
168+
```
169+
170+
Rule is simple: `width/height` properties is used by jsdos as native
171+
resolution of game/program, but css `width/height` is for changing real size.
172+
So, for giving example resolution will be 640x320, but canvas size will be 1280x640.
173+
161174
### Mouse locking
162175

163176
By default dosbox mouse will follow browser cursor. However you can change this behaviour by providing `autolock=true` in
@@ -172,6 +185,11 @@ dosbox.conf. Then mouse starts follow browser cursor after first click (lock), a
172185
});
173186
```
174187

188+
### Multiple dosbox instances on one page
189+
190+
JsDos already support multiple instances, just create new canvas for each jsdos and
191+
instaniate it normally. Like in this [64k demoscene](/6.22/64k/index.html) example.
192+
175193
## Building
176194

177195
Building process have two steps:
@@ -198,5 +216,5 @@ gulp
198216

199217
Output will be placed in dist folder. Also in dist folder you can find test page, you open it in browser. All test should pass.
200218
```
201-
firefox dist/test/index.html
219+
firefox dist/test/test.html
202220
```

dist/docs/api/js-dos-ts/js-dos-build.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gulpfile.js --> generateBuildInfo
2020
```
2121
2222
export const Build = {
23-
version: "6.22.17 (1deed0e747da3176651b900a53f46f442b3befcb)",
23+
version: "6.22.18 (7c3bac92b25189169b3468bfd12782519212d508)",
2424
wasmSize: 2167445,
2525
jsSize: 503772,
2626
};

js-dos-ts/js-dos-build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// gulpfile.js --> generateBuildInfo
44

55
export const Build = {
6-
version: "6.22.17 (1deed0e747da3176651b900a53f46f442b3befcb)",
6+
version: "6.22.18 (7c3bac92b25189169b3468bfd12782519212d508)",
77
wasmSize: 2167445,
88
jsSize: 503772,
99
};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-dos",
3-
"version": "6.22.17",
3+
"version": "6.22.18",
44
"description": "Easiest API to run dos programs in browser",
55
"main": "js-dos.js",
66
"repository": {

0 commit comments

Comments
 (0)