Skip to content

Commit

Permalink
Release 0.8.3
Browse files Browse the repository at this point in the history
* apply a black CSS background to p8g.js canvas by default #28
* ensure predictable rasterization #34
  • Loading branch information
bernhardfritz committed Feb 8, 2023
1 parent 0b04061 commit 718d35d
Show file tree
Hide file tree
Showing 47 changed files with 181 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug report
description: Create a report to help us improve
description: Create a report to help us improve.
title: '[Bug]: '
labels: ['bug']
body:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: p8g bug-reports Discord channel
- name: '#bug-reports Discord channel'
url: https://discord.gg/SnxgHs3wEc
about: If you are not sure whether you encountered a bug or not, feel free to join our Discord server and tell us about it.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature request
description: Suggest an idea for this project
description: Suggest an idea for this project.
title: '[Feature]: '
labels: ['feature']
body:
Expand Down
Binary file modified c/libp8g.dylib
Binary file not shown.
Binary file modified c/libp8g.so
Binary file not shown.
Binary file modified c/p8g.dll
Binary file not shown.
5 changes: 4 additions & 1 deletion c/p8g.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
image-rendering: crisp-edges;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
margin: -0.375px 0 0 -0.375px;
}

canvas.emscripten:focus {
Expand Down Expand Up @@ -92,7 +93,9 @@
</style>
</head>
<body>
<canvas class="emscripten hidden" id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
<div style="display: inline-flex; overflow: hidden;">
<canvas class="emscripten hidden" id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
</div>
<div class="spinner" id="spinner"></div>
<div class="emscripten" id="status">Downloading...</div>

Expand Down
Binary file modified c/p8g.wasm
Binary file not shown.
5 changes: 5 additions & 0 deletions docs/blog/2022-04-10-p8g-0-1-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: p8g v0.1.0 is out! 🎉
---

* add ci
9 changes: 9 additions & 0 deletions docs/blog/2022-04-22-p8g-0-1-1-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: p8g v0.1.1 is out! 🎉
---

* add p8g.h to p8g.zip
* add logo to documentation
* change documentation color theme
* fix typo in HelloRectangle.java
* update readme
8 changes: 8 additions & 0 deletions docs/blog/2022-05-23-p8g-0-2-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: p8g v0.2.0 is out! 🎉
---

* add support for compilation to WebAssembly
* fix color macros
* add code examples to the docs
* promote discord server more prominently
10 changes: 10 additions & 0 deletions docs/blog/2022-06-20-p8g-0-3-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: p8g v0.3.0 is out! 🎉
---

* add mouse and keyboard events
* add deltaTime
* fix bug related to use of static variables in p8g.h
* fix bug in scale function
* minor ci adaptions
* add more examples to the docs
8 changes: 8 additions & 0 deletions docs/blog/2022-07-11-p8g-0-4-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: p8g v0.4.0 is out! 🎉
---

* add support for C++
* update docs
* add A* example written in C++
* CI adaptions
10 changes: 10 additions & 0 deletions docs/blog/2022-07-29-p8g-0-5-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: p8g v0.5.0 is out! 🎉
---

* add functions to load and display images
* add random number functions
* add function for millis since start
* fix colorMode bug
* add flappy bird example
* improve docs
5 changes: 5 additions & 0 deletions docs/blog/2022-08-15-p8g-0-6-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: p8g v0.6.0 is out! 🎉
---

* add functions to load custom fonts and display text
8 changes: 8 additions & 0 deletions docs/blog/2022-08-26-p8g-0-6-1-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: p8g v0.6.1 is out! 🎉
---

* fix linux issue related to libglfw.so
* prevent keyCode and mouseButton from being updated during keyReleased
and mouseReleased respectively
* update keyboard event example screenshot
6 changes: 6 additions & 0 deletions docs/blog/2022-09-18-p8g-0-7-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: p8g v0.7.0 is out! 🎉
---

* add JavaScript support
* make docs more mobile-friendly
7 changes: 7 additions & 0 deletions docs/blog/2022-09-23-p8g-0-7-1-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: p8g v0.7.1 is out! 🎉
---

* fix bug in JavaScript binding that prevented drawing buffer from being
preserved
* add more JavaScript examples
5 changes: 5 additions & 0 deletions docs/blog/2022-09-27-p8g-0-7-2-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: p8g v0.7.2 is out! 🎉
---

* fix font rendering artifacts
6 changes: 6 additions & 0 deletions docs/blog/2022-10-09-p8g-0-8-0-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: p8g v0.8.0 is out! 🎉
---

* fix C/C++ runtime errors on Windows
* fix font smoothing
5 changes: 5 additions & 0 deletions docs/blog/2022-10-12-p8g-0-8-1-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: p8g v0.8.1 is out! 🎉
---

* allow memory growth
5 changes: 5 additions & 0 deletions docs/blog/2022-10-31-p8g-0-8-2-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: p8g v0.8.2 is out! 🎉
---

* fix keyCode and mouseButton to also be set on release
6 changes: 6 additions & 0 deletions docs/blog/2023-02-08-p8g-0-8-3-is-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: p8g v0.8.3 is out! 🎉
---

* apply a black CSS background to p8g.js canvas by default [#28](https://github.com/bernhardfritz/p8g/issues/28)
* ensure predictable rasterization [#34](https://github.com/bernhardfritz/p8g/issues/34)
3 changes: 2 additions & 1 deletion docs/docs/get-started/js.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import IconExternalLink from '@theme/IconExternalLink';

# JavaScript

Expand Down Expand Up @@ -120,7 +121,7 @@ Use something like `python -m http.server` or https://marketplace.visualstudio.c

`cookiecutter https://github.com/bernhardfritz/cookiecutter-p8g`

[cookiecutter-p8g](https://github.com/bernhardfritz/cookiecutter-p8g) is a Cookiecutter template for a p8g project.
[cookiecutter-p8g<IconExternalLink />](https://github.com/bernhardfritz/cookiecutter-p8g) is a Cookiecutter template for a p8g project.

</TabItem>
</Tabs>
3 changes: 2 additions & 1 deletion docs/docs/reference/applyMatrix.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';
import IconExternalLink from '@theme/IconExternalLink';

# applyMatrix

## Description

Multiplies the current matrix by the one specified through the parameters. This is a powerful operation that can perform the equivalent of translate, scale, shear and rotate all at once. You can learn more about transformation matrices on [Wikipedia](https://en.wikipedia.org/wiki/Transformation_matrix).
Multiplies the current matrix by the one specified through the parameters. This is a powerful operation that can perform the equivalent of translate, scale, shear and rotate all at once. You can learn more about transformation matrices on [Wikipedia<IconExternalLink />](https://en.wikipedia.org/wiki/Transformation_matrix).

The parameters correspond to a transformation matrix in the form of:

Expand Down
7 changes: 4 additions & 3 deletions docs/docs/reference/createCanvas.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Highlight } from '@site/src/components/Highlight';
import IconExternalLink from '@theme/IconExternalLink';

# createCanvas

Expand All @@ -8,7 +9,7 @@ import { Highlight } from '@site/src/components/Highlight';

Creates a canvas element in the document and sets its dimensions in pixels. The variables `width` and `height` are set by the parameters passed to this function.

By default, your canvas is added to the end of the web page it's in. Alternatively, you may want to position your canvas in the midst of other information on your page. This can be done by using the [appendChild](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild) function:
By default, your canvas is added to the end of the web page it's in. Alternatively, you may want to position your canvas in the midst of other information on your page. This can be done by using the [appendChild<IconExternalLink />](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild) function:

```html title=index.html
<!DOCTYPE html>
Expand All @@ -18,7 +19,7 @@ By default, your canvas is added to the end of the web page it's in. Alternative
</head>
<body>
<p>Here is my sketch:</p>
<div id="sketch-holder">
<div id="sketch-holder" style="display: inline-flex; overflow: hidden;">
<!-- Our sketch will go here! -->
</div>
<p>Pretty cool, eh?</p>
Expand Down Expand Up @@ -60,4 +61,4 @@ createCanvas(w, h)

## Returns

[HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement)
[HTMLCanvasElement<IconExternalLink />](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement)
12 changes: 12 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const config = {
// Please change this to your repo.
editUrl: 'https://github.com/bernhardfritz/p8g/edit/master/docs',
},
blog: {
path: 'blog',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
Expand Down Expand Up @@ -58,6 +61,11 @@ const config = {
label: 'Examples',
activeBaseRegex: '/examples',
},
{
to: 'blog',
label: 'Blog',
position: 'left',
},
{
to: '/editor',
position: 'left',
Expand Down Expand Up @@ -107,6 +115,10 @@ const config = {
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/bernhardfritz/p8g',
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/breakout.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import IconExternalLink from '@theme/IconExternalLink';

# Breakout

<AutofocusIframe src="https://bernhardfritz.github.io/breakout/" width="640" height="420" scrolling="no" />
<AutofocusIframe src="https://bernhardfritz.github.io/breakout" width="640" height="420" scrolling="no" />
<br />
<a href="https://github.com/bernhardfritz/breakout">Source code<IconExternalLink /></a>
Loading

0 comments on commit 718d35d

Please sign in to comment.