diff --git a/docs/classes/drawables_drawable.Drawable.html b/docs/classes/drawables_drawable.Drawable.html index c82caf3..165de8b 100644 --- a/docs/classes/drawables_drawable.Drawable.html +++ b/docs/classes/drawables_drawable.Drawable.html @@ -14,6 +14,6 @@ before being returned.

  • transform1d: number

    scalar properties should be transformed by this number before being returned.

  • Returns any

    diff --git a/docs/classes/drawables_lights_circle-light.CircleLight.html b/docs/classes/drawables_lights_circle-light.CircleLight.html index 8f13c11..6a64187 100644 --- a/docs/classes/drawables_lights_circle-light.CircleLight.html +++ b/docs/classes/drawables_lights_circle-light.CircleLight.html @@ -14,6 +14,6 @@ before being returned.

  • transform1d: number

    scalar properties should be transformed by this number before being returned.

  • Returns any

    diff --git a/docs/classes/drawables_lights_flashlight.Flashlight.html b/docs/classes/drawables_lights_flashlight.Flashlight.html index 98d3388..8c0f3a3 100644 --- a/docs/classes/drawables_lights_flashlight.Flashlight.html +++ b/docs/classes/drawables_lights_flashlight.Flashlight.html @@ -11,6 +11,6 @@ setLightnessRatio

    Constructors

    • Parameters

      • center: vec2
      • color: vec3
      • intensity: number
      • direction: vec2
      • startCutoff: number = 0

      Returns Flashlight

    Properties

    center: vec2
    color: vec3
    direction: vec2
    intensity: number
    lightnessRatio: number = 1
    startCutoff: number = 0
    descriptor: DrawableDescriptor = ...

    This should be defined in inherited classes.

    Methods

    • Parameters

      • transform2d: mat2d
      • transform1d: number

      Returns any

    • The lower bound of the distance between the target and the object.

      -

      It can return 0 by default, the only consequence of this, is a reduced performance. -Because this object won't benefit from tile-based rendering.

      +

      It can return 0 by default; the only consequence is reduced performance, +because this object won't benefit from tile-based rendering.

      Parameters

      • target: vec2

      Returns number

    • Parameters

      • ratio: number

      Returns void

    diff --git a/docs/classes/drawables_shapes_colorful-circle.ColorfulCircle.html b/docs/classes/drawables_shapes_colorful-circle.ColorfulCircle.html index 5e1741e..d5ff00b 100644 --- a/docs/classes/drawables_shapes_colorful-circle.ColorfulCircle.html +++ b/docs/classes/drawables_shapes_colorful-circle.ColorfulCircle.html @@ -17,6 +17,6 @@ before being returned.

  • transform1d: number

    scalar properties should be transformed by this number before being returned.

  • Returns any

    diff --git a/docs/classes/drawables_shapes_polygon-factory.PolygonBase.html b/docs/classes/drawables_shapes_polygon-factory.PolygonBase.html index 6937f5e..b02025e 100644 --- a/docs/classes/drawables_shapes_polygon-factory.PolygonBase.html +++ b/docs/classes/drawables_shapes_polygon-factory.PolygonBase.html @@ -10,6 +10,6 @@ before being returned.

  • transform1d: number

    scalar properties should be transformed by this number before being returned.

  • Returns any

    diff --git a/docs/classes/graphics_rendering_fps-quality-autoscaler.FpsQualityAutoscaler.html b/docs/classes/graphics_rendering_fps-quality-autoscaler.FpsQualityAutoscaler.html index 41d2646..fce86c1 100644 --- a/docs/classes/graphics_rendering_fps-quality-autoscaler.FpsQualityAutoscaler.html +++ b/docs/classes/graphics_rendering_fps-quality-autoscaler.FpsQualityAutoscaler.html @@ -1,5 +1,5 @@ FpsQualityAutoscaler | SDF-2D - v0.7.6
    SDF-2D - v0.7.6
      Preparing search index...

      Set the quality of rendering based on FPS values.

      -

      When using this the size of the canvas must be fixed with CSS.

      +

      When using this, the size of the canvas must be fixed with CSS.

      The addDeltaTime method should be called once every frame.

      Usage:

       const renderer = await compile(...);
      const autoscaler = new FpsQualityAutoscaler(renderer); @@ -12,5 +12,6 @@

      Accessors

      Methods

      Constructors

      Properties

      fpsHysteresis: number = 5
      scalingEnabled: boolean = true

      When false, FPS is still measured but the render scales are left alone.

      -
      fpsTarget: number = 30

      Accessors

      • get FPS(): number

        Returns number

      Methods

      • Autoscaling is also done by calling this function

        -

        Parameters

        • deltaTimeInMilliseconds: number

        Returns void

      +
      fpsTarget: number = 30

      Accessors

      • get FPS(): number

        Returns number

      Methods

      • Record the time taken by the latest frame. Autoscaling is also performed +as part of this call.

        +

        Parameters

        • deltaTimeInMilliseconds: number

        Returns void

      diff --git a/docs/classes/helper_delta-time-calculator.DeltaTimeCalculator.html b/docs/classes/helper_delta-time-calculator.DeltaTimeCalculator.html index e0146cf..52d307c 100644 --- a/docs/classes/helper_delta-time-calculator.DeltaTimeCalculator.html +++ b/docs/classes/helper_delta-time-calculator.DeltaTimeCalculator.html @@ -1,6 +1,6 @@ DeltaTimeCalculator | SDF-2D - v0.7.6
      SDF-2D - v0.7.6
        Preparing search index...

        A helper class for calculating the elapsed time between frames.

        -

        Handles the case, where the browser tab is not in focus and requestAnimationFrame -does not get called for performance reasons. In this case, the return deltaTime won't be +

        Handles the case where the browser tab is not in focus and requestAnimationFrame +does not get called for performance reasons. In this case, the returned deltaTime won't be an unreasonably large value.

        Index

        Constructors

        Methods

        destroy diff --git a/docs/enums/graphics_graphics-library_texture_texture-options.WrapOptions.html b/docs/enums/graphics_graphics-library_texture_texture-options.WrapOptions.html index 78700b0..22a8f63 100644 --- a/docs/enums/graphics_graphics-library_texture_texture-options.WrapOptions.html +++ b/docs/enums/graphics_graphics-library_texture_texture-options.WrapOptions.html @@ -1,6 +1,6 @@ WrapOptions | SDF-2D - v0.7.6
        SDF-2D - v0.7.6
          Preparing search index...
          Index

          Enumeration Members

          Enumeration Members

          CLAMP_TO_EDGE: "CLAMP_TO_EDGE"
          MIRRORED_REPEAT: "MIRRORED_REPEAT"

          On WebGL it only work with power of 2 texture sizes.

          -
          REPEAT: "REPEAT"

          On WebGL it only work with power of 2 texture sizes.

          +

          Enumeration Members

          CLAMP_TO_EDGE: "CLAMP_TO_EDGE"
          MIRRORED_REPEAT: "MIRRORED_REPEAT"

          On WebGL, this only works with power-of-2 texture sizes.

          +
          REPEAT: "REPEAT"

          On WebGL, this only works with power-of-2 texture sizes.

          diff --git a/docs/functions/compile.compile.html b/docs/functions/compile.compile.html index 544adec..4b5410c 100644 --- a/docs/functions/compile.compile.html +++ b/docs/functions/compile.compile.html @@ -1,10 +1,10 @@ -compile | SDF-2D - v0.7.6
          SDF-2D - v0.7.6
            Preparing search index...

            Function compile

            • Compiles a new renderer instance. There can multiple renderers on a single page.

              +compile | SDF-2D - v0.7.6
              SDF-2D - v0.7.6
                Preparing search index...

                Function compile

                • Compiles a new renderer instance. There can be multiple renderers on a single page.

                  Asynchronous behaviour is required for parallel shader compiling. -Trying to draw before the returned promise resolves, results in no action taken. -Settings can be set before promise resolution and they will be applied later.

                  +Trying to draw before the returned promise resolves results in no action being taken. +Settings can be set before the promise resolves and they will be applied later.

                  -

                  The descriptors of every to-be-drawn objects are required before creating the renderer, +

                  The descriptors of all to-be-drawn objects are required before creating the renderer, allowing the compiler to only create the shaders that will actually be used.

                  Example usage:

                   import { compile, hsl, CircleFactory, CircleLight } from 'sdf-2d';

                  const canvas = document.querySelector('canvas');
                  const Circle = CircleFactory(hsl(30, 66, 50));
                  const renderer = await compile(canvas, [Circle.descriptor, CircleLight.descriptor]); diff --git a/docs/functions/drawables_shapes_circle-factory.CircleFactory.html b/docs/functions/drawables_shapes_circle-factory.CircleFactory.html index 50d68cc..c19c376 100644 --- a/docs/functions/drawables_shapes_circle-factory.CircleFactory.html +++ b/docs/functions/drawables_shapes_circle-factory.CircleFactory.html @@ -1 +1 @@ -CircleFactory | SDF-2D - v0.7.6
                  SDF-2D - v0.7.6
                    Preparing search index...
                    • Parameters

                      • color:
                            | number
                            | IndexedCollection
                            | [number, number, number]
                            | [number, number, number, number]

                      Returns typeof CircleBase

                    +CircleFactory | SDF-2D - v0.7.6
                    SDF-2D - v0.7.6
                      Preparing search index...
                      • Parameters

                        • color:
                              | number
                              | IndexedCollection
                              | [number, number, number]
                              | [number, number, number, number]

                        Returns typeof CircleBase

                      diff --git a/docs/functions/drawables_shapes_droplet-factory.DropletFactory.html b/docs/functions/drawables_shapes_droplet-factory.DropletFactory.html index 8650a08..1ec97ae 100644 --- a/docs/functions/drawables_shapes_droplet-factory.DropletFactory.html +++ b/docs/functions/drawables_shapes_droplet-factory.DropletFactory.html @@ -1 +1 @@ -DropletFactory | SDF-2D - v0.7.6
                      SDF-2D - v0.7.6
                        Preparing search index...
                        • Parameters

                          • color:
                                | number
                                | IndexedCollection
                                | [number, number, number]
                                | [number, number, number, number]

                          Returns typeof DropletBase

                        +DropletFactory | SDF-2D - v0.7.6
                        SDF-2D - v0.7.6
                          Preparing search index...
                          • Parameters

                            • color:
                                  | number
                                  | IndexedCollection
                                  | [number, number, number]
                                  | [number, number, number, number]

                            Returns typeof DropletBase

                          diff --git a/docs/functions/drawables_shapes_hexagon-factory.HexagonFactory.html b/docs/functions/drawables_shapes_hexagon-factory.HexagonFactory.html index 4114781..09cf762 100644 --- a/docs/functions/drawables_shapes_hexagon-factory.HexagonFactory.html +++ b/docs/functions/drawables_shapes_hexagon-factory.HexagonFactory.html @@ -1 +1 @@ -HexagonFactory | SDF-2D - v0.7.6
                          SDF-2D - v0.7.6
                            Preparing search index...
                            • Parameters

                              • color:
                                    | number
                                    | IndexedCollection
                                    | [number, number, number]
                                    | [number, number, number, number]

                              Returns typeof HexagonBase

                            +HexagonFactory | SDF-2D - v0.7.6
                            SDF-2D - v0.7.6
                              Preparing search index...
                              • Parameters

                                • color:
                                      | number
                                      | IndexedCollection
                                      | [number, number, number]
                                      | [number, number, number, number]

                                Returns typeof HexagonBase

                              diff --git a/docs/functions/drawables_shapes_inverted-tunnel-factory.InvertedTunnelFactory.html b/docs/functions/drawables_shapes_inverted-tunnel-factory.InvertedTunnelFactory.html index 20997cf..907535a 100644 --- a/docs/functions/drawables_shapes_inverted-tunnel-factory.InvertedTunnelFactory.html +++ b/docs/functions/drawables_shapes_inverted-tunnel-factory.InvertedTunnelFactory.html @@ -1,2 +1,2 @@ InvertedTunnelFactory | SDF-2D - v0.7.6
                              SDF-2D - v0.7.6
                                Preparing search index...
                                • Providing a noise texture is required for this drawable.

                                  -

                                  Parameters

                                  • color:
                                        | number
                                        | IndexedCollection
                                        | [number, number, number]
                                        | [number, number, number, number]

                                  Returns typeof InvertedTunnelBase

                                +

                                Parameters

                                • color:
                                      | number
                                      | IndexedCollection
                                      | [number, number, number]
                                      | [number, number, number, number]

                                Returns typeof InvertedTunnelBase

                              diff --git a/docs/functions/drawables_shapes_noisy-polygon-factory.NoisyPolygonFactory.html b/docs/functions/drawables_shapes_noisy-polygon-factory.NoisyPolygonFactory.html index d435507..cbcb167 100644 --- a/docs/functions/drawables_shapes_noisy-polygon-factory.NoisyPolygonFactory.html +++ b/docs/functions/drawables_shapes_noisy-polygon-factory.NoisyPolygonFactory.html @@ -1 +1 @@ -NoisyPolygonFactory | SDF-2D - v0.7.6
                              SDF-2D - v0.7.6
                                Preparing search index...
                                • Parameters

                                  • vertexCount: number
                                  • color:
                                        | number
                                        | IndexedCollection
                                        | [number, number, number]
                                        | [number, number, number, number]

                                  Returns typeof PolygonBase & NoisyPolygonBase

                                +NoisyPolygonFactory | SDF-2D - v0.7.6
                                SDF-2D - v0.7.6
                                  Preparing search index...
                                  • Parameters

                                    • vertexCount: number
                                    • color:
                                          | number
                                          | IndexedCollection
                                          | [number, number, number]
                                          | [number, number, number, number]

                                    Returns typeof PolygonBase & NoisyPolygonBase

                                  diff --git a/docs/functions/drawables_shapes_polygon-factory.PolygonFactory.html b/docs/functions/drawables_shapes_polygon-factory.PolygonFactory.html index 5c4f625..ea0e763 100644 --- a/docs/functions/drawables_shapes_polygon-factory.PolygonFactory.html +++ b/docs/functions/drawables_shapes_polygon-factory.PolygonFactory.html @@ -1 +1 @@ -PolygonFactory | SDF-2D - v0.7.6
                                  SDF-2D - v0.7.6
                                    Preparing search index...
                                    • Parameters

                                      • vertexCount: number
                                      • color:
                                            | number
                                            | IndexedCollection
                                            | [number, number, number]
                                            | [number, number, number, number]

                                      Returns typeof PolygonBase

                                    +PolygonFactory | SDF-2D - v0.7.6
                                    SDF-2D - v0.7.6
                                      Preparing search index...
                                      • Parameters

                                        • vertexCount: number
                                        • color:
                                              | number
                                              | IndexedCollection
                                              | [number, number, number]
                                              | [number, number, number, number]

                                        Returns typeof PolygonBase

                                      diff --git a/docs/functions/drawables_shapes_rotated-rectangle-factory.RotatedRectangleFactory.html b/docs/functions/drawables_shapes_rotated-rectangle-factory.RotatedRectangleFactory.html index d8898a2..954eccc 100644 --- a/docs/functions/drawables_shapes_rotated-rectangle-factory.RotatedRectangleFactory.html +++ b/docs/functions/drawables_shapes_rotated-rectangle-factory.RotatedRectangleFactory.html @@ -1 +1 @@ -RotatedRectangleFactory | SDF-2D - v0.7.6
                                      SDF-2D - v0.7.6
                                        Preparing search index...
                                        • Parameters

                                          • color:
                                                | number
                                                | IndexedCollection
                                                | [number, number, number]
                                                | [number, number, number, number]

                                          Returns typeof RotatedRectangleBase

                                        +RotatedRectangleFactory | SDF-2D - v0.7.6
                                        SDF-2D - v0.7.6
                                          Preparing search index...
                                          • Parameters

                                            • color:
                                                  | number
                                                  | IndexedCollection
                                                  | [number, number, number]
                                                  | [number, number, number, number]

                                            Returns typeof RotatedRectangleBase

                                          diff --git a/docs/functions/graphics_rendering_renderer_noise-renderer.renderNoise.html b/docs/functions/graphics_rendering_renderer_noise-renderer.renderNoise.html index ca353f5..544174d 100644 --- a/docs/functions/graphics_rendering_renderer_noise-renderer.renderNoise.html +++ b/docs/functions/graphics_rendering_renderer_noise-renderer.renderNoise.html @@ -1,8 +1,7 @@ -renderNoise | SDF-2D - v0.7.6
                                          SDF-2D - v0.7.6
                                            Preparing search index...
                                            • Create a renderer, draw a 2D noise texture with it, -then destroy the used resources, -while returning the generated texture in the form of a canvas.

                                              +renderNoise | SDF-2D - v0.7.6
                                              SDF-2D - v0.7.6
                                                Preparing search index...
                                                • Create a renderer, draw a 2D noise texture with it, then destroy the +resources it used, returning the generated texture in the form of a canvas.

                                                  Parameters

                                                  • textureSize: ReadonlyVec2

                                                    The resolution of the end result

                                                    -
                                                  • scale: number

                                                    A starting value can be 15

                                                    -
                                                  • amplitude: number

                                                    A starting value can be 1

                                                    +
                                                  • scale: number

                                                    A good starting value is 15

                                                    +
                                                  • amplitude: number

                                                    A good starting value is 1

                                                  • ignoreWebGL2: boolean = false

                                                    Ignore WebGL2, even when it's available

                                                    -

                                                  Returns Promise<HTMLCanvasElement>

                                                +

                                              Returns Promise<HTMLCanvasElement>

                                            diff --git a/docs/functions/run-animation.runAnimation.html b/docs/functions/run-animation.runAnimation.html index 9181d16..dc7d7db 100644 --- a/docs/functions/run-animation.runAnimation.html +++ b/docs/functions/run-animation.runAnimation.html @@ -1,6 +1,6 @@ runAnimation | SDF-2D - v0.7.6
                                            SDF-2D - v0.7.6
                                              Preparing search index...

                                              Function runAnimation

                                              • Implements the boilerplate code required to run real-time animations -in the browser. An FPS based autoscaler is also used. This creates an additional fps -key in the renderers insights property.

                                                +in the browser. An FPS-based autoscaler is also used. This creates an additional fps +key in the renderer's insights property.

                                                Example usage:

                                                  <canvas id="main" style="width: 300px; height: 150px"></canvas>
                                                 
                                                diff --git a/docs/interfaces/drawables_drawable-descriptor.DrawableDescriptor.html b/docs/interfaces/drawables_drawable-descriptor.DrawableDescriptor.html index 6200b4b..47ca600 100644 --- a/docs/interfaces/drawables_drawable-descriptor.DrawableDescriptor.html +++ b/docs/interfaces/drawables_drawable-descriptor.DrawableDescriptor.html @@ -1,7 +1,7 @@ DrawableDescriptor | SDF-2D - v0.7.6
                                                SDF-2D - v0.7.6
                                                  Preparing search index...

                                                  Used for containing the required information to compile drawables into shader code.

                                                  Each [[Drawable]] must have a static property of this type, called descriptor.

                                                  -

                                                  For more information on how to create your own DrawableDescriptor-s, look at the +

                                                  For more information on how to create your own DrawableDescriptors, look at the code of [[CircleFactory]] or [[InvertedTunnelFactory]].

                                                  interface DrawableDescriptor {
                                                      empty: Drawable;
                                                      objectCountScaler?: number;
                                                      propertyUniformMapping: { [property: string]: string };
                                                      sdf?: {
                                                          distanceFunctionName: string;
                                                          isInverted?: boolean;
                                                          shader: string;
                                                      };
                                                      shaderCombinationSteps: number[];
                                                      uniformCountMacroName: string;
                                                  }
                                                  Index

                                                  Properties

                                                  empty objectCountScaler? @@ -23,11 +23,11 @@ Its signature should look like this:

                                                • OptionalisInverted?: boolean

                                                  By default, drawables are not inverted.

                                                  -
                                                • shader: string

                                                  The actual GLSL code for observing the drawables represented by this descriptor.

                                                  -

                                                  Your code should work with both version 100 and version 300 es

                                                  +
                                                • shader: string

                                                  The actual GLSL code that defines the drawables represented by this descriptor.

                                                  +

                                                  Your code should work with both GLSL version 100 and version 300 es.

                                                shaderCombinationSteps: number[]

                                                Number of possible drawables around each tile.

                                                -

                                                For each step, a shader will be generated. And at runtime the closes matching -shader will be used to render a given part of the scene.

                                                +

                                                For each step, a shader is generated, and at runtime the closest matching +shader is used to render a given part of the scene.

                                                Must contain 0 as a value.

                                                uniformCountMacroName: string

                                                The name of the uniform int used in the code to refer to the number of drawables of this type.

                                                diff --git a/docs/interfaces/graphics_rendering_renderer_renderer.Renderer.html b/docs/interfaces/graphics_rendering_renderer_renderer.Renderer.html index fd4ae91..4f7cbc5 100644 --- a/docs/interfaces/graphics_rendering_renderer_renderer.Renderer.html +++ b/docs/interfaces/graphics_rendering_renderer_renderer.Renderer.html @@ -11,10 +11,10 @@ setViewArea worldToDisplayCoordinates

                                                Properties

                                                canvasSize: ReadonlyVec2

                                                Get the actual resolution of the canvas without triggering a reflow.

                                                -

                                                A ResizeObserver is utilised fot achieving this.

                                                +

                                                A ResizeObserver is used to achieve this.

                                                insights: RendererInfo | null

                                                Get useful information about the hardware and the SDF2D renderer.

                                                -

                                                Its scheme is subject to change.

                                                -

                                                During context lost it might be null.

                                                +

                                                Its schema is subject to change.

                                                +

                                                During a context-lost event, it might be null.

                                                viewAreaSize: ReadonlyVec2

                                                Get the viewArea size set by the last setViewArea.

                                                By default, canvasSize is used for the view area size.

                                                Methods

                                                • Schedule a drawable to be rendered during the next renderDrawables call.

                                                  @@ -34,7 +34,7 @@ Just as in mouse events' clientX and clientY.

                                                  when calling renderDrawables.

                                                  Returns void

                                                • Patch the current runtime settings with new values.

                                                  Parameters

                                                  Returns void

                                                • Set the camera transformation.

                                                  -

                                                  Parameters

                                                  • topLeft: ReadonlyVec2

                                                    top (!) left. By default, equals to [0, canvasHeight].

                                                    +

                                                    Parameters

                                                    • topLeft: ReadonlyVec2

                                                      top (!) left. By default, equal to [0, canvasHeight].

                                                    • size: ReadonlyVec2

                                                      need not be equal to the canvas size, though their aspect ratio should be the same to avoid stretching.

                                                    Returns void

                                                • The inverse of displayToWorldCoordinates, returns the screen space position diff --git a/docs/interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html b/docs/interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html index c5516e1..f38af0f 100644 --- a/docs/interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html +++ b/docs/interfaces/graphics_rendering_settings_runtime-settings.RuntimeSettings.html @@ -12,34 +12,34 @@ that can be changed during runtime.

                                                  textures tileMultiplier

                                                Properties

                                                ambientLight: vec3

                                                A light affecting every pixel (even the ones inside objects).

                                                -
                                                colorPalette: (
                                                    | IndexedCollection
                                                    | [number, number, number]
                                                    | [number, number, number, number]
                                                )[]

                                                Its length should be less than the one specified in [[StartupSettings]].paletteSize.

                                                -

                                                The possible colors for the objects. Each color is referenced by its index in the +

                                                colorPalette: (
                                                    | IndexedCollection
                                                    | [number, number, number]
                                                    | [number, number, number, number]
                                                )[]

                                                The possible colors for the objects. Each color is referenced by its index in the palette.

                                                -

                                                Can have transparency, but only if WebGL2 support is enabled.

                                                +

                                                Its length should be less than the paletteSize specified in [[StartupSettings]].

                                                +

                                                Colors can have transparency, but only if WebGL2 support is enabled.

                                                distanceRenderScale: number

                                                The resolution of the distance field rendering will be scaled up or down with this value.

                                                Because of interpolation, this can be set much lower than the lightsRenderScale, while maintaining closely the same perceived quality.

                                                Setting this is a great way to balance quality and performance.

                                                -
                                                enableHighDpiRendering: boolean

                                                When set to true rendering will be done on the screen's real resolution.

                                                +
                                                enableHighDpiRendering: boolean

                                                When set to true, rendering will be done at the screen's real resolution.

                                                isWorldInverted: boolean

                                                By default, every pixel is outside of objects. Flipping this value to true will -result in every pixel being inside a large object. From then it only makes sense to +result in every pixel being inside a large object. From then on, it only makes sense to draw inverted objects.

                                                -
                                                lightCutoffDistance: number

                                                When lights reach the end of the display, they are slowly faded out. The length -of this phaseout can be set through this value.

                                                +
                                                lightCutoffDistance: number

                                                When lights reach the edge of the display, they are slowly faded out. The length +of this fade-out can be set through this value.

                                                lightsRenderScale: number

                                                The resolution of the final frame will be scaled by this value.

                                                Setting this is a great way to balance quality and performance.

                                                motionBlur: number

                                                Set the extent of the motion blur.

                                                The values must be between 0 and 1. Where 0 means no motion blur, and values just below 1 mean an extreme amount of motion blur.

                                                textures: { [textureName: string]: TexImageSource | TextureWithOptions }

                                                It is possible to use your own textures in your SDF definitions.

                                                -

                                                The keys of the object should be the name used to reference them in the GLSL code, -and the values should be the textures themselves or a TextureWithOptions specifying +

                                                The keys of the object should be the names used to reference them in the GLSL code, +and the values should be the textures themselves, or a TextureWithOptions specifying the texture's [[TextureOptions]]. -It can be a canvas, img element, Image and so on.

                                                +A texture can be a canvas, an img element, an Image, and so on.

                                                tileMultiplier: number

                                                First, the SDF of the scene is evaluated at every single pixel. -For speeding this process up, the screen is divided up into tiles, -this way each having to deal with a fewer objects.

                                                -

                                                For each tile, it is decided which objects are near its close vicinity. +To speed this process up, the screen is divided into tiles, +so each one has to deal with fewer objects.

                                                +

                                                For each tile, it is decided which objects are in its vicinity. This comes with some overhead for the CPU, while saving the GPU from loads of calculations. The workload can be balanced between the CPU and the GPU by setting this number.

                                                diff --git a/docs/interfaces/graphics_rendering_settings_startup-settings.StartupSettings.html b/docs/interfaces/graphics_rendering_settings_startup-settings.StartupSettings.html index 8c96868..3f250e4 100644 --- a/docs/interfaces/graphics_rendering_settings_startup-settings.StartupSettings.html +++ b/docs/interfaces/graphics_rendering_settings_startup-settings.StartupSettings.html @@ -10,11 +10,11 @@ that need to be given before shader compilation.

                                                paletteSize shadowTraceCount

                                                Properties

                                                backgroundColor:
                                                    | IndexedCollection
                                                    | [number, number, number]
                                                    | [number, number, number, number]

                                                The default background color of the scene, can have transparency on every platform.

                                                -
                                                enableContextLostSimulator: boolean

                                                Many context lost event will be simulated when enabled.

                                                +
                                                enableContextLostSimulator: boolean

                                                Many context-lost events will be simulated when enabled.

                                                Useful for testing.

                                                enableStopwatch: boolean

                                                Creates a stopwatch used for measuring the GPU render time when its required extension is available.

                                                -

                                                You should only have one renderer with enabled stopwatch.

                                                +

                                                You should only have one renderer with the stopwatch enabled.

                                                ignoreWebGL2: boolean

                                                When set to true, rendering will fall back to WebGL even when WebGL2 is present.

                                                Useful for testing compatibility.

                                                @@ -35,5 +35,5 @@ maintaining compatibility with low-end devices.

                                                shadowTraceCount: number

                                                The raytracing algorithm used for shadows requires a step count. Sensible values for this are between 8 and 32.

                                                The higher the number, the harder the shadows will get. -Some ambient occlusion like effects can be visible on lower trace counts.

                                                +Some ambient-occlusion-like effects can be visible at lower trace counts.