Explorar o código

Test math expressions

Björn Ritzl hai 6 meses
pai
achega
c203db7500

+ 70 - 2
.wordlist.txt

@@ -23,19 +23,26 @@ WAV
 NVDA
 PNG
 TCP
+SSL
 RPG
 UHD
 NPC
 ASTC
+LZ4
 OpenType
 TrueType
+BMFont
 PSNR
 RMS
 WEBP
 GPU
 GPUs
+UDID
+UI
 GUI
 GUIs
+ABI
+STL
 BasisU
 Cubemaps
 Adreno
@@ -63,13 +70,15 @@ github
 https
 Lua
 moltenvk
+GL
 GLSL
 OpenGL
 OpenGLES
 vulkan
 WebGL
 WebGPU
-macos
+macOS
+OSX
 sidenote
 config
 awterror
@@ -196,4 +205,63 @@ codebase
 WebView
 WebViews
 cryptographic
-
+desaturates
+programmatically
+intialize
+performant
+FX
+transcluded
+transclusion
+whitespace
+scriptable
+SL
+transcode
+transcoded
+transcoder
+transpiler
+transpilers
+toolset
+templating
+getter
+timestep
+dropdown
+backend
+liveupdate
+glyphs
+templated
+ProFi
+localhost
+Remotery
+Celtoys
+linkers
+yml
+yaml
+Winsdk
+preconfigured
+TinyHTTP
+PSD
+Protools
+undoable
+VM
+LSP
+tooltip
+submenu
+rebundle
+booleans
+userdata
+checksums
+CLI
+Grafana
+VictoriaMetrics
+KiB
+WebAssembly
+CocoaPods
+Voxelization
+voxel
+procedurally
+deformable
+autoplay
+keystore
+vsync
+EFIGS
+EDN

+ 6 - 6
docs/en/manuals/app-manifest.md

@@ -81,32 +81,32 @@ Select which graphics backend to use.
 
 
 ## Minimum Safari version (js-web and wasm-web only)
-YAML field name: **minSafariVersion**
+YAML field name: **`minSafariVersion`**
 Default value: **90000**
 
 Minimum supported version of Safari. Cannot be less than 90000. For more information look Emscripten compiler options [link](https://emscripten.org/docs/tools_reference/settings_reference.html?highlight=environment#min-safari-version).
 
 ## Minimum Firefox version (js-web and wasm-web only)
-YAML field name: **minFirefoxVersion**
+YAML field name: **`minFirefoxVersion`**
 Default value: **34**
 
 Minimum supported version of Firefox. Cannot be less than 34. For more information look Emscripten compiler options [link](https://emscripten.org/docs/tools_reference/settings_reference.html?highlight=environment#min-firefox-version).
 
 ## Minimum Chrome version (js-web and wasm-web only)
-YAML field name: **minChromeVersion**
+YAML field name: **`minChromeVersion`**
 Default value: **32**
 
 Minimum supported version of Chrome. Cannot be less than 32. For more information look Emscripten compiler options [link](https://emscripten.org/docs/tools_reference/settings_reference.html?highlight=environment#min-chrome-version).
 
 ## Initial memory (js-web and wasm-web only)
-YAML field name: **initialMemory**
+YAML field name: **`initialMemory`**
 Default value: **33554432**
 
 The size of memory that allocated for web application. In case if ALLOW_MEMORY_GROWTH=0 (js-web) - there is a total amount of memory that web application can use. for more information look [link](https://emscripten.org/docs/tools_reference/settings_reference.html?highlight=environment#initial-memory). Value in bytes. Note that value must be a multiple of WebAssembly page size (64KiB).
-That options relates to `html5.heap_size` in game.project [link](https://defold.com/manuals/html5/#heap-size). Option that configured via application manifest is set during compilation and used as default value for INITIAL_MEMORY option. Value from game.project overrides value from application manifest and used in runtime.
+That options relates to `html5.heap_size` in game.project [link](https://defold.com/manuals/html5/#heap-size). Option that configured via application manifest is set during compilation and used as default value for `INITIAL_MEMORY` option. Value from game.project overrides value from application manifest and used in runtime.
 
 ## Stack size (js-web and wasm-web only)
-YAML field name: **stackSize**
+YAML field name: **`stackSize`**
 Default value: **5242880**
 
 The stack size of application. For more information look [link](https://emscripten.org/docs/tools_reference/settings_reference.html?highlight=environment#stack-size). Value in bytes.

+ 10 - 10
docs/en/manuals/editor-scripts.md

@@ -52,11 +52,11 @@ You can interact with the editor using `editor` package that defines this API:
   - `"path"` — file path from the project folder for *resources* — entities that exist as files. Example of returned value: `"/main/game.script"`
   - `"text"` — text content of a resource editable as text (such as script files or json). Example of returned value: `"function init(self)\nend"`. Please note that this is not the same as reading file with `io.open()`, because you can edit a file without saving it, and these edits are available only when accessing `"text"` property.
   - some properties that are shown in the Properties view when you have selected something in the Outline view. These types of outline properties supported:
-    - strings
-    - booleans
-    - numbers
-    - vec2/vec3/vec4
-    - resources
+    - `strings`
+    - `booleans`
+    - `numbers`
+    - `vec2`/`vec3`/`vec4`
+    - `resources`
 
     Please note that some of these properties might be read-only, and some might be unavailable in different contexts, so you should use `editor.can_get` before reading them and `editor.can_set` before making editor set them. Hover over property name in Properties view to see a tooltip with information about how this property is named in editor scripts. You can set resource properties to `nil` by supplying `""` value.
 - `editor.can_get(node_id, property)` — check if you can get this property so `editor.get()` won't throw an error.
@@ -67,7 +67,7 @@ You can interact with the editor using `editor` package that defines this API:
 - `editor.save()` — persist all unsaved changed to disk.
 - `editor.transact(txs)` — modify the editor in-memory state using 1 or more transaction steps created with `editor.tx.*` functions.
 - `editor.ui.*` — various UI-related functions, see [UI manual](/manuals/editor-scripts-ui).
-- `editor.prefs.*` — functions for interacting with editor preferences, see [prefs](#prefs).
+- `editor.prefs.*` — functions for interacting with editor preferences, see [preferences](#preferences).
 
 You can find the full editor API reference [here](https://defold.com/ref/alpha/editor/).
 
@@ -126,7 +126,7 @@ Editor expects `get_commands()` to return an array of tables, each describing a
       - `"outline"` — something that can be shown in the Outline. In Outline it's a selected item, in menu bar it's a currently open file;
     - `cardinality` defines how many selected items there should be. If `"one"`, selection passed to command callback will be a single node id. If `"many"`, selection passed to command callback will be an array of one or more node ids.
   - `argument` — command argument. Currently, only commands in `"Bundle"` location receive an argument, which is `true` when the bundle command is selected explicitly and `false` on rebundle.
-- `id` - command identifier string, used e.g. for persisting the last used bundle command in prefs
+- `id` - command identifier string, used e.g. for persisting the last used bundle command in `prefs`
 - `active` - a callback that is executed to check that command is active, expected to return boolean. If `locations` include `"Assets"` or `"Outline"`, `active` will be called when showing context menu. If locations include `"Edit"` or `"View"`, active will be called on every user interaction, such as typing on keyboard or clicking with mouse, so be sure that `active` is relatively fast.
 - `run` - a callback that is executed when user selects the menu item.
 
@@ -251,11 +251,11 @@ You can publish libraries for other people to use that contain commands, and the
 
 Also note that although dependencies are shown in Assets view, they do not exist as files (they are entries in a zip archive). It's possible to make the editor extract some files from the dependencies into `build/plugins/` folder. To do it, you need to create `ext.manifest` file in your library folder, and then create `plugins/bin/${platform}` folder in the same folder where the `ext.manifest` file is located. Files in that folder will be automatically extracted to `/build/plugins/${extension-path}/plugins/bin/${platform}` folder, so your editor scripts can reference them.
 
-## Prefs
+## Preferences
 
 Editor scripts can define and use preferences — persistent, uncommitted pieces of data stored on the user's computer. These preferences have three key characteristics:
 - typed: every preference has a schema definition that includes the data type and other metadata like default value
-- scoped: prefs are scoped either per project or per user
+- scoped: preferences are scoped either per project or per user
 - nested: every preference key is a dot-separated string, where the first path segment identifies an editor script, and the rest 
 
 All preferences must be registered by defining their schema:
@@ -268,7 +268,7 @@ function M.get_prefs_schema()
   }
 end
 ```
-After such editor script is reloaded, the editor registers this schema. Then the editor script can get and set the prefs, e.g.:
+After such editor script is reloaded, the editor registers this schema. Then the editor script can get and set the preferences, e.g.:
 ```lua
 -- Get a specific preference
 editor.prefs.get("my_json_formatter.indent.type")

+ 9 - 9
docs/en/manuals/extender-docker-images.md

@@ -6,15 +6,15 @@ brief: Document described available Docker images and Defold versions that used
 # Available Docker images
 Below is the list of all avaialble Docker images in public Registry. The images can be used to run Extender in environment with old SDKs that are no longer supported.
 
-|SDK               |Image tag                                                                                              |Platform name (in Extender's config) |Defold version that used image |
-|------------------|-------------------------------------------------------------------------------------------------------|-------------------------------------|-------------------------------|
-|Linux latest      |europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-linux-env:latest         |linux-latest                         |All Defold versions            |
-|Android NDK25     |europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-ndk25-env:latest |android-ndk25                        |Since 1.4.3                    |
-|Emscripten 2.0.11 |europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-2011-env:latest    |emsdk-2011                           |Until 1.7.0                    |
-|Emscripten 3.1.55 |europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3155-env:latest    |emsdk-3155                           |[1.8.0-1.9.3]                  |
-|Emscripten 3.1.65 |europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3165-env:latest    |emsdk-3165                           |Since 1.9.4                    |
-|Winsdk 2019       |europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2019-env:latest   |winsdk-2019                          |Until 1.6.1                    |
-|Winsdk 2022       |europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2022-env:latest   |winsdk-2022                          |Since 1.6.2                    |
+|SDK               |Image tag                                                                                                |Platform name (in Extender's config) |Defold version that used image |
+|------------------|---------------------------------------------------------------------------------------------------------|-------------------------------------|-------------------------------|
+|Linux latest      |`europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-linux-env:latest`         |`linux-latest`                       |All Defold versions            |
+|Android NDK25     |`europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-ndk25-env:latest` |`android-ndk25`                      |Since 1.4.3                    |
+|Emscripten 2.0.11 |`europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-2011-env:latest`    |`emsdk-2011`                         |Until 1.7.0                    |
+|Emscripten 3.1.55 |`europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3155-env:latest`    |`emsdk-3155`                         |[1.8.0-1.9.3]                  |
+|Emscripten 3.1.65 |`europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3165-env:latest`    |`emsdk-3165`                         |Since 1.9.4                    |
+|Winsdk 2019       |`europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2019-env:latest`   |`winsdk-2019`                        |Until 1.6.1                    |
+|Winsdk 2022       |`europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2022-env:latest`   |`winsdk-2022`                        |Since 1.6.2                    |
 
 # How to use old Docker images
 To use old environment you should go through following steps:

+ 2 - 2
docs/en/manuals/extensions-ext-manifests.md

@@ -61,14 +61,14 @@ platforms:
 
 Allowed keys are for platform specific compile flags are:
 
-* `frameworks` - Apple frameworks to include when building (iOS and OSX)
+* `frameworks` - Apple frameworks to include when building (iOS and macOS)
 * `flags` - Flags that should be passed to the compiler
 * `linkFlags` - Flags that should be passed to the linker
 * `libs` - Additional libraries to include when linking
 * `defines` - Defines to set when building
 * `aaptExtraPackages` - Extra package name that should be generated (Android)
 * `aaptExcludePackages` - Regexp (or exact names) of packages to exclude (Android)
-* `aaptExcludeResourceDirs` - Regexp (or exact names) of resource dirs to exclude (Android)
+* `aaptExcludeResourceDirs` - Regexp (or exact names) of resource directories to exclude (Android)
 * `excludeLibs`, `excludeJars`, `excludeSymbols` - These flags are used to remove things previously defined in the platform context.
 
 For all the keywords, we apply white listing filter. This is to avoid illegal path handling and accessing files outside of the build upload folder.

+ 1 - 1
docs/en/manuals/glossary.md

@@ -57,7 +57,7 @@ At some point your game will behave in an unexpected way and you need to figure
 
 ## Factory
 
-![Factory](images/icons/factory.png){.left} In some situations you cannot manually place all needed game objects in a collection, you have to create the game objects dynamically, on the fly. For instance, a player might fire bullets and each shot should be dynamically spawned and sent off whenever the player presses the trigger. To create game objects dynamically (from a pre-allocated pool of objects), you use a factory component. See the [Factory manual](/manuals/factory) for details.
+![Factory](images/icons/factory.png){.left} In some situations you cannot manually place all needed game objects in a collection, you have to create the game objects dynamically, on the fly. For instance, a player might fire bullets and each shot should be dynamically spawned and sent off whenever the player presses the trigger. To create game objects dynamically (from a preallocated pool of objects), you use a factory component. See the [Factory manual](/manuals/factory) for details.
 
 ## Font
 

+ 6 - 6
docs/en/manuals/gui-clipping.md

@@ -65,11 +65,11 @@ A clipping node and its hierarchy will be drawn first if it has a layer assigned
 
 ![Layers and clipping](images/gui-clipping/layers.png)
 
-In this example, both the clipper nodes "Donut BG" and "BG" are using the same layer 1. The render order between them will be according to the same order in the hierarchy where "Donut BG" is rendered before "BG". However, the child node "Donut Shadow" is assigned to the layer 2 which has a higher layer order and thus will be rendered after the both clipping nodes. In this case, the render order will be:
+In this example, both the clipper nodes "`Donut BG`" and "`BG`" are using the same layer 1. The render order between them will be according to the same order in the hierarchy where "`Donut BG`" is rendered before "`BG`". However, the child node "Donut Shadow" is assigned to the layer 2 which has a higher layer order and thus will be rendered after the both clipping nodes. In this case, the render order will be:
 
-- Donut BG
-- BG
-- BG Frame
-- Donut Shadow
+- `Donut BG`
+- `BG`
+- `BG Frame`
+- `Donut Shadow`
 
-Here you can see that the "Donut Shadow" object will be clipped by both clipping nodes due to the layering, even though it is only a child to one of them.
+Here you can see that the "`Donut Shadow`" object will be clipped by both clipping nodes due to the layering, even though it is only a child to one of them.

+ 4 - 4
docs/en/manuals/ios.md

@@ -91,10 +91,10 @@ When you have the code signing identity and provisioning profile, you are ready
 
 ![Signing iOS bundle](images/ios/sign_bundle.png)
 
-Select your code signing identity and browse for your mobile provisioning file. Select which architectures (32 bit, 64 bit and the iOS simulator) to bundle for as well as the variant (Debug or Release). You can optionally untick the `Sign application` checkbox to skip the signing process and then manually sign at a later stage.
+Select your code signing identity and browse for your mobile provisioning file. Select which architectures (32 bit, 64 bit and the iOS simulator) to bundle for as well as the variant (Debug or Release). You can optionally uncheck the `Sign application` checkbox to skip the signing process and then manually sign at a later stage.
 
 ::: important
-You **must** untick the `Sign application` checkbox when testing your game on the iOS simulator. You will be able to install the application but it will not boot.
+You **must** uncheck the `Sign application` checkbox when testing your game on the iOS simulator. You will be able to install the application but it will not boot.
 :::
 
 Press *Create Bundle* and you will then be prompted to specify where on your computer the bundle will be created.
@@ -148,7 +148,7 @@ Select the image you previously added to `Assets.xcassets` from the Image dropdo
 
 ![](images/ios/xcode_storyboard_select_image.png)
 
-Position the image and make any other adjustments you need, perhaps adding a Label or some other UI element. When you are done set the active scheme to "Build -> Any iOS Device (arm64, armv7)"(or "Generic iOS Device") and select Product -> Build. Wait for the build process to finish.
+Position the image and make any other adjustments you need, perhaps adding a Label or some other UI element. When you are done set the active scheme to "Build -> Any iOS Device (`arm64`, `armv7`)"(or "Generic iOS Device") and select Product -> Build. Wait for the build process to finish.
 
 ::: sidenote
 If you have only `arm64` option in "Any iOS Device (arm64)" change `iOS Deployment target` to 10.3 in "Project -> Basic -> Deployment" settings. It will make your storyboard compatible with `armv7` devices (for example iPhone5c)  
@@ -258,7 +258,7 @@ The Defold game engine uses encryption for the following purposes:
 
 These uses of encyption in the Defold engine are exempt from export compliance document requirements under United States and European Union law. Most Defold projects will remain exempt, but the addition of other cryptographic methods may change this status. It is your responsiblity to ensure that your project meets the requirements of these laws and the App Store's rules. See Apple's [Export Compliance Overview](https://help.apple.com/app-store-connect/#/dev88f5c7bf9) for more information.
 
-If you believe your project is exempt, set the [ITSAppUsesNonExemptEncryption](https://developer.apple.com/documentation/bundleresources/information-property-list/itsappusesnonexemptencryption) key to `False` in the project's `Info.plist` see [Application Manifests](/manuals/extensions-manifest-merge-tool) for more details.
+If you believe your project is exempt, set the [`ITSAppUsesNonExemptEncryption`](https://developer.apple.com/documentation/bundleresources/information-property-list/itsappusesnonexemptencryption) key to `False` in the project's `Info.plist` see [Application Manifests](/manuals/extensions-manifest-merge-tool) for more details.
 
 ## FAQ
 :[iOS FAQ](../shared/ios-faq.md)

+ 7 - 7
docs/en/manuals/model-animation.md

@@ -76,10 +76,10 @@ end
 
 Animations can be played either once or in a loop. How the animation plays is determined by the playback mode:
 
-* go.PLAYBACK_NONE
-* go.PLAYBACK_ONCE_FORWARD
-* go.PLAYBACK_ONCE_BACKWARD
-* go.PLAYBACK_ONCE_PINGPONG
-* go.PLAYBACK_LOOP_FORWARD
-* go.PLAYBACK_LOOP_BACKWARD
-* go.PLAYBACK_LOOP_PINGPONG
+* `go.PLAYBACK_NONE`
+* `go.PLAYBACK_ONCE_FORWARD`
+* `go.PLAYBACK_ONCE_BACKWARD`
+* `go.PLAYBACK_ONCE_PINGPONG`
+* `go.PLAYBACK_LOOP_FORWARD`
+* `go.PLAYBACK_LOOP_BACKWARD`
+* `go.PLAYBACK_LOOP_PINGPONG`

+ 1 - 3
docs/en/manuals/profiling.md

@@ -109,9 +109,7 @@ The *Structure* section shows sizes based on how resources are organized in the
 In addition to the built-in tools, there is a wide range of free high quality tracing and profiling tools available. Here is a selection:
 
 ProFi (Lua)
-: We do not ship any built-in Lua profiler but there are external libraries that are easy enough to use. To find where your scripts spend time, either insert time measures in your code yourself, or use a Lua profiling library like ProFi.
-
-  https://github.com/jgrahamc/ProFi
+: We do not ship any built-in Lua profiler but there are external libraries that are easy enough to use. To find where your scripts spend time, either insert time measures in your code yourself, or use a Lua profiling library like [ProFi](https://github.com/jgrahamc/ProFi).
 
   Note that pure Lua profilers add quite a lot of overhead with each hook they install. For this reason you should be a bit wary of the timing profiles you get from such a tool. Counting profiles are accurate enough though.
 

+ 1 - 1
docs/en/manuals/project-settings.md

@@ -254,7 +254,7 @@ Specifies which filtering to use for magnification filtering, `linear` by defaul
 The max number of render calls, `1024` by default.
 
 #### Max Characters:
-The number of characters pre-allocated in the text rendering buffer, i.e. the number of characters that can be displayed each frame, `8192` by default.
+The number of characters preallocated in the text rendering buffer, i.e. the number of characters that can be displayed each frame, `8192` by default.
 
 #### Max Debug Vertices
 The maximum number of debug vertices. Used for physics shape rendering among other things, `10000` by default.

+ 42 - 42
docs/en/manuals/property-animation.md

@@ -58,52 +58,52 @@ Easing defines how the animated value changes over time. The images below descri
 The following are valid easing values for `go.animate()`:
 
 |---|---|
-| go.EASING_LINEAR | |
-| go.EASING_INBACK | go.EASING_OUTBACK |
-| go.EASING_INOUTBACK | go.EASING_OUTINBACK |
-| go.EASING_INBOUNCE | go.EASING_OUTBOUNCE |
-| go.EASING_INOUTBOUNCE | go.EASING_OUTINBOUNCE |
-| go.EASING_INELASTIC | go.EASING_OUTELASTIC |
-| go.EASING_INOUTELASTIC | go.EASING_OUTINELASTIC |
-| go.EASING_INSINE | go.EASING_OUTSINE |
-| go.EASING_INOUTSINE | go.EASING_OUTINSINE |
-| go.EASING_INEXPO | go.EASING_OUTEXPO |
-| go.EASING_INOUTEXPO | go.EASING_OUTINEXPO |
-| go.EASING_INCIRC | go.EASING_OUTCIRC |
-| go.EASING_INOUTCIRC | go.EASING_OUTINCIRC |
-| go.EASING_INQUAD | go.EASING_OUTQUAD |
-| go.EASING_INOUTQUAD | go.EASING_OUTINQUAD |
-| go.EASING_INCUBIC | go.EASING_OUTCUBIC |
-| go.EASING_INOUTCUBIC | go.EASING_OUTINCUBIC |
-| go.EASING_INQUART | go.EASING_OUTQUART |
-| go.EASING_INOUTQUART | go.EASING_OUTINQUART |
-| go.EASING_INQUINT | go.EASING_OUTQUINT |
-| go.EASING_INOUTQUINT | go.EASING_OUTINQUINT |
+| `go.EASING_LINEAR` | |
+| `go.EASING_INBACK` | `go.EASING_OUTBACK` |
+| `go.EASING_INOUTBACK` | `go.EASING_OUTINBACK` |
+| `go.EASING_INBOUNCE` | `go.EASING_OUTBOUNCE` |
+| `go.EASING_INOUTBOUNCE` | `go.EASING_OUTINBOUNCE` |
+| `go.EASING_INELASTIC` | `go.EASING_OUTELASTIC` |
+| `go.EASING_INOUTELASTIC` | `go.EASING_OUTINELASTIC` |
+| `go.EASING_INSINE` | `go.EASING_OUTSINE` |
+| `go.EASING_INOUTSINE` | `go.EASING_OUTINSINE` |
+| `go.EASING_INEXPO` | `go.EASING_OUTEXPO` |
+| `go.EASING_INOUTEXPO` | `go.EASING_OUTINEXPO` |
+| `go.EASING_INCIRC` | `go.EASING_OUTCIRC` |
+| `go.EASING_INOUTCIRC` | `go.EASING_OUTINCIRC` |
+| `go.EASING_INQUAD` | `go.EASING_OUTQUAD` |
+| `go.EASING_INOUTQUAD` | `go.EASING_OUTINQUAD` |
+| `go.EASING_INCUBIC` | `go.EASING_OUTCUBIC` |
+| `go.EASING_INOUTCUBIC` | `go.EASING_OUTINCUBIC` |
+| `go.EASING_INQUART` | `go.EASING_OUTQUART` |
+| `go.EASING_INOUTQUART` | `go.EASING_OUTINQUART` |
+| `go.EASING_INQUINT` | `go.EASING_OUTQUINT` |
+| `go.EASING_INOUTQUINT` | `go.EASING_OUTINQUINT` |
 
 The following are valid easing values for `gui.animate()`:
 
 |---|---|
-| gui.EASING_LINEAR | |
-| gui.EASING_INBACK | gui.EASING_OUTBACK |
-| gui.EASING_INOUTBACK | gui.EASING_OUTINBACK |
-| gui.EASING_INBOUNCE | gui.EASING_OUTBOUNCE |
-| gui.EASING_INOUTBOUNCE | gui.EASING_OUTINBOUNCE |
-| gui.EASING_INELASTIC | gui.EASING_OUTELASTIC |
-| gui.EASING_INOUTELASTIC | gui.EASING_OUTINELASTIC |
-| gui.EASING_INSINE | gui.EASING_OUTSINE |
-| gui.EASING_INOUTSINE | gui.EASING_OUTINSINE |
-| gui.EASING_INEXPO | gui.EASING_OUTEXPO |
-| gui.EASING_INOUTEXPO | gui.EASING_OUTINEXPO |
-| gui.EASING_INCIRC | gui.EASING_OUTCIRC |
-| gui.EASING_INOUTCIRC | gui.EASING_OUTINCIRC |
-| gui.EASING_INQUAD | gui.EASING_OUTQUAD |
-| gui.EASING_INOUTQUAD | gui.EASING_OUTINQUAD |
-| gui.EASING_INCUBIC | gui.EASING_OUTCUBIC |
-| gui.EASING_INOUTCUBIC | gui.EASING_OUTINCUBIC |
-| gui.EASING_INQUART | gui.EASING_OUTQUART |
-| gui.EASING_INOUTQUART | gui.EASING_OUTINQUART |
-| gui.EASING_INQUINT | gui.EASING_OUTQUINT |
-| gui.EASING_INOUTQUINT | gui.EASING_OUTINQUINT |
+| `gui.EASING_LINEAR` | |
+| `gui.EASING_INBACK` | `gui.EASING_OUTBACK` |
+| `gui.EASING_INOUTBACK` | `gui.EASING_OUTINBACK` |
+| `gui.EASING_INBOUNCE` | `gui.EASING_OUTBOUNCE` |
+| `gui.EASING_INOUTBOUNCE` | `gui.EASING_OUTINBOUNCE` |
+| `gui.EASING_INELASTIC` | `gui.EASING_OUTELASTIC` |
+| `gui.EASING_INOUTELASTIC` | `gui.EASING_OUTINELASTIC` |
+| `gui.EASING_INSINE` | `gui.EASING_OUTSINE` |
+| `gui.EASING_INOUTSINE` | `gui.EASING_OUTINSINE` |
+| `gui.EASING_INEXPO` | `gui.EASING_OUTEXPO` |
+| `gui.EASING_INOUTEXPO` | `gui.EASING_OUTINEXPO` |
+| `gui.EASING_INCIRC` | `gui.EASING_OUTCIRC` |
+| `gui.EASING_INOUTCIRC` | `gui.EASING_OUTINCIRC` |
+| `gui.EASING_INQUAD` | `gui.EASING_OUTQUAD` |
+| `gui.EASING_INOUTQUAD` | `gui.EASING_OUTINQUAD` |
+| `gui.EASING_INCUBIC` | `gui.EASING_OUTCUBIC` |
+| `gui.EASING_INOUTCUBIC` | `gui.EASING_OUTINCUBIC` |
+| `gui.EASING_INQUART` | `gui.EASING_OUTQUART` |
+| `gui.EASING_INOUTQUART` | `gui.EASING_OUTINQUART` |
+| `gui.EASING_INQUINT` | `gui.EASING_OUTQUINT` |
+| `gui.EASING_INOUTQUINT` | `gui.EASING_OUTINQUINT` |
 
 ![Linear interpolation](images/properties/easing_linear.png)
 ![In back](images/properties/easing_inback.png)

+ 1 - 1
docs/en/manuals/shader.md

@@ -421,7 +421,7 @@ void main()
 1. The varying texture coordinate variable is declared. The value of this variable will be interpolated for each fragment between the values set for each vertex in the shape.
 2. A `sampler2D` uniform variable is declared. The sampler, together with the interpolated texture coordinates, is used to perform texture lookup so the sprite can be textured properly. Since this is a sprite, the engine will assign this sampler to the image set in the sprite's *Image* property.
 3. A constant of type `CONSTANT_TYPE_USER` is defined in the material and declared as a `uniform`. Its value is used to allow color tinting of the sprite. The default is pure white.
-4. The color value of the tint gets pre-multiplied with its alpha value since all runtime textures already contain pre-multiplied alpha.
+4. The color value of the tint gets premultiplied with its alpha value since all runtime textures already contain premultiplied alpha.
 5. Sample the texture at the interpolated coordinate and return the sampled value.
 6. `gl_FragColor` is set to the output color for the fragment: the diffuse color from the texture multiplied with the tint value.
 

+ 7 - 7
docs/en/manuals/texture-profiles.md

@@ -86,13 +86,13 @@ You can turn on and off the use of texture profiles in the editor preferences. S
 
 ## Path Settings
 
-The *Path Settings* section of the texture profiles file contains a list of path patterns and which *profile* to use when processing resources that match the path. The paths are expressed as "Ant Glob" patterns (see http://ant.apache.org/manual/dirtasks.html#patterns for details). Patterns can be expressed using the following wildcards:
+The *Path Settings* section of the texture profiles file contains a list of path patterns and which *profile* to use when processing resources that match the path. The paths are expressed as "Ant Glob" patterns (see [documentation](http://ant.apache.org/manual/dirtasks.html#patterns) for details). Patterns can be expressed using the following wildcards:
 
 `*`
-: Matches zero or more characters. For instance `sprite*.png` matches the files *sprite.png*, *sprite1.png* and *sprite_with_a_long_name.png*.
+: Matches zero or more characters. For instance `sprite*.png` matches the files *`sprite.png`*, *`sprite1.png`* and *`sprite_with_a_long_name.png`*.
 
 `?`
-: Matches exactly one character. For instance: `sprite?.png` matches the files *sprite1.png*, *spriteA.png* but not *sprite.png* or *sprite_with_a_long_name.png*.
+: Matches exactly one character. For instance: `sprite?.png` matches the files *sprite1.png*, *`spriteA.png`* but not *`sprite.png`* or *`sprite_with_a_long_name.png`*.
 
 `**`
 : Matches a complete directory tree, or---when used as the name of a directory---zero or more directories. For instance: `/gui/**` matches all files in the directory */gui* and all its subdirectories.
@@ -102,14 +102,14 @@ The *Path Settings* section of the texture profiles file contains a list of path
 This example contains two path patterns and their corresponding profiles.
 
 `/gui/**/*.atlas`
-: All *.atlas* files in directory */gui* or any of its subdirectories will be processed according to profile "gui_atlas".
+: All *.atlas* files in directory *`/gui`* or any of its subdirectories will be processed according to profile "gui_atlas".
 
 `/**/*.atlas`
 : All *.atlas* files anywhere in the project will be process according to the profile "atlas".
 
-Note that the more generic path is put last. The matching algorithm works top down. The first occurrence that matches the resource path will be used. A matching path expression further down the list never overrides the first match. Had the paths been put in the opposite order every atlas would have been processed with profile "atlas", even the ones in directory */gui*.
+Note that the more generic path is put last. The matching algorithm works top down. The first occurrence that matches the resource path will be used. A matching path expression further down the list never overrides the first match. Had the paths been put in the opposite order every atlas would have been processed with profile "atlas", even the ones in directory *`/gui`*.
 
-Texture resources that _do not_ match any path in the profiles file will be compiled and rescaled to the closest power of 2, but will otherwise be left intact.
+Texture resources that _do not_ match any path in the profiles file will be compiled and scaled to the closest power of 2, but will otherwise be left intact.
 
 ## Profiles
 
@@ -131,7 +131,7 @@ If two [path settings](#path-settings) matches the same file and the path uses d
 : If checked, mipmaps are generated for the platform. Unchecked by default.
 
 *Pre-multiply alpha*
-: If checked, alpha is pre-multiplied into the texture data. Checked by default.
+: If checked, alpha is premultiplied into the texture data. Checked by default.
 
 *Max Texture Size*
 : If set to a non-zero value, textures are limited in pixel size to the specified number. Any texture that has a width or height larger than the specified value will be scaled down.

+ 1 - 1
docs/en/shared/component-max-count-optimizations.md

@@ -1,5 +1,5 @@
 ## Component max count optimizations
-The *game.project* settings file contains many values specifying the maximum number of a certain resource that can exist at the same time, often counted per loaded collection (also called world). The Defold engine will use these max values to pre-allocate memory for this amount of memory to avoid dynamic allocations and memory fragmentation while the game is running.
+The *game.project* settings file contains many values specifying the maximum number of a certain resource that can exist at the same time, often counted per loaded collection (also called world). The Defold engine will use these max values to preallocate memory for this amount of memory to avoid dynamic allocations and memory fragmentation while the game is running.
 
 The Defold data structures used to represent components and other resources are optimized to use as little memory as possible but care should still be taken when setting the values to avoid allocating more memory than is actually necessary.
 

+ 1 - 1
docs/en/shared/html5-faq.md

@@ -1,6 +1,6 @@
 #### Q: Why does my HTML5-app freeze at the splash screen in Chrome?
 
-A: In some cases it is not possible to run a game in the browser locally from the filesystem. Running from the editor serves the game from a local web server. You can, for instance, use SimpleHTTPServer in Python:
+A: In some cases it is not possible to run a game in the browser locally from the filesystem. Running from the editor serves the game from a local web server. You can, for instance, use `SimpleHTTPServer` in Python:
 
 ```sh
 $ python -m SimpleHTTPServer [port]

+ 5 - 5
docs/en/shared/linux-faq.md

@@ -28,7 +28,7 @@ $ GTK_CSD=0 ./Defold
 
 #### Q: The Defold editor crashes when opening a collection or game object and the crash refers to `com.jogamp.opengl`
 
-A: On certain distributions (like Ubuntu 18) there is an issue with the version of jogamp/jogl Defold uses vs. the version of [Mesa](https://docs.mesa3d.org/) on the system. You can override which GL version that gets reported when calling `glGetString(GL_VERSION)` by setting the `MESA_GL_VERSION_OVERRIDE` to 2.1 or a larger value but less than or equal to the version of your driver. You can check which is the maximum OpenGL version your driver supports using `glxinfo`:
+A: On certain distributions (like Ubuntu 18) there is an issue with the version of `jogamp`/`jogl` Defold uses vs. the version of [Mesa](https://docs.mesa3d.org/) on the system. You can override which GL version that gets reported when calling `glGetString(GL_VERSION)` by setting the `MESA_GL_VERSION_OVERRIDE` to 2.1 or a larger value but less than or equal to the version of your driver. You can check which is the maximum OpenGL version your driver supports using `glxinfo`:
 
 ```bash
 glxinfo | grep version
@@ -64,7 +64,7 @@ $ MESA_GL_VERSION_OVERRIDE=4.6 ./Defold
 ```
 
 
-#### Q: Why am I getting "com.jogamp.opengl.GLException: Graphics configuration failed" when launching Defold?
+#### Q: Why am I getting "`com.jogamp.opengl.GLException: Graphics configuration failed`" when launching Defold?
 
 A: On certain distributions (for instance Ubuntu 20.04) there is an issue with the new [Mesa](https://docs.mesa3d.org/) drivers (Iris) when running Defold. You can try using an older driver version when running Defold:
 
@@ -73,7 +73,7 @@ $ MESA_LOADER_DRIVER_OVERRIDE=i965 ./Defold
 ```
 
 
-#### Q: The Defold editor crashes when opening a collection or game object and the crash refers to libffi.so
+#### Q: The Defold editor crashes when opening a collection or game object and the crash refers to `libffi.so`
 
 A: The [libffi](https://sourceware.org/libffi/) version of your distribution and the one required by Defold (version 6 or 7) does not match. Make sure `libffi.so.6` or `libffi.so.7` is installed under `/usr/lib/x86_64-linux-gnu`. You can download `libffi.so.7` like this:  
 
@@ -106,7 +106,7 @@ A: Check the console output in the editor. If you get the following message:
 dmengine: error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory
 ```
 
-Then you need to install *libopenal1*. The package name varies between distributions, and in some cases you might have to install the *openal* and *openal-dev* or *openal-devel* packages.
+Then you need to install *`libopenal1`*. The package name varies between distributions, and in some cases you might have to install the *`openal`* and *`openal-dev`* or *`openal-devel`* packages.
 
 ```bash
 $ apt-get install libopenal-dev
@@ -114,7 +114,7 @@ $ apt-get install libopenal-dev
 
 #### Q: Why does the top menu close before I can select something?
 
-A: This is likely caused by the window manager used (for instance Qtile or i3). This is a [known issue in JavaFX](https://bugs.openjdk.org/browse/JDK-8251240?focusedCommentId=14362084&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14362084) and it can either be solved by setting the `GDK_DISPLAY` environment variable to 1:¨
+A: This is likely caused by the window manager used (for instance `Qtile` or i3). This is a [known issue in JavaFX](https://bugs.openjdk.org/browse/JDK-8251240?focusedCommentId=14362084&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14362084) and it can either be solved by setting the `GDK_DISPLAY` environment variable to 1:¨
 
 ```bash
 $ GDK_DISPLAY=1 ./Defold

+ 27 - 17
docs/en/tutorials/grading.md

@@ -118,15 +118,15 @@ Create a quadratic plane mesh in Blender (or any other 3D modelling program). Se
 
 ![game.project](images/grading/quad_blender.png)
 
-1. Export the model as a Collada file called *quad.dae* and drag it into your Defold project.
-2. Open *main.collection* and create a new game object called "grade".
+1. Export the model as a Collada file called *`quad.dae`* and drag it into your Defold project.
+2. Open *`main.collection`* and create a new game object called "grade".
 3. Add a Model component to the "grade" game object.
-3. Set the *Mesh* property of the model component to the *quad.dae* file.
+3. Set the *Mesh* property of the model component to the *`quad.dae`* file.
 
 Leave the game object unscaled at origin. Later, when we render the quad we will project it so it fills the whole screen. But first we need a material and shader programs for the quad:
 
-1. Create a new material and call it *grade.material* by right clicking *main* in the *Asset* view and selecting <kbd>New ▸ Material</kbd>.
-2. Create a vertex shader program called *grade.vp* and a fragment shader program called *grade.fp* by right clicking *main* in the *Asset* view and selecting <kbd>New ▸ Vertex program</kbd> and <kbd>New ▸ Fragment program</kbd>.
+1. Create a new material and call it *`grade.material`* by right clicking *main* in the *Asset* view and selecting <kbd>New ▸ Material</kbd>.
+2. Create a vertex shader program called *`grade.vp`* and a fragment shader program called *`grade.fp`* by right clicking *main* in the *Asset* view and selecting <kbd>New ▸ Vertex program</kbd> and <kbd>New ▸ Fragment program</kbd>.
 3. Open *grade.material* and set the *Vertex program* and *Fragment program* properties to the new shader program files.
 4. Add a *Vertex constant* named "view_proj" of type `CONSTANT_TYPE_VIEWPROJ`. This is the view and projection matrix used in the vertex program for the quad vertices.
 5. Add a *Sampler* called "original". This will be used to sample pixels from the off-screen render target color buffer.
@@ -134,7 +134,7 @@ Leave the game object unscaled at origin. Later, when we render the quad we will
 
    ![grade.material](images/grading/grade_material.png)
 
-7. Open *main.collection*, select the model component in game object "grade" and set its *Material* property to "/main/grade.material".
+7. Open *`main.collection`*, select the model component in game object "grade" and set its *Material* property to "`/main/grade.material`".
 
    ![model properties](images/grading/model_properties.png)
 
@@ -179,7 +179,7 @@ Now we have the quad model in place with its material and shaders. We just have
 
 ## Texturing with the off-screen buffer
 
-We need to add a render predicate to the render script so we can draw the quad model. Open *grade.render_script* and edit the `init()` function:
+We need to add a render predicate to the render script so we can draw the quad model. Open *`grade.render_script`* and edit the `init()` function:
 
 ```lua
 function init(self)
@@ -192,7 +192,7 @@ function init(self)
     ...
 end
 ```
-1. Add a new predicate matching the "grade" tag that we set in *grade.material*.
+1. Add a new predicate matching the "grade" tag that we set in *`grade.material`*.
 
 After the render target's color buffer has been filled in `update()` we set up a view and a projection that make the quad model fill the whole screen. We then use the render target's color buffer as the quad's texture:
 
@@ -218,8 +218,8 @@ end
 1. Clear the frame buffer. Note that the previous call to `render.clear()` affects the render target, not the screen frame buffer.
 2. Set the viewport to match the window size.
 3. Set the view to the identity matrix. This means camera is at origin looking straight along the Z axis. Also set the projection to the identity matrix causing the the quad to be projected flat across the whole screen.
-4. Set texture slot 0 to the color buffer of the render target. We have sampler "original" at slot 0 in our *grade.material* so the fragment shader will sample from the render target.
-5. Draw the predicate we created matching any material with the tag "grade". The quad model uses *grade.material* which sets that tag---thus the quad will be drawn.
+4. Set texture slot 0 to the color buffer of the render target. We have sampler "original" at slot 0 in our *`grade.material`* so the fragment shader will sample from the render target.
+5. Draw the predicate we created matching any material with the tag "grade". The quad model uses *`grade.material`* which sets that tag---thus the quad will be drawn.
 6. After drawing, disable texture slot 0 since we are done drawing with it.
 
 Now let's run the game and see the result:
@@ -292,21 +292,21 @@ By using linear filtering we thus eliminate color quantization and get very good
 
 Let's implement the texture lookup in the fragment shader:
 
-1. Open *grade.material*.
-2. Add a second sampler called "lut" (for lookup table).
-3. Set the *Filter min* property to `FILTER_MODE_MIN_LINEAR` and the *Filter mag* property to `FILTER_MODE_MAG_LINEAR`.
+1. Open *`grade.material`*.
+2. Add a second sampler called "`lut`" (for lookup table).
+3. Set the *`Filter min`* property to `FILTER_MODE_MIN_LINEAR` and the *`Filter mag`* property to `FILTER_MODE_MAG_LINEAR`.
 
     ![lookup table sampler](images/grading/material_lut_sampler.png)
 
-4. Download the following lookup table texture (*lut16.png*) and add it to your project.
+4. Download the following lookup table texture (*`lut16.png`*) and add it to your project.
 
     ![16 colors lookup table](images/grading/lut16.png)
 
-5. Open *main.collection* and set the *lut* texture property to the downloaded lookup texture.
+5. Open *`main.collection`* and set the *`lut`* texture property to the downloaded lookup texture.
 
     ![quad model lookup table](images/grading/quad_lut.png)
 
-6. Finally, open *grade.fp* so we can add support for color lookup:
+6. Finally, open *`grade.fp`* so we can add support for color lookup:
 
     ```glsl
     varying mediump vec4 position;
@@ -367,6 +367,16 @@ To get better blue channel resolution, we can implement the interpolation oursel
 
 So, we should read from two cells:
 
+Inline $cell_{low} = \left \lfloor{B \times (N - 1)} \right \rfloor$
+
+$$cell_{low} = \left \lfloor{B \times (N - 1)} \right \rfloor$$
+
+```math
+cell_{low} = \left \lfloor{B \times (N - 1)} \right \rfloor
+```
+
+
+
 $$
 cell_{low} = \left \lfloor{B \times (N - 1)} \right \rfloor
 $$
@@ -451,7 +461,7 @@ Okay, that was a lot of work to draw something that looks exactly like the origi
 
 ![world in Affinity](images/grading/world_graded_affinity.png)
 
-4. Apply the same color adjustments to the lookup table texture file (*lut16.png*).
+4. Apply the same color adjustments to the lookup table texture file (*`lut16.png`*).
 5. Save the color adjusted lookup table texture file.
 6. Replace the texture *lut16.png* used in your Defold project with the color adjusted one.
 7. Run the game!

+ 2 - 2
docs/en/tutorials/platformer.md

@@ -63,13 +63,13 @@ This is how we integrate the acceleration and velocity to move the character in
 1. Determine the target speed based on input
 2. Calculate the difference between our current speed and the target speed
 3. Set the acceleration to work in the direction of the difference
-4. Calculate the velocity change this frame (dv is short for delta-velocity), as above:
+4. Calculate the velocity change this frame (`dv` is short for delta-velocity), as above:
 
     ```lua
     local dv = acceleration * dt
     ```
 
-5. Check if dv exceeds the intended speed difference, clamp it in that case
+5. Check if `dv` exceeds the intended speed difference, clamp it in that case
 6. Save the current velocity for later use (`self.velocity`, which right now is the velocity used the previous frame):
 
     ```lua

+ 1 - 1
docs/en/tutorials/runner.md

@@ -488,7 +488,7 @@ At this point we should add physics collision for the ground:
 
 ![Ground collision](images/runner/2/ground_collision.png)
 
-Now you should be able to try running the game (<kbd>Project ▸ Build</kbd>). The hero character should run on the ground and it should be possible to jump with the  kbd:[Space] button. If you run the game on a mobile device, you can jump by tapping on the screen.
+Now you should be able to try running the game (<kbd>Project ▸ Build</kbd>). The hero character should run on the ground and it should be possible to jump with the  <kbd>Space</kbd> button. If you run the game on a mobile device, you can jump by tapping on the screen.
 
 To make life in our game world a little less dull, we should add platforms to jump on.
 

+ 1 - 1
docs/en/tutorials/shadertoy.md

@@ -46,7 +46,7 @@ Create a new material file *`star-nest.material`*, a vertex shader program *`sta
 1. Open *star-nest.material*.
 2. Set the *Vertex Program* to `star-nest.vp`.
 3. Set the *Fragment Program* to `star-nest.fp`.
-4. Add a *Vertex Constant* and name it "view_proj" (for "view projection").
+4. Add a *Vertex Constant* and name it "`view_proj`" (for "view projection").
 5. Set its *Type* to `CONSTANT_TYPE_VIEWPROJ`.
 6. Add a tag "tile" to the *Tags*. This is so that the quad is included in the render pass when sprites and tiles are drawn.
 

+ 3 - 3
docs/en/tutorials/texture-scrolling.md

@@ -36,7 +36,7 @@ That is the basic setup and now we can move on to the `water_scroll.vp` (vertex)
 
 ## Shader code
 
-It’s good practice to avoid doing to much calculations in the fragment program if you can avoid it so we calculate the UV offset in the vertex program before the coordinates are sent to the fragment program. We also create a constant "animation_time" with type user to the vertex constant properties set in the material (as seen above). The constant is a vector 4 but we only use the first value. If we denote this vector 4 as vector4(x,y,z,w) we will only use x value in the shader as shown below.
+It’s good practice to avoid doing to much calculations in the fragment program if you can avoid it so we calculate the UV offset in the vertex program before the coordinates are sent to the fragment program. We also create a constant "animation_time" with type user to the vertex constant properties set in the material (as seen above). The constant is a vector 4 but we only use the first value. If we denote this vector 4 as `vector4(x,y,z,w)` we will only use x value in the shader as shown below.
 
 
 ```glsl
@@ -62,7 +62,7 @@ void main()
 }
 ```
 
-The model supplies the attribute `texcoord0` which is our texture UV coordinates. We declare our vec4 uniform named animation_time and we also have two `vec2` varying `var_texcoord0` and `var_texcoord1` which we pass to the fragment program after we assign them the attribute UV coordinates `texcoord0` in `void main()`. As you can see `var_texcoord1` is different because this one we are offsetting before it is sent to the fragment program. Assign a `vec2` so that we can `animation_time` to the x and y separately if we want. In this case we only take `texcoord0.x` and subtract our constant `animation_time.x` which when animated will offset in the negative U axis (horizontal left), we set `texcoord0.y` to keep its attribute position.
+The model supplies the attribute `texcoord0` which is our texture UV coordinates. We declare our `vec4` uniform named animation_time and we also have two `vec2` varying `var_texcoord0` and `var_texcoord1` which we pass to the fragment program after we assign them the attribute UV coordinates `texcoord0` in `void main()`. As you can see `var_texcoord1` is different because this one we are offsetting before it is sent to the fragment program. Assign a `vec2` so that we can `animation_time` to the x and y separately if we want. In this case we only take `texcoord0.x` and subtract our constant `animation_time.x` which when animated will offset in the negative U axis (horizontal left), we set `texcoord0.y` to keep its attribute position.
 
 
 ```glsl
@@ -83,7 +83,7 @@ void main()
 }
 ```
 
-Now to the fragment program, we have a simple setup. Two "in" varying vec2’s that we sent from the vertex program `var_textcoord0` and `var_texcoord1` and then we supply uniforms for the sampler textures we set in our model and material they are named `tex0` and `tex1`. Then in `void main()` we create vector 4’s to assign to our textures using `texture2d()`, the images are in RGBA (red,green,blue,alpha) channel format. We assign sampler name and then the texture coordinates we want them to use. As you see in the image above "water_waves" has `var_texcoord1` assigned. this is the texture we are animating/scrolling and `var_texcoord0` assigned to `water_bg` we left as is. For the global reserved variable `gl_FragColor` this is where pixel colors are assigned with the same `vec4(r,g,b,a)` format. We want to combine the 2 textures together so we use addition to mix the rgb channels of each texture together, also we are not using the textures alpha channel so we assign a float value of 1.0 which equals full opacity.
+Now to the fragment program, we have a simple setup. Two "in" varying `vec2`’s that we sent from the vertex program `var_textcoord0` and `var_texcoord1` and then we supply uniforms for the sampler textures we set in our model and material they are named `tex0` and `tex1`. Then in `void main()` we create vector 4’s to assign to our textures using `texture2d()`, the images are in RGBA (red,green,blue,alpha) channel format. We assign sampler name and then the texture coordinates we want them to use. As you see in the image above "water_waves" has `var_texcoord1` assigned. this is the texture we are animating/scrolling and `var_texcoord0` assigned to `water_bg` we left as is. For the global reserved variable `gl_FragColor` this is where pixel colors are assigned with the same `vec4(r,g,b,a)` format. We want to combine the 2 textures together so we use addition to mix the rgb channels of each texture together, also we are not using the textures alpha channel so we assign a float value of 1.0 which equals full opacity.
 
 
 ## Shader animation script