Skip to content

Commit 60337e0

Browse files
authored
fix: update packages (#69)
updated storybook to use latest three and added typescript fixes
1 parent 92ddad6 commit 60337e0

23 files changed

+87
-112
lines changed

.storybook/stories/AccumulativeShadows.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import GUI from 'lil-gui'
44
import { Meta } from '@storybook/html'
5-
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader'
6-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
5+
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader.js'
6+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
77

88
import { ProgressiveLightMap, SoftShadowMaterial } from '../../src/core/AccumulativeShadows'
99

.storybook/stories/Billboard.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import { Meta } from '@storybook/html'
4-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
4+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
55
import { GUI } from 'lil-gui'
66
import { Billboard, BillboardProps, BillboardType } from '../../src/core/Billboard'
77

.storybook/stories/Caustics.stories.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import { Meta } from '@storybook/html'
4-
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader'
5-
import { GroundProjectedSkybox } from 'three/examples/jsm/objects/GroundProjectedSkybox'
6-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
4+
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader.js'
5+
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js'
6+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
77

88
import { GUI } from 'lil-gui'
99
import { Caustics, CausticsType } from '../../src/core/Caustics'
@@ -76,10 +76,10 @@ const setupEnvironment = (scene: THREE.Scene) => {
7676
exrLoader.load('round_platform_1k.exr', (exrTex) => {
7777
exrTex.mapping = THREE.EquirectangularReflectionMapping
7878
scene.environment = exrTex
79-
// scene.background = exrTex
79+
scene.background = exrTex
8080

81-
const groundProjection = new GroundProjectedSkybox(exrTex)
82-
groundProjection.scale.setScalar(100)
81+
const groundProjection = new GroundedSkybox(exrTex, 5, 50)
82+
groundProjection.position.set(0, 5, 0)
8383
scene.add(groundProjection)
8484
})
8585
}
@@ -107,7 +107,7 @@ const setupCaustics = (scene: THREE.Scene, renderer: THREE.WebGLRenderer) => {
107107
caustics.helper.visible = false // start hidden
108108
scene.add(caustics.group, caustics.helper)
109109

110-
caustics.group.position.y = 0.001 // to prevent z-fighting with groundProjectedSkybox
110+
caustics.group.position.y = 0.001 // to prevent z-fighting with GroundedSkybox
111111

112112
caustics.scene.add(torusMesh)
113113

.storybook/stories/Clouds.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import GUI from 'lil-gui'
44
import { Meta } from '@storybook/html'
5-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
5+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
66
import { CLOUD_URL, Clouds, Cloud } from '../../src/core/Cloud'
77

88
export default {

.storybook/stories/Grid.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import { Meta } from '@storybook/html'
4-
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader'
5-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
4+
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader.js'
5+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
66

77
import { GUI } from 'lil-gui'
88
import { Grid, GridType } from '../../src/core/Grid'

.storybook/stories/MeshDistortMaterial.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import GUI from 'lil-gui'
44
import { Meta } from '@storybook/html'
5-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
5+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
66
import { MeshDistortMaterial } from '../../src/materials/MeshDistortMaterial'
77

88
export default {

.storybook/stories/MeshReflectorMaterial.stories.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import GUI from 'lil-gui'
44
import { Meta } from '@storybook/html'
5-
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader'
6-
import { GroundProjectedSkybox } from 'three/examples/jsm/objects/GroundProjectedSkybox'
7-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
5+
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader.js'
6+
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js'
7+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
88
import { MeshReflectorMaterial } from '../../src/materials/MeshReflectorMaterial'
99
import { BlurPass } from '../../src/materials/BlurPass'
1010

@@ -91,10 +91,10 @@ const setupEnvironment = () => {
9191
exrLoader.load('dancing_hall_1k.exr', (exrTex) => {
9292
exrTex.mapping = THREE.EquirectangularReflectionMapping
9393
scene.environment = exrTex
94-
// scene.background = exrTex
94+
scene.background = exrTex
9595

96-
const groundProjection = new GroundProjectedSkybox(exrTex)
97-
groundProjection.scale.setScalar(100)
96+
const groundProjection = new GroundedSkybox(exrTex, 10, 50)
97+
groundProjection.position.set(0, 10, 0)
9898
scene.add(groundProjection)
9999

100100
const envParams = {

.storybook/stories/MeshTransmissionMaterial.stories.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import GUI from 'lil-gui'
44
import { Meta } from '@storybook/html'
5-
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader'
6-
import { GroundProjectedSkybox } from 'three/examples/jsm/objects/GroundProjectedSkybox'
7-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
5+
import { EXRLoader } from 'three/examples/jsm/loaders/EXRLoader.js'
6+
import { GroundedSkybox } from 'three/examples/jsm/objects/GroundedSkybox.js'
7+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
88

99
import { MeshTransmissionMaterial } from '../../src/materials/MeshTransmissionMaterial'
1010
import { MeshDiscardMaterial } from '../../src/materials/MeshDiscardMaterial'
@@ -66,10 +66,10 @@ const setupEnvironment = () => {
6666
exrLoader.load('round_platform_1k.exr', (exrTex) => {
6767
exrTex.mapping = THREE.EquirectangularReflectionMapping
6868
scene.environment = exrTex
69-
// scene.background = exrTex
69+
scene.background = exrTex
7070

71-
const groundProjection = new GroundProjectedSkybox(exrTex)
72-
groundProjection.scale.setScalar(100)
71+
const groundProjection = new GroundedSkybox(exrTex, 10, 50)
72+
groundProjection.position.set(0, 10, 0)
7373
scene.add(groundProjection)
7474
})
7575
}

.storybook/stories/MeshWobbleMaterial.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import GUI from 'lil-gui'
44
import { Meta } from '@storybook/html'
5-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
5+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
66
import { MeshWobbleMaterial } from '../../src/materials/MeshWobbleMaterial'
77

88
export default {

.storybook/stories/Outlines.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as THREE from 'three'
22
import { Setup } from '../Setup'
33
import { Meta } from '@storybook/html'
4-
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
4+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
55
import { GUI } from 'lil-gui'
66
import { Outlines, OutlinesType } from '../../src/core/Outlines'
77

0 commit comments

Comments
 (0)