diff --git a/common/src/app/common/data/macros.cljc b/common/src/app/common/data/macros.cljc index 2fdc9bc963..68ca35f2a5 100644 --- a/common/src/app/common/data/macros.cljc +++ b/common/src/app/common/data/macros.cljc @@ -17,7 +17,7 @@ (defmacro select-keys "A macro version of `select-keys`. Useful when keys vector is known - at compile time (aprox 600% performance boost). + at compile time (approx 600% performance boost). It is not 100% equivalent, this macro does not removes not existing keys in contrast to clojure.core/select-keys" diff --git a/common/src/app/common/files/changes.cljc b/common/src/app/common/files/changes.cljc index c9aa3d3faa..ab40ef06ab 100644 --- a/common/src/app/common/files/changes.cljc +++ b/common/src/app/common/files/changes.cljc @@ -1194,7 +1194,7 @@ ;; frames. Return the ids of the frames affected (defn- parents-frames - "Go trough the parents and get all of them that are a frame." + "Go through the parents and get all of them that are a frame." [id objects] (->> (cfh/get-parents-with-self objects id) (filter cfh/frame-shape?))) diff --git a/common/src/app/common/files/validate.cljc b/common/src/app/common/files/validate.cljc index d1979dd725..937e8340ca 100644 --- a/common/src/app/common/files/validate.cljc +++ b/common/src/app/common/files/validate.cljc @@ -591,7 +591,7 @@ -it should be a main component -its parent should be a variant-container -its variant-name is derived from the properties - -its name should be tha same as its parent's + -its name should be the same as its parent's " [shape file page] (let [parent (ctst/get-shape page (:parent-id shape)) @@ -707,7 +707,7 @@ (if (#{:main-top :main-nested :main-any} context) (report-error :not-component-not-allowed - "Not compoments are not allowed inside a main" + "Not components are not allowed inside a main" shape file page) (check-shape-not-component shape file page libraries))))))))) diff --git a/common/src/app/common/files/variant.cljc b/common/src/app/common/files/variant.cljc index e2378acbb0..91d05fd337 100644 --- a/common/src/app/common/files/variant.cljc +++ b/common/src/app/common/files/variant.cljc @@ -11,7 +11,7 @@ [app.common.types.variant :as ctv])) (defn find-variant-components - "Find a list of the components thet belongs to this variant-id" + "Find a list of the components that belongs to this variant-id" ([data variant-id] (let [page-id (->> data :components diff --git a/common/src/app/common/geom/modifiers.cljc b/common/src/app/common/geom/modifiers.cljc index 19f45dd0b2..484c2e277f 100644 --- a/common/src/app/common/geom/modifiers.cljc +++ b/common/src/app/common/geom/modifiers.cljc @@ -34,7 +34,7 @@ ;; modif-tree)))) (defn- set-children-modifiers - "Propagates the modifiers from a parent too its children applying constraints if necesary" + "Propagates the modifiers from a parent too its children applying constraints if necessary" [modif-tree children objects bounds parent transformed-parent-bounds ignore-constraints] (let [modifiers (dm/get-in modif-tree [(:id parent) :modifiers])] ;; Move modifiers don't need to calculate constraints diff --git a/common/src/app/common/geom/shapes/constraints.cljc b/common/src/app/common/geom/shapes/constraints.cljc index 95691b34e2..d34b82ab24 100644 --- a/common/src/app/common/geom/shapes/constraints.cljc +++ b/common/src/app/common/geom/shapes/constraints.cljc @@ -264,7 +264,7 @@ :scale))) (defn normalize-modifiers - "Before aplying constraints we need to remove the deformation caused by the resizing of the parent" + "Before applying constraints we need to remove the deformation caused by the resizing of the parent" [constraints-h constraints-v modifiers child-bounds transformed-child-bounds parent-bounds transformed-parent-bounds] diff --git a/common/src/app/common/geom/shapes/intersect.cljc b/common/src/app/common/geom/shapes/intersect.cljc index 76fe700c7b..a2b499f418 100644 --- a/common/src/app/common/geom/shapes/intersect.cljc +++ b/common/src/app/common/geom/shapes/intersect.cljc @@ -369,7 +369,7 @@ (defn line-line-intersect - "Calculates the interesection point for two lines given by the points a-b and b-c" + "Calculates the intersection point for two lines given by the points a-b and b-c" [a b c d] (let [;; Line equation representation: ax + by + c = 0 diff --git a/common/src/app/common/geom/shapes/points.cljc b/common/src/app/common/geom/shapes/points.cljc index 0a097de1a0..60a6cd19ca 100644 --- a/common/src/app/common/geom/shapes/points.cljc +++ b/common/src/app/common/geom/shapes/points.cljc @@ -31,21 +31,21 @@ (gpt/scale val))) (defn end-hv - "Horizontal vector from the oposite to the origin in the x axis with a magnitude `val`" + "Horizontal vector from the opposite to the origin in the x axis with a magnitude `val`" [[p0 p1 _ _] val] (-> (gpt/to-vec p1 p0) (gpt/unit) (gpt/scale val))) (defn start-vv - "Vertical vector from the oposite to the origin in the x axis with a magnitude `val`" + "Vertical vector from the opposite to the origin in the x axis with a magnitude `val`" [[p0 _ _ p3] val] (-> (gpt/to-vec p0 p3) (gpt/unit) (gpt/scale val))) (defn end-vv - "Vertical vector from the oposite to the origin in the x axis with a magnitude `val`" + "Vertical vector from the opposite to the origin in the x axis with a magnitude `val`" [[p0 _ _ p3] val] (-> (gpt/to-vec p3 p0) (gpt/unit) diff --git a/common/src/app/common/geom/shapes/transforms.cljc b/common/src/app/common/geom/shapes/transforms.cljc index 19386622c9..dc591576a5 100644 --- a/common/src/app/common/geom/shapes/transforms.cljc +++ b/common/src/app/common/geom/shapes/transforms.cljc @@ -283,7 +283,7 @@ [selrect transform (when (some? transform) (gmt/inverse transform))])) (defn- adjust-shape-flips - "After some tranformations the flip-x/flip-y flags can change we need + "After some transformations the flip-x/flip-y flags can change we need to check this before adjusting the selrect" [shape points] (let [points' (dm/get-prop shape :points) diff --git a/common/src/app/common/geom/shapes/tree_seq.cljc b/common/src/app/common/geom/shapes/tree_seq.cljc index 8ed6b61b8d..ed824dc484 100644 --- a/common/src/app/common/geom/shapes/tree_seq.cljc +++ b/common/src/app/common/geom/shapes/tree_seq.cljc @@ -90,7 +90,7 @@ child-seq))) (defn resolve-subtree - "Resolves the subtree but only partialy from-to the parameters" + "Resolves the subtree but only partially from-to the parameters" [from-id to-id objects] (concat (->> (get-children-seq from-id objects) diff --git a/common/src/app/common/types/component.cljc b/common/src/app/common/types/component.cljc index 1b5648804a..9323baed27 100644 --- a/common/src/app/common/types/component.cljc +++ b/common/src/app/common/types/component.cljc @@ -159,7 +159,7 @@ group))) (defn component-attr? - "Check if some attribute is one that is involved in component syncrhonization. + "Check if some attribute is one that is involved in component synchronization. Note that design tokens also are involved, although they go by an alternate route and thus they are not part of :sync-attrs. Also when detaching a nested copy it also needs to trigger a synchronization, diff --git a/common/src/app/common/types/container.cljc b/common/src/app/common/types/container.cljc index 7ae9e0e074..0495f7b050 100644 --- a/common/src/app/common/types/container.cljc +++ b/common/src/app/common/types/container.cljc @@ -405,7 +405,7 @@ (map remap-ids new-shapes)]))) (defn get-first-valid-parent - "Go trough the parents until we find a shape that is not a copy of a component nor + "Go through the parents until we find a shape that is not a copy of a component nor a variant container." [objects id] (let [shape (get objects id)] @@ -517,7 +517,7 @@ :any-main-descendant any-main-descendant})) (defn find-valid-parent-and-frame-ids - "Navigate trough the ancestors until find one that is valid. Returns [ parent-id frame-id ]" + "Navigate through the ancestors until find one that is valid. Returns [ parent-id frame-id ]" ([parent-id objects children] (find-valid-parent-and-frame-ids parent-id objects children false nil nil)) ([parent-id objects children pasting? libraries] diff --git a/common/src/app/common/types/objects_map.cljc b/common/src/app/common/types/objects_map.cljc index 3604961f11..ef7bce1014 100644 --- a/common/src/app/common/types/objects_map.cljc +++ b/common/src/app/common/types/objects_map.cljc @@ -8,10 +8,10 @@ "Implements a specialized map-like data structure for store an UUID => OBJECT mappings. The main purpose of this data structure is be able to serialize it on fressian as byte-array and have the ability to - decode each field separatelly without the need to decode the whole + decode each field separately without the need to decode the whole map from the byte-array. - It works transparently, so no aditional dynamic vars are needed. It + It works transparently, so no additional dynamic vars are needed. It only works by reference equality and the hash-code is calculated properly from each value." diff --git a/common/src/app/common/types/path/helpers.cljc b/common/src/app/common/types/path/helpers.cljc index 483fa60215..b5f5308207 100644 --- a/common/src/app/common/types/path/helpers.cljc +++ b/common/src/app/common/types/path/helpers.cljc @@ -10,7 +10,7 @@ This NS allows separate context-less/dependency-less helpers from other path related namespaces and make proper domain-specific - namespaces without incurrying on circular depedency cycles." + namespaces without incurrying on circular dependency cycles." (:require [app.common.data :as d] [app.common.data.macros :as dm] @@ -192,7 +192,7 @@ (defn solve-roots* "Solvers a quadratic or cubic equation given by the parameters a b c d. - Implemented as reduction algorithm (this helps implemement + Implemented as reduction algorithm (this helps implement derivative algorithms that does not require intermediate results thanks to transducers." [result conj a b c d] @@ -794,5 +794,3 @@ #_:else false))] (some inside-border? content))) - - diff --git a/common/src/app/common/types/shape.cljc b/common/src/app/common/types/shape.cljc index cef77122d8..409702cd01 100644 --- a/common/src/app/common/types/shape.cljc +++ b/common/src/app/common/types/shape.cljc @@ -729,7 +729,7 @@ (cond-> (ctsl/any-layout? shape) (extract-layout-attrs shape)))))) (defn patch-props - "Given the object of `extract-props` applies it to a shape. Adapt the shape if necesary" + "Given the object of `extract-props` applies it to a shape. Adapt the shape if necessary" [shape props objects] (letfn [(patch-text-props [shape props] diff --git a/common/src/app/common/types/token.cljc b/common/src/app/common/types/token.cljc index 31657983d3..937cb9f02d 100644 --- a/common/src/app/common/types/token.cljc +++ b/common/src/app/common/types/token.cljc @@ -20,7 +20,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defn- schema-keys - "Converts registed map schema into set of keys." + "Converts registered map schema into set of keys." [schema] (->> schema (sm/schema) @@ -42,7 +42,7 @@ (defn token-value-self-reference? "Check if the token is self referencing with its `token-name` in `token-value`. - Simple 1 level check, doesn't account for circular self refernces across multiple tokens." + Simple 1 level check, doesn't account for circular self references across multiple tokens." [token-name token-value] (let [token-references (find-token-value-references token-value) self-reference? (get token-references token-name)] diff --git a/common/src/app/common/types/tokens_lib.cljc b/common/src/app/common/types/tokens_lib.cljc index 8d203f92fe..f918d73c41 100644 --- a/common/src/app/common/types/tokens_lib.cljc +++ b/common/src/app/common/types/tokens_lib.cljc @@ -1435,7 +1435,7 @@ Will return a value that matches this schema: (d/oassoc data hidden-theme-name (make-hidden-theme)))))) (defn map->tokens-lib - "Make a new instance of TokensLib from a map, but skiping all + "Make a new instance of TokensLib from a map, but skipping all validation; it is used for create new instances from trusted sources" [& {:keys [sets themes active-themes]}] @@ -1552,7 +1552,7 @@ Will return a value that matches this schema: current-path: the path of the group being renamed, e.g. \"foo.bar\" current-name: the current name of the group being renamed, e.g. \"bar\" new-name: the new name for the group being renamed, e.g. \"baz\" - + Returns a sequence of [name token] for each renamed token." [active-tokens current-path current-name new-name] @@ -2222,7 +2222,7 @@ Will return a value that matches this schema: (get-themes tokens-lib))) (defn fix-duplicate-token-set-ids - "Given an instance of TokensLib fixes it internal sets data sturcture + "Given an instance of TokensLib fixes it internal sets data structure for ensure each set has unique id; Specific function for file data migrations" diff --git a/frontend/playwright/ui/specs/dashboard.spec.js b/frontend/playwright/ui/specs/dashboard.spec.js index 23e3b7a669..7b5df888d8 100644 --- a/frontend/playwright/ui/specs/dashboard.spec.js +++ b/frontend/playwright/ui/specs/dashboard.spec.js @@ -5,7 +5,7 @@ test.beforeEach(async ({ page }) => { await DashboardPage.init(page); }); -test("Dashboad page has title ", async ({ page }) => { +test("Dashboard page has title ", async ({ page }) => { const dashboardPage = new DashboardPage(page); await dashboardPage.goToDashboard(); diff --git a/frontend/src/app/main/errors.cljs b/frontend/src/app/main/errors.cljs index 4b5a0309f7..213cfe83fb 100644 --- a/frontend/src/app/main/errors.cljs +++ b/frontend/src/app/main/errors.cljs @@ -36,7 +36,7 @@ (defn is-plugin-error? "This is a placeholder that always return false. It will be overwritten when plugin system is initialized. This works this way - because we can't import plugins here because plugins requries full + because we can't import plugins here because plugins requires full DOM. This placeholder is set on app.plugins/initialize event" @@ -553,4 +553,3 @@ (fn [] (.removeEventListener g/window "error" on-unhandled-error) (.removeEventListener g/window "unhandledrejection" on-unhandled-rejection)))) - diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index a68f577b6b..b1fa9aa019 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -110,7 +110,7 @@ ;; DEPRECATED and all new code should not use it and old code should ;; be gradually migrated to more efficient approach (def libraries - "A derived state that contanins the currently loaded shared + "A derived state that contains the currently loaded shared libraries with all its content; including the current file" (l/derived (fn [state] (let [files (get state :files) diff --git a/frontend/src/app/render_wasm/shape.cljs b/frontend/src/app/render_wasm/shape.cljs index ac61bbac2e..e6bae46537 100644 --- a/frontend/src/app/render_wasm/shape.cljs +++ b/frontend/src/app/render_wasm/shape.cljs @@ -405,7 +405,7 @@ (= k :type)))))) (defn create-shape - "Instanciate a shape from a map" + "Instantiate a shape from a map" [attrs] (ShapeProxy. (:id attrs) (:type attrs) diff --git a/frontend/src/app/util/clipboard.cljs b/frontend/src/app/util/clipboard.cljs index 6f2d0046bf..fc136601f5 100644 --- a/frontend/src/app/util/clipboard.cljs +++ b/frontend/src/app/util/clipboard.cljs @@ -45,7 +45,7 @@ (from-data-transfer cdata options)))) (defn from-synthetic-clipboard-event - "Get clipboard stream from syntetic clipboard event" + "Get clipboard stream from synthetic clipboard event" ([event options] (let [target (dom/get-target event) diff --git a/frontend/src/app/util/shape_icon.cljs b/frontend/src/app/util/shape_icon.cljs index 3602d8d24c..e0844491da 100644 --- a/frontend/src/app/util/shape_icon.cljs +++ b/frontend/src/app/util/shape_icon.cljs @@ -57,7 +57,7 @@ "rectangle") :circle (if (cts/has-images? shape) "img" - "elipse") + "ellipse") :path (if (cts/has-images? shape) "img" "path") @@ -85,4 +85,3 @@ :mask "mask" :group "group" nil))) - diff --git a/frontend/test/frontend_tests/plugins/context_shapes_test.cljs b/frontend/test/frontend_tests/plugins/context_shapes_test.cljs index 5ae0b9b6dd..151a702b89 100644 --- a/frontend/test/frontend_tests/plugins/context_shapes_test.cljs +++ b/frontend/test/frontend_tests/plugins/context_shapes_test.cljs @@ -54,7 +54,7 @@ :stops [{:color "#b400ff" :opacity 1 :offset 0} {:color "#0c3fd5" :opacity 1 :offset 1}]}] - (t/testing "Basic shape properites" + (t/testing "Basic shape properties" (t/testing " - name" (set! (.-name shape) "TEST") (t/is (= (.-name shape) "TEST")) diff --git a/frontend/test/frontend_tests/util_simple_math_test.cljs b/frontend/test/frontend_tests/util_simple_math_test.cljs index eeae0ed40f..215287df07 100644 --- a/frontend/test/frontend_tests/util_simple_math_test.cljs +++ b/frontend/test/frontend_tests/util_simple_math_test.cljs @@ -47,7 +47,7 @@ (let [result (sm/expr-eval "*10" 20)] (t/is (= result 200)))) - (t/testing "Evaluate a negative number (not relative substraction)" + (t/testing "Evaluate a negative number (not relative subtraction)" (let [result (sm/expr-eval "-10" 20)] (t/is (= result -10)))) @@ -107,4 +107,3 @@ (t/testing "Partial invalid expression should return nil" (let [result (sm/expr-eval "10 + abc" 100)] (t/is (= result nil))))) - diff --git a/frontend/text-editor/src/editor/content/dom/Paragraph.test.js b/frontend/text-editor/src/editor/content/dom/Paragraph.test.js index 66886e4452..751c92ef1a 100644 --- a/frontend/text-editor/src/editor/content/dom/Paragraph.test.js +++ b/frontend/text-editor/src/editor/content/dom/Paragraph.test.js @@ -181,7 +181,7 @@ describe("Paragraph", () => { expect(isParagraphEnd(paragraph.firstElementChild.firstChild, 13)).toBeTruthy(); }); - test("isParagraphEnd should return false on a paragrah where the focus offset is inside", () => { + test("isParagraphEnd should return false on a paragraph where the focus offset is inside", () => { const paragraph = createParagraph([ createTextSpan(new Text("Lorem ipsum sit")), createTextSpan(new Text("amet")), diff --git a/frontend/text-editor/src/editor/content/dom/TextSpan.test.js b/frontend/text-editor/src/editor/content/dom/TextSpan.test.js index 1fc666fa69..36c248cf52 100644 --- a/frontend/text-editor/src/editor/content/dom/TextSpan.test.js +++ b/frontend/text-editor/src/editor/content/dom/TextSpan.test.js @@ -111,7 +111,7 @@ describe("TextSpan", () => { expect(getTextSpanLength(emptyTextSpan)).toBe(0); }); - test("splitTextSpan returns a new textSpan from the splitted textSpan", () => { + test("splitTextSpan returns a new textSpan from the split textSpan", () => { const textSpan = createTextSpan(new Text("Hello, World!")); const newTextSpan = splitTextSpan(textSpan, 5); expect(newTextSpan).toBeInstanceOf(HTMLSpanElement); diff --git a/frontend/text-editor/src/editor/controllers/SelectionController.test.js b/frontend/text-editor/src/editor/controllers/SelectionController.test.js index e549646039..533e4c751c 100644 --- a/frontend/text-editor/src/editor/controllers/SelectionController.test.js +++ b/frontend/text-editor/src/editor/controllers/SelectionController.test.js @@ -953,7 +953,7 @@ describe("SelectionController", () => { ); }); - test("`replaceTextSpans` should replace the selected text in multiple text spans (2 completelly selected)", () => { + test("`replaceTextSpans` should replace the selected text in multiple text spans (2 completely selected)", () => { const textEditorMock = TextEditorMock.createTextEditorMockWith([[ "Hello, ", "World!", @@ -1040,7 +1040,7 @@ describe("SelectionController", () => { ); }); - test("`replaceTextSpans` should replace the selected text in multiple text spans (1 partially selected, 1 completelly selected)", () => { + test("`replaceTextSpans` should replace the selected text in multiple text spans (1 partially selected, 1 completely selected)", () => { const textEditorMock = TextEditorMock.createTextEditorMockWith([[ "Hello, ", "World!", @@ -1082,7 +1082,7 @@ describe("SelectionController", () => { // FIXME: I don't know why but this test blocks all the tests. /* - test.skip("`replaceTextSpans` should replace the selected text in multiple text spans (1 completelly selected, 1 partially selected)", () => { + test.skip("`replaceTextSpans` should replace the selected text in multiple text spans (1 completely selected, 1 partially selected)", () => { const textEditorMock = TextEditorMock.createTextEditorMockWithParagraph([ createTextSpan(new Text("Hello, ")), createTextSpan(new Text("World!")), diff --git a/render-wasm/docs/serialization.md b/render-wasm/docs/serialization.md index 92d982b336..cde9915f8e 100644 --- a/render-wasm/docs/serialization.md +++ b/render-wasm/docs/serialization.md @@ -149,7 +149,7 @@ Stroke caps are serialized as `u8`: | 7 | Square | | \_ | None | -## Stroke Sytles +## Stroke Styles Stroke styles are serialized as `u8`: diff --git a/render-wasm/docs/tile_rendering.md b/render-wasm/docs/tile_rendering.md index 52b16bf5a8..baf09bd287 100644 --- a/render-wasm/docs/tile_rendering.md +++ b/render-wasm/docs/tile_rendering.md @@ -82,14 +82,14 @@ Once the tiles are determined, we sort them starting from the center of the view 2. The `TileViewbox` is updated based on the new `Viewbox` (visible area plus margins of interest). 3. The system identifies tiles that are currently visible (`visible_rect`) and tiles just outside the viewport for preloading (`interest_rect`). 4. For each visible tile: - - **If cached**: + - **If cached**: - Draw the cached rendered tile directly from `TileTextureCache` to `Surface::Target`. - **If not cached**: - Fetch intersecting shapes using `TileHashMap`. - - Render shape layers onto temporary surfaces: - - **Fills** → Shape fills - - **Strokes** → Outlines - - **Shadows** → Visual effects like drop or inner shadows to shapes + - Render shape layers onto temporary surfaces: + - **Fills** → Shape fills + - **Strokes** → Outlines + - **Shadows** → Visual effects like drop or inner shadows to shapes - **Current** → Composite tile layer (the final rendered tile before caching) - **Target** → Final canvas image where the composed tile is drawn; this is the surface ultimately displayed on screen after composing the tile layers. - Compose and cache the result using `cache_current_tile_texture(tile, image)`. @@ -132,7 +132,7 @@ When zooming or panning: > 💡 `visible_rect` stores the current set of tiles that intersect with the viewbox — that is, the exact area visible on screen, without any margin of interest. - These tiles are either: - - Pulled from the cache, or + - Pulled from the cache, or - Rendered from scratch if not already available. ### Handling Zoom and Scale @@ -181,28 +181,28 @@ Each rendering frame begins with the following inputs: - `Viewbox`: Defines the current viewport — the visible portion of the canvas, including zoom level and position. - `timestamp`: A time marker used for animations and time-based updates. -2. **Compute `TileViewbox`** +2. **Compute `TileViewbox`** - From `Viewbox`, generate visible + interest regions. -3. **Determine tiles to render** +3. **Determine tiles to render** - Compare tiles to be rendered vs cached ones. - Detect cache hits and misses. - Invalidate stale tiles if the viewport changed significantly. -4. **Render cached tiles** +4. **Render cached tiles** - Fetch image from `TileTextureCache`. - Blit to `Surface::Target`. -5. **Render uncached tiles from scratch** +5. **Render uncached tiles from scratch** - Find the shapes intersecting with this tile (`TileHashMap`). - Render the tile layers on their `skia::Surface` instances, using blending, opacity, masking, etc. when needed. - Each layer is rendered on a `skia::Surface`. - Use blending, opacity, masking, etc. - - Store the resulting texture in the cache: + - Store the resulting texture in the cache: `cache_current_tile_texture(tile, image)` - Draw the tile to `Surface::Target`. -6. **Handle user interactions** +6. **Handle user interactions** - When shapes are modified: 1. Determine affected tiles. 2. Invalidate those tiles in the cache. @@ -217,7 +217,7 @@ Each rendering frame begins with the following inputs: - **Avoid unnecessary re-renders**: A cache is used to avoid re-rendering when nothing has changed. - **Progressive**: Only visible/nearby tiles are drawn. - **Efficient**: Selective invalidation of cached tiles minimizes GPU/CPU usage on large documents. -- **Scalable with screen siz**: Works well for both small and large canvases due to tile granularity and smart caching. +- **Scalable with screen size**: Works well for both small and large canvases due to tile granularity and smart caching. ## References @@ -225,4 +225,4 @@ Each rendering frame begins with the following inputs: - [WebGL Best Practices](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices) - [When Optimisations Work, But for the Wrong Reasons](https://www.youtube.com/watch?v=hf27qsQPRLQ&ab_channel=SimonDev) - [Life of a Triangle](https://pixeljetstream.blogspot.com/2015/02/life-of-triangle-nvidias-logical.html) -- [A Trip Through the Graphics Pipeline 2011](https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/) \ No newline at end of file +- [A Trip Through the Graphics Pipeline 2011](https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/) diff --git a/render-wasm/src/globals.rs b/render-wasm/src/globals.rs index d2ed2196f6..83c6d35b4b 100644 --- a/render-wasm/src/globals.rs +++ b/render-wasm/src/globals.rs @@ -94,7 +94,7 @@ fn gpu_init() { fn render_init(width: i32, height: i32) { unsafe { let render_state = - RenderState::try_new(width, height).expect("Cannot intialize RenderState"); + RenderState::try_new(width, height).expect("Cannot initialize RenderState"); RENDER_STATE = Box::into_raw(Box::new(render_state)); } }