diff --git a/src/components/liquid/LiquidPlane.js b/src/components/liquid/LiquidPlane.js index e65eead..a8ed59a 100644 --- a/src/components/liquid/LiquidPlane.js +++ b/src/components/liquid/LiquidPlane.js @@ -1,7 +1,6 @@ import { defineComponent, watch } from 'vue' import { DoubleSide, Mesh, MeshStandardMaterial, PlaneGeometry } from 'three' -import Object3D from '../../core/Object3D' -import { bindProps } from '../../tools' +import { bindProps, Object3D } from '../../../build/trois.module.js' import LiquidEffect from './LiquidEffect.js' export default defineComponent({ diff --git a/src/components/meshes/Gem.js b/src/components/meshes/Gem.js index d7efed7..71e37bf 100644 --- a/src/components/meshes/Gem.js +++ b/src/components/meshes/Gem.js @@ -8,8 +8,8 @@ import { RGBFormat, WebGLCubeRenderTarget, } from 'three' -import Mesh from '../../meshes/Mesh' -import { bindProp } from '../../tools' + +import { bindProp, Mesh } from '../../../build/trois.module.js' export default defineComponent({ extends: Mesh, diff --git a/src/components/meshes/MirrorMesh.js b/src/components/meshes/MirrorMesh.js index 203d422..39d780c 100644 --- a/src/components/meshes/MirrorMesh.js +++ b/src/components/meshes/MirrorMesh.js @@ -5,7 +5,8 @@ import { RGBFormat, WebGLCubeRenderTarget, } from 'three' -import Mesh from '../../meshes/Mesh' + +import { Mesh } from '../../../build/trois.module.js' export default defineComponent({ extends: Mesh, diff --git a/src/components/meshes/RefractionMesh.js b/src/components/meshes/RefractionMesh.js index ad4df31..093563e 100644 --- a/src/components/meshes/RefractionMesh.js +++ b/src/components/meshes/RefractionMesh.js @@ -6,8 +6,8 @@ import { RGBFormat, WebGLCubeRenderTarget, } from 'three' -import Mesh from '../../meshes/Mesh' -import { bindProp } from '../../tools' + +import { bindProp, Mesh } from '../../../build/trois.module.js' export default defineComponent({ extends: Mesh, diff --git a/src/components/misc/Stats.js b/src/components/misc/Stats.js index 29ddffa..cfed43f 100644 --- a/src/components/misc/Stats.js +++ b/src/components/misc/Stats.js @@ -1,5 +1,5 @@ import Stats from 'stats.js' -import { RendererInjectionKey } from '../../core/Renderer' +import { RendererInjectionKey } from '../../../build/trois.module.js' export default { props: { diff --git a/src/components/noisy/NoisyImage.js b/src/components/noisy/NoisyImage.js index e6e353f..d6ddb1e 100644 --- a/src/components/noisy/NoisyImage.js +++ b/src/components/noisy/NoisyImage.js @@ -1,5 +1,5 @@ import { defineComponent, watch } from 'vue' -import Image from '../../meshes/Image' +import { Image } from '../../../build/trois.module.js' import snoise2 from '../../glsl/snoise2.glsl.js' export default defineComponent({ diff --git a/src/components/noisy/NoisyPlane.js b/src/components/noisy/NoisyPlane.js index cf99fc4..4691f8a 100644 --- a/src/components/noisy/NoisyPlane.js +++ b/src/components/noisy/NoisyPlane.js @@ -1,7 +1,7 @@ import { defineComponent, watch } from 'vue' import { ObjectSpaceNormalMap, ShaderMaterial, Vector2, WebGLRenderTarget } from 'three' import { Pass } from 'three/examples/jsm/postprocessing/Pass.js' -import Plane from '../../meshes/Plane' +import { Plane } from '../../../build/trois.module.js' import snoise3 from '../../glsl/snoise3.glsl.js' export default defineComponent({ diff --git a/src/components/noisy/NoisySphere.js b/src/components/noisy/NoisySphere.js index 0bf5a5f..adbb13f 100644 --- a/src/components/noisy/NoisySphere.js +++ b/src/components/noisy/NoisySphere.js @@ -1,5 +1,5 @@ import { defineComponent, watch } from 'vue' -import Sphere from '../../meshes/Sphere' +import { Sphere } from '../../../build/trois.module.js' import snoise4 from '../../glsl/snoise4.glsl.js' export default defineComponent({ diff --git a/src/components/noisy/NoisyText.js b/src/components/noisy/NoisyText.js index 1cb22df..5469c64 100644 --- a/src/components/noisy/NoisyText.js +++ b/src/components/noisy/NoisyText.js @@ -1,5 +1,5 @@ import { defineComponent, watch } from 'vue' -import Text from '../../meshes/Text' +import { Text } from '../../../build/trois.module.js' import snoise2 from '../../glsl/snoise2.glsl.js' export default defineComponent({ diff --git a/src/components/physics/CannonWorld.js b/src/components/physics/CannonWorld.js index 68f415e..4e2a287 100644 --- a/src/components/physics/CannonWorld.js +++ b/src/components/physics/CannonWorld.js @@ -1,7 +1,6 @@ import { defineComponent } from 'vue' import useCannon from './useCannon.js' -import { RendererInjectionKey } from '../../core/Renderer' -import { SceneInjectionKey } from '../../core/Scene' +import { RendererInjectionKey, SceneInjectionKey } from '../../../build/trois.module.js' export default defineComponent({ inject: { diff --git a/src/components/sliders/Slider1.vue b/src/components/sliders/Slider1.vue index f7ab32c..767093c 100644 --- a/src/components/sliders/Slider1.vue +++ b/src/components/sliders/Slider1.vue @@ -11,13 +11,8 @@ import { defineComponent } from 'vue' import { Object3D } from 'three' import { gsap, Power4 } from 'gsap' -import Camera from '../../core/PerspectiveCamera' -import Renderer from '../../core/Renderer' -import Scene from '../../core/Scene' - -import { lerp } from '../../tools' +import { lerp, useTextures, Camera, Renderer, Scene } from '../../../build/trois.module.js' import AnimatedPlane from './AnimatedPlane.js' -import useTextures from '../../use/useTextures' export default defineComponent({ components: { Camera, Renderer, Scene }, diff --git a/src/components/sliders/Slider2.vue b/src/components/sliders/Slider2.vue index 8994a84..3aabcfa 100644 --- a/src/components/sliders/Slider2.vue +++ b/src/components/sliders/Slider2.vue @@ -10,13 +10,8 @@ import { defineComponent } from 'vue' import { Vector2 } from 'three' import { gsap, Power4 } from 'gsap' -import OrthographicCamera from '../../core/OrthographicCamera' -import Renderer from '../../core/Renderer' -import Scene from '../../core/Scene' - -import { lerp, lerpv2 } from '../../tools' +import { lerp, useTextures, OrthographicCamera, Renderer, Scene } from '../../../build/trois.module.js' import ZoomBlurImage from './ZoomBlurImage.js' -import useTextures from '../../use/useTextures' export default defineComponent({ components: { OrthographicCamera, Renderer, Scene }, @@ -88,8 +83,10 @@ export default defineComponent({ animate() { const { positionN } = this.renderer.three.pointer this.center.copy(positionN).divideScalar(2).addScalar(0.5) - lerpv2(this.image1.uCenter.value, this.center, 0.1) - lerpv2(this.image2.uCenter.value, this.center, 0.1) + this.image1.uCenter.value.lerp(this.center, 0.1) + this.image2.uCenter.value.lerp(this.center, 0.1) + // lerpv2(this.image1.uCenter.value, this.center, 0.1) + // lerpv2(this.image2.uCenter.value, this.center, 0.1) this.updateProgress() },