Skip to content

Commit

Permalink
Split Settings into Editor and Scene (#596)
Browse files Browse the repository at this point in the history
* Split Settings into Editor and Scene

* Move some images

* Move one more image

* Fix anchors and links

* Add explicit anchors

* Update ja translations

* Update ja translations

* Remove ja copy of deleted page

* Update ja translations

* Update ja translations

* Update ja translations
  • Loading branch information
willeastcott authored Feb 12, 2024
1 parent 986df8d commit 1a490c0
Show file tree
Hide file tree
Showing 36 changed files with 661 additions and 679 deletions.
21 changes: 14 additions & 7 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -1653,13 +1653,6 @@ type = GITHUBMARKDOWN
minimum_perc = 0
resource_name = content/en/user-manual/editor/launch-page/loading-screen.md

[o:playcanvas:p:playcanvas-developer-site:r:user-manual-editor-scenes]
file_filter = i18n/<lang>/docusaurus-plugin-content-docs/current/user-manual/editor/scenes.md
source_file = docs/user-manual/editor/scenes.md
type = GITHUBMARKDOWN
minimum_perc = 0
resource_name = content/en/user-manual/editor/scenes.md

[o:playcanvas:p:playcanvas-developer-site:r:user-manual-editor-settings]
file_filter = i18n/<lang>/docusaurus-plugin-content-docs/current/user-manual/editor/settings.md
source_file = docs/user-manual/editor/settings.md
Expand Down Expand Up @@ -2374,6 +2367,20 @@ type = GITHUBMARKDOWN
minimum_perc = 0
resource_name = content/en/user-manual/scenes/loading-scenes.md

[o:playcanvas:p:playcanvas-developer-site:r:user-manual-scenes-managing-scenes]
file_filter = i18n/<lang>/docusaurus-plugin-content-docs/current/user-manual/scenes/managing-scenes.md
source_file = docs/user-manual/scenes/managing-scenes.md
type = GITHUBMARKDOWN
minimum_perc = 0
resource_name = content/en/user-manual/scenes/managing-scenes.md

[o:playcanvas:p:playcanvas-developer-site:r:user-manual-scenes-settings]
file_filter = i18n/<lang>/docusaurus-plugin-content-docs/current/user-manual/scenes/settings.md
source_file = docs/user-manual/scenes/settings.md
type = GITHUBMARKDOWN
minimum_perc = 0
resource_name = content/en/user-manual/scenes/settings.md

[o:playcanvas:p:playcanvas-developer-site:r:user-manual-scripting-anatomy]
file_filter = i18n/<lang>/docusaurus-plugin-content-docs/current/user-manual/scripting/anatomy.md
source_file = docs/user-manual/scripting/anatomy.md
Expand Down
2 changes: 1 addition & 1 deletion docs/user-manual/assets/types/texture-atlas.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ In addition to frame data the Texture Atlas contains the properties as a [textur

[1]: /images/user-manual/assets/texture-atlas/texture-atlas.jpg
[2]: /user-manual/assets/types/texture
[3]: /user-manual/editor/settings#create-atlases
[3]: /user-manual/scenes/settings#create-atlases
[4]: /user-manual/assets/types/sprite
2 changes: 1 addition & 1 deletion docs/user-manual/editor/assets.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Assets
title: Assets Panel
sidebar_position: 5
---

Expand Down
2 changes: 1 addition & 1 deletion docs/user-manual/editor/editor-api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Editor API
sidebar_position: 10
sidebar_position: 11
---

:::warning
Expand Down
2 changes: 1 addition & 1 deletion docs/user-manual/editor/keyboard-shortcuts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Controls and Keyboard Shortcuts
sidebar_position: 11
sidebar_position: 10
---

## Camera Controls
Expand Down
305 changes: 26 additions & 279 deletions docs/user-manual/editor/settings.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/user-manual/editor/viewport.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 4

The viewport shows your scene as currently rendered. You can freely move around the scene by manipulating the Editor's current camera.

## Cameras
## Cameras {#cameras}

Initially the Editor is set to use the **Perspective** camera. This camera is as if a movie camera was floating in your scene. You can use the camera dropdown menu to view the scene using various other cameras.

Expand All @@ -17,13 +17,13 @@ The **orthographic** cameras: Top, Bottom, Front, Back, Left, Right, let you vie

You can also use the camera menu to select any of the camera Entities in your scene. This way you can position your in-game camera exactly as required.

## Gizmos
## Gizmos {#gizmos}

![Gizmos][3]

The 3-Colored Axis you can see in the screenshot above is called a [Gizmo][4]. This is used to manipulate the transform matrix of the selected Entity. There are three types of Gizmo: Translate (with arrows on the ends of the axes); Rotate (which is made up of three colored rings) and Scale (with cubes on the ends of the axes).

## Render Mode
## Render Mode {#render-mode}

You can modify the viewport render mode using this drop-down menu in the top-right of the viewport:

Expand Down
4 changes: 2 additions & 2 deletions docs/user-manual/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ You can also right click on an Entity and select New Entity/Box to add a box (si

To create a skybox for your scene you first need to create a [Cubemap asset](/user-manual/assets/types/cubemap/). Then you can drag and drop the Cubemap inside the 3D viewport, or you can go to the Scene Settings and drag the Cubemap in the Skybox field.

[Learn more](/user-manual/editor/settings/#skybox)
[Learn more](/user-manual/scenes/settings#skybox)



Expand Down Expand Up @@ -186,7 +186,7 @@ To upload Assets simply drag and drop files from your computer into the Assets p

To give physical properties to an Entity you need to add a [Collision component](/user-manual/scenes/components/collision/) to it and a [RigidBody component](/user-manual/scenes/components/rigidbody/). The Collision component gives a physical shape to the Entity and the RigidBody component makes the Entity be simulated by the physics engine.

You can change the default [gravity](/user-manual/editor/settings/#gravity) in the Scene Settings.
You can change the default [gravity](/user-manual/scenes/settings#gravity) in the Scene Settings.

[View tutorial](/tutorials/collision-and-triggers/)

Expand Down
2 changes: 1 addition & 1 deletion docs/user-manual/graphics/advanced-rendering/batching.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ In this animation we have created 4 batch groups for the buildings, the cacti, t
[3]: /images/user-manual/optimization/batching/western-scene.jpg
[4]: /images/user-manual/optimization/batching/western-animation-all.gif
[5]: /images/user-manual/optimization/batching/western-animation.gif
[6]: /user-manual/editor/settings/#batch-groups
[6]: /user-manual/scenes/settings#batch-groups
[7]: /user-manual/scenes/components/model
[8]: https://api.playcanvas.com/classes/Engine.BatchManager.html
[9]: /user-manual/scenes/components/sprite
Expand Down
6 changes: 3 additions & 3 deletions docs/user-manual/graphics/lighting/runtime-lightmaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ The **Padding** option determines the space between sections when unwrapping occ
[11]: /user-manual/graphics/advanced-rendering/batching
[12]: /images/user-manual/graphics/lighting/lightmapping/editor-directional-light.png
[13]: /images/user-manual/graphics/lighting/lightmapping/shadows-hard-soft.png
[14]: /user-manual/editor/settings/#ambient-color
[15]: /user-manual/editor/settings/#skybox
[16]: /user-manual/editor/settings/#lightmapping
[14]: /user-manual/scenes/settings#ambient-color
[15]: /user-manual/scenes/settings#skybox
[16]: /user-manual/scenes/settings#lightmapping
[17]: /images/user-manual/graphics/lighting/lightmapping/lightmapping-settings-ambient-bake.png
[18]: /images/user-manual/graphics/lighting/lightmapping/ambient-color.png
[19]: /images/user-manual/graphics/lighting/lightmapping/lightmap-15-samples.png
Expand Down
4 changes: 2 additions & 2 deletions docs/user-manual/publishing/web/playcanvas-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Publishing to PlayCanvas consists of two simple steps:

To publish you will need to have at least one scene in your project.

## Publishing a new Build
## Publishing a new Build {#publishing-a-new-build}

* Go to your Project and open the Editor.
* Click on the <span class="pc-icon">&#57911;</span> button in the left hand side toolbar or click Publishing in the top left Menu
Expand Down Expand Up @@ -48,7 +48,7 @@ To publish you will need to have at least one scene in your project.

Builds are given permanent link in the form `https://playcanv.as/b/BUILD_ID/`. This link will be valid until you delete the build. If you want to share a link to your game, you should probably use the published project link explained below.

## Selecting a Primary Build
## Selecting a Primary Build {#selecting-a-primary-build}

Click Builds on the same popup.

Expand Down
2 changes: 1 addition & 1 deletion docs/user-manual/scenes/components/collision.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If the entity also has a rigidbody component, the collision component determines
| Axis | Capsule only. Aligns the capsule with the local-space X, Y or Z axis of the entity. |
| Height | Capsule only. The tip-to-tip height of the capsule. |
| Radius | Sphere and Capsule only. The radius of the sphere or capsule body. |
| Asset | Mesh only. The model asset that will be used as a source for the triangle-based collision mesh. |
| Asset | Mesh only. The [render asset](../../assets/types/render.md) or model asset that will be used as a source for the triangle-based collision mesh. |

## Scripting Interface

Expand Down
36 changes: 11 additions & 25 deletions docs/user-manual/scenes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,27 @@ Scenes contain:

They are edited using the PlayCanvas Editor.

![][scene-list-png]
![](/images/user-manual/scenes/scene-list.png)

## Scene Hierarchy

The **Scene Hierarchy** is a graph of [Entities][entities] that can have [Components][components] to give these Entities behaviors such as having a mesh to render in the world or to play sound effects. They can also be given custom behavior with [scripts][scripts].
The **Scene Hierarchy** is a graph of [Entities](entities) that can have [Components](components) to give these Entities behaviors such as having a mesh to render in the world or to play sound effects. They can also be given custom behavior with [scripts](../scripting).

<img loading="lazy" src="/images/user-manual/scenes/scene-hierarchy.png" width="400" />

## Scene Settings

**Scene Settings** contain global rendering and physics information and properties about the scene. These can be edited in the project [settings][project-settings] within the Editor.
**Scene Settings** contain global rendering and physics information and properties about the scene. These can be edited in the project [settings](settings) within the Editor.

The full list of Scene Settings are:

* [Physics gravity][settings-gravity] (1)
* [Global ambient color][settings-ambient] (2)
* [Skybox][settings-skybox] (3)
* [Tonemapping][settings-tonemapping] (4)
* [Exposure][settings-exposure] (5)
* [Gamma Correction][settings-gamma] (6)
* [Fog][settings-fog] (7)
* [Lightmap properties][settings-lightmap] (8)
* [Physics gravity](settings#gravity) (1)
* [Global ambient color](settings#ambient-color) (2)
* [Skybox](settings#skybox) (3)
* [Tonemapping](settings#tonemapping) (4)
* [Exposure](settings#exposure) (5)
* [Gamma Correction](settings#gamma-correction) (6)
* [Fog](settings#fog) (7)
* [Lightmap properties](settings#lightmapping) (8)

<img loading="lazy" src="/images/user-manual/scenes/scene-settings.png" width="500" />

[entities]: /user-manual/scenes/entities/
[components]: /user-manual/scenes/components/
[scripts]: /user-manual/scripting/
[scene-list-png]: /images/user-manual/scenes/scene-list.png
[project-settings]: /user-manual/editor/settings/
[settings-gravity]: /user-manual/editor/settings/#gravity
[settings-ambient]: /user-manual/editor/settings/#ambient-color
[settings-skybox]: /user-manual/editor/settings/#skybox
[settings-tonemapping]: /user-manual/editor/settings/#tonemapping
[settings-exposure]: /user-manual/editor/settings/#exposure
[settings-gamma]: /user-manual/editor/settings/#gamma-correction
[settings-fog]: /user-manual/editor/settings/#fog
[settings-lightmap]: /user-manual/editor/settings/#lightmapping
24 changes: 11 additions & 13 deletions docs/user-manual/scenes/loading-scenes.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Loading Scenes
sidebar_position: 3
sidebar_position: 4
---

## Introduction

This page will take you through loading scenes with code and also some different approaches of using scenes in projects.

There are two main approaches in using scenes: changing scenes completely and additively loading scenes.
Expand All @@ -21,7 +19,7 @@ This is the most common approach that developers take where each scene is a self

This is done by simply calling [`SceneRegistry.changeScene`][changescene-api] with the name of the scene.

```
```javascript
this.app.scenes.changeScene('Some Scene Name');
```

Expand All @@ -34,7 +32,7 @@ If the scene data is not already loaded, this function will:

If you want to know when the scene is loaded or if there are errors, you will need to provide a callback:

```
```javascript
this.app.scenes.changeScene('Some Scene Name', (err, loadedSceneRootEntity) {
if (err) {
console.error(err);
Expand Down Expand Up @@ -87,9 +85,9 @@ There are two APIs to load the scene hierarchy and settings:

Here is a code example to load the scene hierarchy or settings:

```
```javascript
// Find the Scene Registry Item by the name of the scene
var sceneItem = this.app.scenes.find('Some Scene Name');
const sceneItem = this.app.scenes.find('Some Scene Name');

// Load the scene hierarchy with a callback when it has finished
this.app.scenes.loadSceneHierarchy(sceneItem, function (err, loadedSceneRootEntity) {
Expand Down Expand Up @@ -134,12 +132,12 @@ There are several ways to approach this with pros and cons:

This approach has discrete steps that make it easier to manage where the currently loaded scene is destroyed before loading and creation of the new scene.

```
```javascript
// Find the Scene Registry Item by the name of the scene
var sceneItem = this.app.scenes.find('Some Scene Name');
const sceneItem = this.app.scenes.find('Some Scene Name');

// Destroy all children under application root to remove the currently loaded scene hierarchy
var rootChildren = this.app.root.children;
const rootChildren = this.app.root.children;
while(rootChildren.length > 0) {
rootChildren[0].destroy();
}
Expand All @@ -160,12 +158,12 @@ However, as mentioned above, there is a delay between calling `loadSceneHierarch

This would mean that the old scene hierarchy will be destroyed in the callback after the new scene hierarchy has been added to hierarchy which ensures that the old scene would be present while the scene data is loaded from network.

```
```javascript
// Find the Scene Registry Item by the name of the scene
var sceneItem = this.app.scenes.find('Some Scene Name');
const sceneItem = this.app.scenes.find('Some Scene Name');

// Assume the old scene hierarchy's root entity is named 'Root' which is the default name
var oldSceneRootEntity = this.app.root.findByName('Root');
const oldSceneRootEntity = this.app.root.findByName('Root');

// Load the scene hierarchy with a callback when it has finished
this.app.scenes.loadSceneHierarchy(sceneItem, function (err, loadedSceneRootEntity) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Scenes
sidebar_position: 9
title: Managing Scenes
sidebar_position: 3
---

## Scenes

You can manage your scenes by opening the Scenes dialog.

You can open the Scenes dialog either by clicking on the 'Scenes' menu option in the menu:
Expand All @@ -21,6 +19,6 @@ This will open up the Scenes dialog:

You can create a new scene by clicking on "ADD NEW SCENE", you can click on a scene to open it up and you can click on the buttons on the right of each scene to duplicate a scene or delete it. You can also click on the banner icon on the left to make it the first scene loaded when you publish an app or when you export your project. Think of it as the first 'level' in your application.

[1]: /images/user-manual/editor/scenes-menu.jpg
[2]: /images/user-manual/editor/scenes-viewport.jpg
[3]: /images/user-manual/editor/scenes.jpg
[1]: /images/user-manual/scenes/managing-scenes/scenes-menu.jpg
[2]: /images/user-manual/scenes/managing-scenes/scenes-viewport.jpg
[3]: /images/user-manual/scenes/managing-scenes/scenes.jpg
Loading

0 comments on commit 1a490c0

Please sign in to comment.