Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace all non-breaking spaces with regular spaces #530

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/en/tutorials/basic-audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ If however you want to play a sound repeatedly without stopping every time the s

By default, the audio sample will be played once, and then stop. If you want the sound to loop continuously, e.g. for background music, then you can check the *Loop* box. Our engine is a looping sound in the example but the shooting sound is not.

## Creating Listeners
## Creating Listeners

To create an AudioListener, select the Entity you wish to represent the listener. Often, this will be the in-game camera as this is where the players 'head' is. In our case the AudioListener is attached to the robot.

Expand Down
8 changes: 4 additions & 4 deletions content/en/tutorials/basic-materials.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Materials are what define the appearance of the surfaces of a 3D Model. At its v

In this tutorial, we'll walk through how you create a Material, assign it to a primitive shape, and edit the Material's properties. First create a new and empty scene.

## Step 1 - Add a cube to your scene
## Step 1 - Add a cube to your scene

Select the root Entity of your Scene. At the start this will be called "Root". In the Attribute Editor rename the Entity to something meaningful, like "Material Tutorial".

Expand All @@ -25,11 +25,11 @@ Create new material directly from the PlayCanvas Editor interface. In the Asset

This creates a new Material Asset and brings up the Material Editor on the right-hand side of the screen. In the Material Editor rename the Material to "Box Material".

## Step 3 - Assign the material to the cube
## Step 3 - Assign the material to the cube

When you create a new cube in the Editor it will have no material assigned and will be rendered using a plain default material. To assign your new material to a model in the scene simply drag the model from the asset panel into the viewport and drop it on to the model you want to assign it to.

## Step 4 - Change the color of the material
## Step 4 - Change the color of the material

To change the color of the Material we will want to edit the *Diffuse* property of the material.

Expand All @@ -39,7 +39,7 @@ Select the material either by clicking on it in the asset panel. Or by selecting

You'll have to expand the Diffuse settings panel in the material editor in the right panel. Click on the color property to edit the diffuse color of the material.

## Bonus - Add textures to the material
## Bonus - Add textures to the material

Changing the color of the material is a good start, but you'll quickly want more detail than a flat color. That is where texture maps come in.

Expand Down
4 changes: 2 additions & 2 deletions content/en/tutorials/collision-and-triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The first Entity we need in this tutorial is the green block that forms the grou

You can see in the attribute panel, that it has *render*, *collision* and *rigidbody* components. We've increased the Entity and the *collision* box properties so that it is nice and large. And we've also slightly increased the friction and restitution properties. This means that the surface is slightly rougher and slightly bouncier than the defaults.

## Setting up the trigger
## Setting up the trigger

The next Entity we'll need is the trigger.

Expand Down Expand Up @@ -102,7 +102,7 @@ We've set the ground to **Static**, now we'll create the falling objects and mak

This is the *rigidbody* and *collision* setup for the box component, the sphere and capsule are setup in the same way.

## Contact Events
## Contact Events

There are three events available on the *collision* component:

Expand Down
4 changes: 2 additions & 2 deletions content/en/tutorials/custom-shaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void main(void)
}
```

### Fragment Shader
### Fragment Shader

```
varying vec2 vUv0;
Expand All @@ -62,7 +62,7 @@ void main(void)

The two shaders above define the functionality of the new Material. In the Vertex Shader we are transforming the vertex positions of the mesh into screen space. In the Fragment Shader we are setting the color of the pixel. This pixel color is chosen based on the two textures that are provided into this asset. If the value uTime is less than the color in the heightmap then we don't render any pixel (the model is invisible). If the value of uTime is greater than the heightmap value then we get the color from the diffuse map texture that we provide

### Shader Definition
### Shader Definition

```javascript
var vertexShader = this.vs.resource;
Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/entity-picking.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ PickerRaycast.prototype.onSelect = function (e) {
};
```

## Frame Buffer Picking
## Frame Buffer Picking

Frame buffer based picking uses the [pc.Picker][3] class to render the scene to a internal buffer. When the mouse is clicked the color of the buffer at the mouse location is used to determine which mesh instance was selected. This has some advantages and disadvantages over the collision based method.

Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/facebook-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The function `loginChangeFn` is a callback which is used to respond to changes i

Note, also we fire our own application events `app:fblogin` and `app:fblogout` to tell other parts of the application that the Facebook status has changed.

### Accessing the Facebook API
### Accessing the Facebook API

The file `face-photo.js` uses the Facebook API to retrieve a list of photos from the user and display them in the 3D world.

Expand Down
4 changes: 2 additions & 2 deletions content/en/tutorials/keepyup-part-five.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ thumb: https://s3-eu-west-1.amazonaws.com/images.playcanvas.com/projects/12/4060

## Audio & Particles

### Audio
### Audio

Audio is a critical part of your game. It will provide valuable feedback to the player that their inputs are having and effect, plus it can create mood and atmosphere.

The Keepy Up game has 3 audio effects: A background music track, a tap sound when you hit the ball and the sad trombone sting when you lose. Each of them is handled slightly differently.

#### Music & Sting
#### Music & Sting

The music and sting are handle in a similar way. The main difference is that the music is set to loop. The `game.js` we have a script attribute which links the game script to the Entity with our sound component and we simply play and stop the correct slot.

Expand Down
6 changes: 3 additions & 3 deletions content/en/tutorials/keepyup-part-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In our Keepy Up scene we have 7 top level Entities in the hierarchy.

A Camera is where your scene is viewed from while the application is running. In this game we only have one camera and it is stationary.

### Directional Light Entity
### Directional Light Entity

Lights illuminate 3D models in the scene. The more lights you have active at once, the longer it will take to render a scene and this can effect the frame rate of your game. You should aim to have only a few lights active at once. In this game we have a single stationary Directional Light.

Expand All @@ -46,11 +46,11 @@ The football is the main dynamic Entity in the scene. The Football Entity has 3

The sound component lets you play back sound files. Each Sound component has a number of slots, one for each sound file. You can choose playback settings like, whether the sound will loop, the volume or the pitch. The football has a single slot for the sound made when the ball bounces.

#### Model Component
#### Model Component

The model component is used to attach a 3D model asset to an Entity. When you have an enabled model component on an Entity the 3D model will be rendered at the Entity's position in the 3D space. In this case, we have attached the football model.

#### Script Component
#### Script Component

The script component lets you attach javascript files to an Entity. Each entity will create an instance of the script inside the javascript file so that you can customize the behavior of the Entity. We'll go into more detail about the script on the football in Part 3.

Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/keepyup-part-six.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The user interface of a game is the first thing you see and often it's the last

User Interfaces are built in PlayCanvas using the [Screen Component][7] and the [Element Component][8]. There is more details in the [user manual][6]

### User Interface Entities
### User Interface Entities

![Hierarchy][9]

Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/keepyup-part-three.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ For touch events we take the first touch and pass through the screen co-ordinate

On "mousedown" events we pass the screen co-ordinates through to the tap code. Note, that PlayCanvas ensures that touch and mouse events have the same coordinate system. This is not the case with normal browser events!

### Taps
### Taps

`_onTap()` takes a screen co-ordinate (x, y) works out if this has "hit" the ball and if so tells the ball code that it has been tapped.

Expand Down
4 changes: 2 additions & 2 deletions content/en/tutorials/keepyup-part-two.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Before we jump into the materials, we're going to set up our cubemap asset. A cu

To set up a cubemap, first create a Cubemap asset from the New Asset menu, assign 6 textures, one to each face of the cubemap. When your cubemap has all 6 faces assigned, press the "Prefilter" button. **Prefiltering in required for the cubemap to work correctly!**

## Football Material
## Football Material

![Football][3]

Expand All @@ -43,7 +43,7 @@ The diffuse map defines the color of the surface. In this case it is the black a

We're going to jump quickly to the Environment section as this is needed to see the effects of the Specular changes. To set up the Environment drag the Cubemap asset on the the cubemap slot in the material.

#### Specular
#### Specular

![Specular][5]

Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/keyboard-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ If you press and hold the spacebar you will see that the cube rotates continuous

`wasPressed(key)` checks to see if `key` was pressed *since the last frame*. `wasPressed()` will only return true once for a single key press.

## Events
## Events

The second method of handling key presses is to listen for events. Two keyboard events are supported on the Keyboard device:

Expand Down
4 changes: 2 additions & 2 deletions content/en/tutorials/light-cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ A cookie texture is just a regular texture asset which is applied to a spot ligh

![Light Settings][3]

## Cookie Cubemap
## Cookie Cubemap

For an omni light the cookie needs to be a cubemap so that it can be projected in 6 directions around the point of the light.

## Use Cases
## Use Cases

**Shaped Lights** - cookies are useful for masking the shape of a light source. For example, if you're scene contains a window or a fluorescent strip light using a spot light will create a light shape that is rounded. You can mask the shape of the light to be long and thin, or square in order to simulate the shape of the light.

Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/light-halos.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This simple effect is great for adding atmosphere to your scene. Add a glow to a

It works like this: We create an entity with a plane primitive attached which has a glowing halo material on it. We attach a script to entity which makes the plane always face the camera (billboarding). For added fun, we're fading the halo out if it faces away from the camera to simulate a directional light.

## Assets
## Assets

### Texture

Expand Down
2 changes: 1 addition & 1 deletion content/en/tutorials/manipulating-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Entities are a special form of graph node, they inherit a lot of their behavior

One of the most common operations you will need to perform on Entities is to change its transform matrix. The local transform property of the Entity determines the position, orientation and scale of the Entity and affects all child Entities as well. Learning how to manipulate the transform is critical to making interesting and interactive applications.

### Local and World Co-ordinates
### Local and World Co-ordinates

An important part of understanding how to move and manipulate Entities is understanding local and world co-ordinate systems. The world co-ordinate systems is shared by all Entities, it has a fixed origin `(0,0,0)` and a fixed orientation - where `(0,1,0)` is up. The local co-ordinate system relative to the Entity itself. So the local origin is the Entity position, and the orientation follows the orientation of the Entity.

Expand Down
4 changes: 2 additions & 2 deletions content/en/tutorials/music-visualizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This tutorial teaches you how to create a Music Visualizer application in WebGL

Our music visualizer consists of two scripts. The analyser, plays the audio and extracts the data via an Analyser Node. Which is part of the Web Audio API built into modern browsers. The visualizer, takes the data from the analyser and renders it onto screen as a funky graph.

## The Analyser
## The Analyser

```javascript
var Analyser = pc.createScript('analyser');
Expand Down Expand Up @@ -55,7 +55,7 @@ The final part of the setup is to use `setExternalNodes` from the PlayCanvas Sou

Then in our update loop we use the `AnalyserNode` methods `getFloatFrequencyData` and `getFloatTimeDomainData` to fill our arrays with data. We'll be using this data in our Visualizer script.

## The Visualizer
## The Visualizer

```javascript
var Visualizer = pc.createScript('visualizer');
Expand Down
4 changes: 2 additions & 2 deletions content/en/tutorials/using-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For more advanced products you may wish to access your assets in code, change re

In this tutorial, we'll build a small scene which lets you swap the model on a render component by pressing a key. We'll also dynamically load a third model that is not preloaded. You can see the completed [project here][3].

## Setup
## Setup

*The project is set up as follows*

Expand All @@ -26,7 +26,7 @@ In this tutorial, we'll build a small scene which lets you swap the model on a r

Download the [A model][5], [B model][6] and [C model][7] and upload them to your project. Ensure that the files are named A.dae, B.dae and C.dae as this will influence the asset names.

## The AssetRegistry
## The AssetRegistry

The [`pc.AssetRegistry`][1] is available in all scripts as `this.app.assets`. The registry is populated with the details of all the runtime assets added to your project whether they are loaded or not. Use the Asset Registry to find the assets you need in your application.

Expand Down
2 changes: 1 addition & 1 deletion content/en/user-manual/2D/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The PlayCanvas Engine is designed to make creating 3D games and applications fas

2D graphics are often known as **Sprites**. In PlayCanvas you can create [Sprite Assets][0] and [Sprite Components][1]. The Sprite Component is attached to Entities in order to display 2D graphics in your scene. Sprite Assets in PlayCanvas store multiple image frames from a Texture Atlas in sequence. So you can use a Sprite Asset to create flip-book style animated graphics in your games.

## Texture Atlases
## Texture Atlases

![Texture Atlas][6]

Expand Down
2 changes: 1 addition & 1 deletion content/en/user-manual/assets/cubemaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ An example of a texture set that would match is:

This technique allows to use Environment Map such as CubeMap in order to simulate physically based ambient light and reflection on materials. [Read more][6] on how it works and how to author CubeMaps for IBL.

## Assigning Cubemaps to Materials
## Assigning Cubemaps to Materials

The default Phong and Physical material types both have reflection properties. If you expand the Environment property section, you see the following:

Expand Down
10 changes: 5 additions & 5 deletions content/en/user-manual/assets/import-pipeline/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ So, if you leave this enabled, you are able to organize your source and target a

Newly created assets will automatically be set to [preload][2] or not depending on whether this option is enabled or not. The exception to this are JavaScript script files which will always be set to preloaded when created.

## Texture Import Settings
## Texture Import Settings

These options only affect the importing of images and textures.

### Texture POT (Power of Two)
### Texture POT (Power of Two)

When this option is enabled textures that are not a power of two will be converted to the nearest power of two resolution when they are imported.

Expand All @@ -53,15 +53,15 @@ When a model file is updated or reimported, the Editor will try to preserve the

When a model file is updated or reimported this option determines whether or not the target model file is overwritten. The default behavior is to overwrite with the new model.

### Overwrite Animations
### Overwrite Animations

When a model file is updated or reimported this option determines whether or not a animations created from the model are overwritten. The default behavior is to overwrite with the new animations.

### Overwrite Materials
### Overwrite Materials

When a model file is updated or reimported this option determines whether or not materials created from the model are overwritten. The default behavior is to leave existing materials.

### Overwrite Textures
### Overwrite Textures

When a model file is updated or reimported this option determines whether or not textures created from the model are overwritten. The default behavior is to overwrite with the new textures.

Expand Down
4 changes: 2 additions & 2 deletions content/en/user-manual/assets/materials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ Much of editing a material involves creating and assigning textures maps to the

There are a few options that are available on most texture map slots for a material.

### Texture Asset
### Texture Asset

First is the texture asset, upload an image to PlayCanvas and we'll create a texture asset for you. you can assign this to a slot on a material.

### Color or Tint Color

Some map slots can be a flat color instead of a texture map. Some slots also support a tint color if a texture is also assigned. If enabled the tint color is multiplied by the color in the texture map slot.

### Channel
### Channel

Some maps only require a single grayscale value e.g. 0.0 -> 1.0. In this case it is possible to select which channel of the texture to use. **RGB** means that all three channels are used. **R**, **G** or **B** means that only the red, green or blue channel will be used.

Expand Down
2 changes: 1 addition & 1 deletion content/en/user-manual/assets/models/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Blender supports exporting to GLB, FBX and COLLADA but the built-in exporters do

As of Blender 2.71, both diffuse and normal maps of your material will be exported to the FBX file. If other map types are lost on export you have to set-up these maps in the Material Editor within the Editor.

### **Embedding Textures**
### **Embedding Textures**

Embedded Textures make importing much easier.

Expand Down
2 changes: 1 addition & 1 deletion content/en/user-manual/assets/sprites.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you create a *Sliced* sprite, by default it will be created with a `pixelsPer
* Sliced - the sprite uses the border values to perform [9-sliced][2] rendering by stretching.
* Tiled - the sprite uses the border values to perform [9-sliced][2] rendering by tiling.

### Texture Atlas
### Texture Atlas

The Texture Atlas asset that the sprite references

Expand Down
2 changes: 1 addition & 1 deletion content/en/user-manual/designer/asset-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: usermanual-page.hbs
position: 6
---

## Store
## Store

You can get free 3D models for you project in the [PlayCanvas Store][1]

Expand Down
2 changes: 1 addition & 1 deletion content/en/user-manual/designer/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Certain text-based assets can be opened and edited in the PlayCanvas Script Edit

To inspect the details of any given asset, select its thumbnail in the Assets Panel. The asset's details will be displayed in the Inspector.

## Filtering
## Filtering

Filter which assets are visible using the filter drop down to select the type of asset to view.

Expand Down
4 changes: 2 additions & 2 deletions content/en/user-manual/designer/hierarchy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The Hierarchy panel is great for quickly finding Entities as all the Entities in

Once an Entity is selected in the Hierarchy, you can create a new child Entity or delete the Selection. You can do this, either using the buttons in the top right of the Hierarchy panel, or by opening the context menu via a right click operation.

## Organizing the Hierarchy
## Organizing the Hierarchy

The order in which Entities are listed in the tree view is important. As the Scene is a hierarchy, Entities can be *children* of another Entity -- their *parent* -- and the transform matrix of a parent Entity is applied to all of its children. If you move or rotate a parent Entity, all children will move or rotate underneath the parent. This is very useful for simplifying the manipulation of many Entities.

The structure of the Hierarchy can be edited via drag and drop. Simply select and drag any Entity in the Hierarchy. In this way, you can quickly reorder or reparent Entities. When you reparent an Entity in the Editor its transform will be preserved so you won't see the Entity move or rotate after you change its parent. If you do not want that behavior hold Ctrl (or Cmd on Mac).

## Searching the Hierarchy
## Searching the Hierarchy

Near the top of the Hierarchy panel is a Search box which you can use to dynamically filter the content of the Entity tree. The search is fuzzy which means it matches names that are similar to the search string rather than exactly the same. This is useful if you can't quite remember the name of the Entity you are searching for.

Expand Down
Loading