Skip to content

Commit

Permalink
Merge branch 'main' into refactor-dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Oct 26, 2024
2 parents 8cc54ab + c749deb commit f4e3d89
Show file tree
Hide file tree
Showing 1,308 changed files with 8,876 additions and 3,999 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/content-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
### Before you start
**Want to change a page yourself?** This content is open source!
↩ Look for the _Edit on GitHub_ link on any MDN page.
↩ Look for the _View this page on GitHub_ link on any MDN page to edit the content on GitHub.com afterwards.
**Is your issue about a browser compatibility table?**
↩ Use the _Report problems with this compatibility data on GitHub_ link next to a compatibility table.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/page-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
### Before you start
**Want to change this page yourself?** This content is open source!
↩ Go back and use the _Edit on GitHub_ link on the page.
↩ Go back and use the _View this page on GitHub_ link on the page to edit the content on GitHub.com afterwards.
**Is your issue about the browser compatibility table?**
↩ Go back and use the _Report problems with this compatibility data on GitHub_ link on the page.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10118,6 +10118,7 @@
/en-US/docs/Web/API/Web_Audio_API/Migrating_from_webkitAudioContext /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Targeting /en-US/docs/Web/API/WebXR_Device_API/Targeting
/en-US/docs/Web/API/Web_Audio_API/Tools /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialisation_basics /en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics
/en-US/docs/Web/API/Web_Audio_API/ended_event /en-US/docs/Web/API/AudioScheduledSourceNode/ended_event
/en-US/docs/Web/API/Web_Crypto_API/Supported_algorithms /en-US/docs/Web/API/SubtleCrypto
Expand Down
4 changes: 0 additions & 4 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -65415,10 +65415,6 @@
"modified": "2020-06-16T14:49:12.422Z",
"contributors": ["jmcantrell", "DianeLooney", "Sheppy"]
},
"Web/API/Web_Audio_API/Tools": {
"modified": "2019-03-18T21:37:44.787Z",
"contributors": ["chrisdavidmills", "alien35", "Sheppy"]
},
"Web/API/Web_Audio_API/Using_AudioWorklet": {
"modified": "2020-10-11T19:28:05.402Z",
"contributors": ["hamishwillee", "tcveatch", "Sheppy"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Now click on the play arrow in the top right corner of the scene to launch and r

This looks great! Let's add more shapes to the scene to make it look more interesting.

![PlayCanvas Editor - Boxrender](playcanvas-editor-boxrender.png)
![PlayCanvas Editor - Box render](playcanvas-editor-boxrender.png)

## Adding more shapes

Expand All @@ -97,7 +97,7 @@ Now follow the same steps as we did before when coloring the cube:

![PlayCanvas Editor - Cylinder material](playcanvas-editor-cylindermaterial.png)

Follow the same approach again to add a cone to the scene, giving it a grayish color (we used EAEFF2.) You should now have three shapes on your scene, something like the below screenshot.
Follow the same approach again to add a cone to the scene, giving it a grayish color (we used `#EAEFF2`.) You should now have three shapes on your scene, something like the below screenshot.

![PlayCanvas Editor - Cone](playcanvas-editor-cone.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ dodecahedron.position.x = 25;
scene.add(dodecahedron);
```

This time, we are creating a dodecahedron, a shape containing twelve flat faces. The parameter, `DodecahedronGeometry(),` defines the size of the object. We're using a Lambert material, similar to Phong, but should be less glossy. Again it's black, for now. We're moving the object to the right, so it's not in the same position as the box, or torus.
This time, we are creating a dodecahedron, a shape containing twelve flat faces. The parameter to `DodecahedronGeometry()` defines the size of the object. We're using a Lambert material, similar to Phong, but should be less glossy. Again it's black, for now. We're moving the object to the right, so it's not in the same position as the box, or torus.

As mentioned above, the new objects currently just look black. To have both, the Phong and Lambert materials properly visible, we need to introduce a source of light.

Expand Down Expand Up @@ -250,7 +250,7 @@ This rotates the cube on every frame, by a tiny bit, so the animation looks smoo

### Scaling

We can also scale an object. Applying a constant value, we would make it grow, or shrink just once. Let's make things more interesting. First, we implement a helper variable, called `t,` for counting elapsed time. Add it right before the `render()` function:
We can also scale an object. Applying a constant value, we would make it grow, or shrink just once. Let's make things more interesting. First, we implement a helper variable called `t` for counting elapsed time. Add it right before the `render()` function:

```js
let t = 0;
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/games/techniques/audio_for_web_games/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ The advantage is that we can prime one piece of audio and have our sprites ready

```js
const myAudio = document.createElement("audio");
myAudio.src = "mysprite.mp3";
myAudio.src = "my-sprite.mp3";
myAudio.play();
myAudio.pause();
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ if (gamepadAPI.buttonPressed("B")) {
}
```

## The paused and gameover states
## The paused and game-over states

We already learned how to control the whole lifecycle of the game: pausing the gameplay, restarting it, or getting back to the main menu. It works smooth on mobile and desktop, and adding gamepad controls is just as straightforward — in the `update()` function, we check to see if the current state status is `paused` — if so, the relevant actions are enabled:
We already learned how to control the whole lifecycle of the game: pausing the gameplay, restarting it, or getting back to the main menu. It works smooth on mobile and desktop, and adding gamepad controls is just as straightforward — in the `update()` function, we check to see if the current state status is "paused" — if so, the relevant actions are enabled:

```js
if (GamepadAPI.buttons.pressed("Start")) {
Expand All @@ -360,7 +360,7 @@ if (GamepadAPI.buttons.pressed("Back")) {
}
```

Similarly, when the `gameover` state status is active, then we can allow the user to restart the game instead of continuing it:
Similarly, when the "game-over" state status is active, then we can allow the user to restart the game instead of continuing it:

```js
if (GamepadAPI.buttons.pressed("Start")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ You can see it in action by watching [this video](https://www.youtube.com/watch?

Have you ever thought about controlling a game only with your hands? It's possible with [Leap Motion](https://www.ultraleap.com/), an immersive controller for games and apps.

Leapmotion is becoming more and more popular due to very good integration with VR headsets — demoing [Rainbow Membrane](https://mozilla.github.io/rainbow/) on an Oculus Rift with Leap Motion attached to it was voted one of the best WebVR experiences by JavaScript developers visiting demo booths at conferences around the world.
Leap Motion is becoming more and more popular due to very good integration with VR headsets — demoing [Rainbow Membrane](https://mozilla.github.io/rainbow/) on an Oculus Rift with Leap Motion attached to it was voted one of the best WebVR experiences by JavaScript developers visiting demo booths at conferences around the world.

As well as being great for virtual interfaces, it can also be used for a casual 2D gaming experiences. It would be very difficult to do everything with only your hands, but it's totally doable for the simple Captain Roger's gameplay — steering the ship and shooting the bullets.

Expand Down Expand Up @@ -158,15 +158,15 @@ The `diff` would be the difference between the initial position of the hand and

This approach won't give us the full flexibility of using a Gamepad, or even Leap Motion, but it's definitely an interesting, unconventional alternative. You can use it to scroll a page hands-free, or play theremin, but it should also be enough to move the ship up and down the screen if implemented correctly.

## MaKey MaKey
## Makey Makey

If you want to go completely bananas you can use [MaKey MaKey](https://makeymakey.com/), a board that can turn anything into a controller — it's all about connecting real-world, conductive objects to a computer and using them as touch interfaces.
If you want to go completely bananas you can use [Makey Makey](https://makeymakey.com/), a board that can turn anything into a controller — it's all about connecting real-world, conductive objects to a computer and using them as touch interfaces.

![Controlling a banana piano using Makey Makey.](controls-banana.png)

Check out the [banana piano video](https://www.youtube.com/watch?v=_DWQ6ce2Ags), and be sure to visit the [quick start guide](https://learn.sparkfun.com/tutorials/makey-makey-quickstart-guide) for all the needed info.

There's even a [Cylon.js-supported Makey Button functionality](https://cylonjs.com/documentation/drivers/makey-button/) inspired by the MaKey MaKey board, so you can use the popular Cylon robotics framework for your experiments with Arduino or Raspberry Pi. Connecting the boards and using them may look like this:
There's even a [Cylon.js-supported Makey Button functionality](https://cylonjs.com/documentation/drivers/makey-button/) inspired by the Makey Makey board, so you can use the popular Cylon robotics framework for your experiments with Arduino or Raspberry Pi. Connecting the boards and using them may look like this:

```js
const Cylon = require("cylon");
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/games/techniques/tilemaps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ In fast games that might still not be enough. An alternative method would be to

- [Demos and source code](https://mozdevs.github.io/gamedev-js-tiles/)
- [Grid parts and relationships](https://www.redblobgames.com/grids/parts/) by Amit Patel (May 2021)
- [Isometric graphics in videogames](https://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art) (Wikipedia)
- [Isometric graphics in video games](https://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art) (Wikipedia)
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All the lessons — and the different versions of the [MDN Breakout game](https:
6. [Bounce off the walls](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Bounce_off_the_walls)
7. [Player paddle and controls](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Player_paddle_and_controls)
8. [Game over](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Game_over)
9. [Build the brickfield](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Build_the_brick_field)
9. [Build the brick field](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Build_the_brick_field)
10. [Collision detection](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Collision_detection)
11. [The score](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/The_score)
12. [Win the game](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Win_the_game)
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/accessible_name/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Other elements get their accessible name from the content of associated elements

For some elements, the accessible name comes from the element's attributes; for example, the `alt` attribute in the case of {{HTMLElement("img")}}. Given `<img src="grape.jpg" alt="banana"/>`, the image's accessible name is "banana."

To create an association between visible content and an element or multiple text nodes and an element, the [`aria-labeledby`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) attribute can be used. If there is no visible text to associate with a UI element needing an accessible name, the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute can be used. Names should not be added to elements marking up inline text, like {{HTMLElement("code")}}, {{HTMLElement("del")}}, and {{HTMLElement("mark")}}.
To create an association between visible content and an element or multiple text nodes and an element, the [`aria-labelledby`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) attribute can be used. If there is no visible text to associate with a UI element needing an accessible name, the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute can be used. Names should not be added to elements marking up inline text, like {{HTMLElement("code")}}, {{HTMLElement("del")}}, and {{HTMLElement("mark")}}.

Many elements, such as sections of textual content, don't need an accessible name. All controls should have an accessible name. All images that convey information and aren't purely presentational do too.

Expand Down
22 changes: 17 additions & 5 deletions files/en-us/glossary/application_context/index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
---
title: Application Context
title: Application context
slug: Glossary/Application_context
page-type: glossary-definition
---

{{GlossarySidebar}}

An **application context** is a top-level {{glossary("browsing context")}} that has a [manifest](/en-US/docs/Web/Manifest) applied to it.
**Application context** refers to the top-level {{glossary("browsing context")}} of a [web application](/en-US/docs/Web/Progressive_web_apps).
It determines how an app's browsing context, such as a tab or a window, is presented and behaves.

If an application context is created as a result of the user agent being asked to navigate to a deep link, the user agent must immediately navigate to the deep link with replacement enabled. Otherwise, when the application context is created, the user agent must immediately navigate to the start URL with replacement enabled.
Web developers define the application context in the [web app's manifest file](/en-US/docs/Web/Manifest).
They use the [`scope`](/en-US/docs/Web/Manifest/scope) member in the manifest to specify the set of URLs that are considered part of the application context and to which the manifest applies.

Please note that the start URL is not necessarily the value of the start_url member: the user or user agent could have changed it when the application was added to home-screen or otherwise bookmarked.
The manifest is applied after the application context is created but before navigation begins to either a start URL or a deep link.
A **start URL** is the initial page of the web app.
A **deep link** is a URL that directs users to a specific page within the web app, bypassing the home page.
The application context ensures that the app's defined behavior and presentation are maintained within its scope.

When an application context is created, browsers must immediately navigate to a start URL or a deep link.
This navigation replaces the current entry in the browsing history.
If the application context is created to navigate to a deep link, the browser navigates directly to that deep link; otherwise, it navigates to the start URL.

Note that the start URL is not necessarily the value of the [`start_url`](/en-US/docs/Web/Manifest/start_url) member in the manifest. Browsers may ignore the specified `start_url` or may allow users to change its value when adding the web app to their device's home screen or bookmarking it.

## See also

- [Progressive web apps (PWA)](/en-US/docs/Web/Progressive_web_apps)
- [`scope`](/en-US/docs/Web/Manifest/scope)
- [Web app manifests](/en-US/docs/Web/Manifest)
- [Progressive web apps (PWA)](/en-US/docs/Web/Progressive_web_apps)
2 changes: 1 addition & 1 deletion files/en-us/glossary/baseline/compatibility/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Baseline considers support in the following browsers:
- Mozilla Firefox (Android)
- Mozilla Firefox (desktop)

Baseline is a summary of browser support. It is not a substitute for accessibility, usability, performance, security, or other testing. Baseline may not tell if you if a feature works with:
Baseline is a summary of browser support. It is not a substitute for accessibility, usability, performance, security, or other testing. Baseline may not tell you if a feature works with:

- Older devices and browser releases
- Browsers not covered by the Baseline definition, such as operating system web views
Expand Down
11 changes: 6 additions & 5 deletions files/en-us/glossary/boolean/html/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ page-type: glossary-definition

{{GlossarySidebar}}

A **boolean attribute** in {{Glossary("HTML")}} is an {{glossary("attribute")}} that represents `true` or `false` values. If an HTML tag contains a boolean attribute - no matter the value of that attribute - the attribute is set to `true` on that element. If an HTML tag does not contain the attribute, the attribute is set to `false`.
A **boolean attribute** in {{Glossary("HTML")}} is an {{glossary("attribute")}} that represents `true` or `false` values. If an HTML tag contains a boolean attribute no matter the value of that attribute the attribute is set to `true` on that element. If an HTML tag does not contain the attribute, the attribute is set to `false`.

If the attribute is present, it can have one of the following values:
If the attribute is present, it can have one of the following forms:

- no value at all, e.g. `attribute`
- the empty string, e.g. `attribute=""`
- attribute's name itself, with no leading or trailing whitespace, e.g. `attribute="attribute"`
- the attribute name alone; e.g., `attribute`, meaning its implicit value is the empty string
- the attribute with a value of the empty string; e.g., `attribute=""`
- the attribute with a value of the attribute's name itself, with no leading or trailing whitespace and case ignored; e.g., `attribute="attribute"`, `attribute="ATTRIBUTE"`

> [!NOTE]
> The strings "true" and "false" are invalid values. To set the attribute to `false`, the attribute should be omitted altogether. Though modern browsers treat _any_ string value as `true`, you should not rely on that behavior.
Expand All @@ -24,6 +24,7 @@ Here's an example of a HTML boolean attribute `checked`:
<input type="checkbox" checked />
<input type="checkbox" checked="" />
<input type="checkbox" checked="checked" />
<input type="checkbox" checked="Checked" />

<!-- The following checkbox will not be checked on initial rendering -->
<input type="checkbox" />
Expand Down
21 changes: 21 additions & 0 deletions files/en-us/glossary/cloud/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Cloud
slug: Glossary/Cloud
page-type: glossary-definition
---

{{GlossarySidebar}}

The **Cloud** refers to servers located worldwide that are accessed over the Internet, and the software and databases that run on those servers.

Instead of storing data or running programs on a local computer or server, users can access cloud resources to perform tasks: this is known as {{glossary("Cloud computing")}}.

Key features of the cloud include:

- Remote Access: Data and services are accessed remotely.
- Scalability: Resources can be scaled up or down based on demand.
- Availability: Services and data are typically accessible from anywhere with internet access.

## See also

- [What is the Cloud?](https://www.cloudflare.com/en-gb/learning/cloud/what-is-the-cloud/) on Cloudflare
Loading

0 comments on commit f4e3d89

Please sign in to comment.