From 499108bcbbbd68fe520af0c32adecca50da25268 Mon Sep 17 00:00:00 2001 From: VishaL <119810373+vis-prime@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:54:16 +0530 Subject: [PATCH] fix: clouds- rename updateClouds to updateCloud (#57) --- .storybook/stories/Clouds.stories.ts | 2 +- README.md | 5 +++-- src/core/Cloud.ts | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.storybook/stories/Clouds.stories.ts b/.storybook/stories/Clouds.stories.ts index 7254c6b..771ae04 100644 --- a/.storybook/stories/Clouds.stories.ts +++ b/.storybook/stories/Clouds.stories.ts @@ -139,7 +139,7 @@ const addCloudGui = (cloud: Cloud) => { const fol = gui.addFolder('Edit: ' + cloud.name) // during runtime call "cloud.updateCloud()" after changing any cloud property - fol.onChange(() => cloud.updateClouds()) + fol.onChange(() => cloud.updateCloud()) fol.addColor(cloud, 'color') fol.add(cloud, 'seed', 0, 100, 1) diff --git a/README.md b/README.md index e6d6fda..b88e65f 100644 --- a/README.md +++ b/README.md @@ -423,8 +423,9 @@ clouds = new Clouds({ texture: cloudTexture }) scene.add(clouds) // create cloud and add it to clouds group -cloud0 = new Cloud() -clouds.add(cloud0) +cloud_0 = new Cloud() +clouds.add(cloud_0) +// call "cloud_0.updateCloud()" after changing any cloud parameter to see latest changes // call in animate loop clouds.update(camera, clock.getElapsedTime(), clock.getDelta()) diff --git a/src/core/Cloud.ts b/src/core/Cloud.ts index 676eeb9..5586226 100644 --- a/src/core/Cloud.ts +++ b/src/core/Cloud.ts @@ -288,7 +288,7 @@ export class Cloud extends Group { this.ref = this this.cloudStateArray = [] - this.updateClouds() + this.updateCloud() } /** @@ -326,7 +326,7 @@ export class Cloud extends Group { } } - updateClouds() { + updateCloud() { const { volume, color,