1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

modify components imports

This commit is contained in:
Kevin Levron 2021-04-24 22:48:46 +02:00
parent 6c02d46d42
commit dcd26ce880
12 changed files with 19 additions and 28 deletions

View File

@ -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({

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -1,5 +1,5 @@
import Stats from 'stats.js'
import { RendererInjectionKey } from '../../core/Renderer'
import { RendererInjectionKey } from '../../../build/trois.module.js'
export default {
props: {

View File

@ -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({

View File

@ -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({

View File

@ -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({

View File

@ -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({

View File

@ -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: {

View File

@ -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 },

View File

@ -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()
},