From 007f9097732f9b335aa3fb693f4fce0ca5dc223e Mon Sep 17 00:00:00 2001 From: MAKSS Date: Sat, 24 Oct 2020 04:58:40 +0330 Subject: [PATCH] .md files got modified Fixing grammar and snippet languages in the `docs/*.md` files. --- docs/explore-code.md | 3 ++- docs/input-handling.md | 4 ++-- docs/photos-and-videos.md | 6 +++--- docs/runtime.md | 3 +-- docs/surfaces.md | 16 ++++++++-------- docs/what-is.md | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/explore-code.md b/docs/explore-code.md index 2cab116b3..bfcfb61e6 100644 --- a/docs/explore-code.md +++ b/docs/explore-code.md @@ -31,7 +31,8 @@ This is the bridge code to start react-360 executor. It runs a bridge in web wor **Important** `NonBlobBridge.js` doesn't exist in `react-360`(< 1.1.1), we were using an inline blob URL as the bridge code. But this may cause a security issue in the Chrome Browser that makes your app not work when hosted in a high secured CDN server. If you are using `react-360-cli`(>= 1.1.1), it will automatically use `NonBlobBridge.js` in the new project. If you have project created via `react-360-cli`(< 1.1.1), upgrading your `react-360` and `react-360-web` version won't break your app, and you can run the following code to migrate to use `NonBlobBridge.js`: -``` + +```bash node node_modules/react-360/scripts/install-bridge.js ``` diff --git a/docs/input-handling.md b/docs/input-handling.md index 508b4cb39..63f16b141 100644 --- a/docs/input-handling.md +++ b/docs/input-handling.md @@ -10,7 +10,7 @@ Your users consume your experience through a variety of devices, each with its o The most common way for your user to interact with your app is through pressing a physical button: a keyboard key, a mouse click, a gamepad button, or something similar. React 360 is designed to collect input from a wide range of devices and send it to your React code in an easy-to-use format. When you create a new React 360 app, it is already configured to collect input from a mouse, a touchscreen, a keyboard, or a gamepad. To start handling events in React, add an onInput callback to one of your components. When the cursor is over your component and the user triggers an input event, it will be sent to that callback. -``` +```js { const event = e.nativeEvent; // Extract the value from the runtime // event contains the actual event payload, as well as information on @@ -30,7 +30,7 @@ Out of the box, React 360 supports collecting inputs from four common interfaces If you wanted to capture every time a confirm button was pressed down, it would be implemented as follows: -``` +```js onInput={e => { const inputEvent = e.nativeEvent.inputEvent; if (inputEvent.action === 'down' && inputEvent.buttonClass === 'confirm') { diff --git a/docs/photos-and-videos.md b/docs/photos-and-videos.md index 2c779cf3c..a34607157 100644 --- a/docs/photos-and-videos.md +++ b/docs/photos-and-videos.md @@ -63,7 +63,7 @@ For 360 image, React 360 currently support two different type of 360 photo layou - **Equirectangular**: Equirectangular photo uses equirectangular projection - **1x6 Cubic Format**: The 1x6 Cubic format is organized with 6 undistorted, perspective images on each direction in the order of `right, left, top, bottom, back, front` from top to bottom. - Equirectangular projection is more popular and is supported by most 360 camera. Cubic format provides better render quality as it suffers less distortion, but usually need to convert from an equirectangular projection source image. + Equirectangular projection is more popular and is supported by most 360 camera. The Cubic format provides better render quality as it suffers less distortion, but usually need to convert from an equirectangular projection source image. ### From React @@ -81,7 +81,7 @@ Environment.setBackground( ## Displaying Videos -Video are handled in two parts: first, the creation of a Video Player, and then mapping that player to your Environment. The separation of video playback from the environment itself allows you to control the progression of video from different locations in your codebase. +Video is handled in two parts: first, the creation of a Video Player, and then mapping that player to your Environment. The separation of video playback from the environment itself allows you to control the progression of video from different locations in your codebase. Environment support two ways of rendering video: - 360 background video @@ -91,7 +91,7 @@ Environment support two ways of rendering video: The video layout is similar as photo layout format. For 360 video, React 360 currently support **Equirectangular** and **3x2 Cubic Format with 1% expansion**. - - **3x2 Cubic Format with 1% expansion**: Video image is divided to 3x2 image on the direction in the order of `right, left, top, bottom, front, back` from top-left to bottom-right. This format also has extra 1% expansion on the perspective projection of each image to reduce the texture rendering issue on the edge of each faces. You can try [Transform360](https://github.com/facebook/transform360) to create 3x2 cubic format 360 video. To use 3x2 cubic format video in React 360, you need to specify video layout format `layout: 'CUBEMAP_32',` in the VideoOption. + - **3x2 Cubic Format with 1% expansion**: The video image is divided into 3x2 image on the direction in the order of `right, left, top, bottom, front, back` from top-left to bottom-right. This format also has an extra 1% expansion on the perspective projection of each image to reduce the texture rendering issue on the edge of each faces. You can try [Transform360](https://github.com/facebook/transform360) to create 3x2 cubic format 360 video. To use 3x2 cubic format video in React 360, you need to specify video layout format `layout: 'CUBEMAP_32',` in the VideoOption. ### From the Runtime (client.js) diff --git a/docs/runtime.md b/docs/runtime.md index 912e324b7..960bc4397 100644 --- a/docs/runtime.md +++ b/docs/runtime.md @@ -24,13 +24,12 @@ Web Workers are a modern browser feature that allows code to run outside of the There may be times when your environment does not support Web Workers. While this is unlikely, we provide a workaround that simulates a separate execution environment via an `