Skip to content

Commit

Permalink
fix: clouds- rename updateClouds to updateCloud (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
vis-prime authored Mar 20, 2024
1 parent 2fe8204 commit 499108b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .storybook/stories/Clouds.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 2 additions & 2 deletions src/core/Cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export class Cloud extends Group {
this.ref = this

this.cloudStateArray = []
this.updateClouds()
this.updateCloud()
}

/**
Expand Down Expand Up @@ -326,7 +326,7 @@ export class Cloud extends Group {
}
}

updateClouds() {
updateCloud() {
const {
volume,
color,
Expand Down

0 comments on commit 499108b

Please sign in to comment.