From b995e62742311d9eff62a15fb37046b49b2b2fe0 Mon Sep 17 00:00:00 2001 From: frankieali Date: Wed, 8 Jun 2022 13:12:47 -0400 Subject: [PATCH] fix spelling --- src/{WorldFacad.js => WorldFacade.js} | 16 ++++++++-------- src/components/Dice.js | 2 +- src/components/world.offscreen.js | 4 ++-- src/index.js | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) rename src/{WorldFacad.js => WorldFacade.js} (97%) diff --git a/src/WorldFacad.js b/src/WorldFacade.js similarity index 97% rename from src/WorldFacad.js rename to src/WorldFacade.js index 27fd373..0b791ca 100644 --- a/src/WorldFacad.js +++ b/src/WorldFacade.js @@ -19,7 +19,7 @@ const defaultOptions = { suspendSimulation: false } -class WorldFacad { +class WorldFacade { rollCollectionData = {} rollGroupData = {} rollDiceData = {} @@ -67,7 +67,7 @@ class WorldFacad { // Load the BabylonJS World async #loadWorld(){ - // set up a promise to be fullfilled when a message comes back from DiceWorld indicating init is complete + // set up a promise to be fulfilled when a message comes back from DiceWorld indicating init is complete this.#diceWorldPromise = new Promise((resolve, reject) => { this.#diceWorldResolve = resolve }) @@ -78,7 +78,7 @@ class WorldFacad { } if ("OffscreenCanvas" in window && "transferControlToOffscreen" in this.canvas && this.config.offscreen) { - // Ok to use offscreen canvas - transfer controll offscreen + // Ok to use offscreen canvas - transfer control offscreen const WorldOffscreen = await import('./components/world.offscreen').then(module => module.default) // WorldOffscreen is just a container class that passes all method calls to the Offscreen Canvas worker this.#DiceWorld = new WorldOffscreen({ @@ -91,7 +91,7 @@ class WorldFacad { console.warn("This browser does not support OffscreenCanvas. Using standard canvas fallback.") this.config.offscreen = false } - // code splitting out WorldOnscreen. It's esentially the same as offscreenCanvas.worker.js but communicates with the main thread differently + // code splitting out WorldOnscreen. It's essentially the same as offscreenCanvas.worker.js but communicates with the main thread differently const WorldOnscreen = await import('./components/world.onscreen').then(module => module.default) this.#DiceWorld = new WorldOnscreen({ canvas: this.canvas, @@ -105,7 +105,7 @@ class WorldFacad { #loadPhysics(){ // initialize physics world in which AmmoJS runs this.#DicePhysics = new physicsWorker() - // set up a promise to be fullfilled when a message comes back from physics.worker indicating init is complete + // set up a promise to be fulfilled when a message comes back from physics.worker indicating init is complete this.#dicePhysicsPromise = new Promise((resolve, reject) => { this.#dicePhysicsResolve = resolve }) @@ -130,7 +130,7 @@ class WorldFacad { // create message channel for the visual world and the physics world to communicate through this.#DiceWorld.connect(channel.port1) - // create message channel for this WorldFacad class to communicate with physics world + // create message channel for this WorldFacade class to communicate with physics world this.#DicePhysics.postMessage({ action: "connect" },[ channel.port2 ]) @@ -607,7 +607,7 @@ class WorldFacad { } // verify that the rollId is unique. If not then increment it by .1 - // rollIds become keys in the rollDiceData object, so they must be unique or they will overright another entry + // rollIds become keys in the rollDiceData object, so they must be unique or they will overwrite another entry const verifyRollId = ( object ) => { if(object.hasOwnProperty('rollId')){ if(this.rollDiceData.hasOwnProperty(object.rollId)){ @@ -731,4 +731,4 @@ class Collection{ } } -export default WorldFacad \ No newline at end of file +export default WorldFacade \ No newline at end of file diff --git a/src/components/Dice.js b/src/components/Dice.js index 16d7b11..efd6688 100644 --- a/src/components/Dice.js +++ b/src/components/Dice.js @@ -142,7 +142,7 @@ class Dice { model.freezeWorldMatrix() model.isPickable = false model.doNotSyncBoundingInfo = true - // prefix all the meshs ids from this file with the file name so we can find them later e.g.: 'default-dice_d10' and 'default-dice_d10_collider' + // prefix all the meshes ids from this file with the file name so we can find them later e.g.: 'default-dice_d10' and 'default-dice_d10_collider' // model.id = meshName + '_' + model.id model.name = meshName + '_' + model.name }) diff --git a/src/components/world.offscreen.js b/src/components/world.offscreen.js index 645894b..6eddf77 100644 --- a/src/components/world.offscreen.js +++ b/src/components/world.offscreen.js @@ -1,4 +1,4 @@ -import worldWorker from './offscreenCanvas.worker?worker&inline' // using vits.js worker import - this will be compiled away +import worldWorker from './offscreenCanvas.worker?worker&inline' // using vite.js worker import - this will be compiled away class WorldOffScreen { initialized = false @@ -30,7 +30,7 @@ class WorldOffScreen { // initialize the babylon scene async #initScene(config) { - // initalize the offscreen worker + // initialize the offscreen worker this.#OffscreenWorker.postMessage({ action: "init", canvas: this.#offscreenCanvas, diff --git a/src/index.js b/src/index.js index 89cbfa1..e587aa2 100644 --- a/src/index.js +++ b/src/index.js @@ -1 +1 @@ -export { default } from "./WorldFacad" \ No newline at end of file +export { default } from "./WorldFacade" \ No newline at end of file