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:
parent
6c02d46d42
commit
dcd26ce880
@ -1,7 +1,6 @@
|
|||||||
import { defineComponent, watch } from 'vue'
|
import { defineComponent, watch } from 'vue'
|
||||||
import { DoubleSide, Mesh, MeshStandardMaterial, PlaneGeometry } from 'three'
|
import { DoubleSide, Mesh, MeshStandardMaterial, PlaneGeometry } from 'three'
|
||||||
import Object3D from '../../core/Object3D'
|
import { bindProps, Object3D } from '../../../build/trois.module.js'
|
||||||
import { bindProps } from '../../tools'
|
|
||||||
import LiquidEffect from './LiquidEffect.js'
|
import LiquidEffect from './LiquidEffect.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -8,8 +8,8 @@ import {
|
|||||||
RGBFormat,
|
RGBFormat,
|
||||||
WebGLCubeRenderTarget,
|
WebGLCubeRenderTarget,
|
||||||
} from 'three'
|
} from 'three'
|
||||||
import Mesh from '../../meshes/Mesh'
|
|
||||||
import { bindProp } from '../../tools'
|
import { bindProp, Mesh } from '../../../build/trois.module.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
extends: Mesh,
|
extends: Mesh,
|
||||||
|
@ -5,7 +5,8 @@ import {
|
|||||||
RGBFormat,
|
RGBFormat,
|
||||||
WebGLCubeRenderTarget,
|
WebGLCubeRenderTarget,
|
||||||
} from 'three'
|
} from 'three'
|
||||||
import Mesh from '../../meshes/Mesh'
|
|
||||||
|
import { Mesh } from '../../../build/trois.module.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
extends: Mesh,
|
extends: Mesh,
|
||||||
|
@ -6,8 +6,8 @@ import {
|
|||||||
RGBFormat,
|
RGBFormat,
|
||||||
WebGLCubeRenderTarget,
|
WebGLCubeRenderTarget,
|
||||||
} from 'three'
|
} from 'three'
|
||||||
import Mesh from '../../meshes/Mesh'
|
|
||||||
import { bindProp } from '../../tools'
|
import { bindProp, Mesh } from '../../../build/trois.module.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
extends: Mesh,
|
extends: Mesh,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Stats from 'stats.js'
|
import Stats from 'stats.js'
|
||||||
import { RendererInjectionKey } from '../../core/Renderer'
|
import { RendererInjectionKey } from '../../../build/trois.module.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, watch } from 'vue'
|
import { defineComponent, watch } from 'vue'
|
||||||
import Image from '../../meshes/Image'
|
import { Image } from '../../../build/trois.module.js'
|
||||||
import snoise2 from '../../glsl/snoise2.glsl.js'
|
import snoise2 from '../../glsl/snoise2.glsl.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { defineComponent, watch } from 'vue'
|
import { defineComponent, watch } from 'vue'
|
||||||
import { ObjectSpaceNormalMap, ShaderMaterial, Vector2, WebGLRenderTarget } from 'three'
|
import { ObjectSpaceNormalMap, ShaderMaterial, Vector2, WebGLRenderTarget } from 'three'
|
||||||
import { Pass } from 'three/examples/jsm/postprocessing/Pass.js'
|
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'
|
import snoise3 from '../../glsl/snoise3.glsl.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, watch } from 'vue'
|
import { defineComponent, watch } from 'vue'
|
||||||
import Sphere from '../../meshes/Sphere'
|
import { Sphere } from '../../../build/trois.module.js'
|
||||||
import snoise4 from '../../glsl/snoise4.glsl.js'
|
import snoise4 from '../../glsl/snoise4.glsl.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, watch } from 'vue'
|
import { defineComponent, watch } from 'vue'
|
||||||
import Text from '../../meshes/Text'
|
import { Text } from '../../../build/trois.module.js'
|
||||||
import snoise2 from '../../glsl/snoise2.glsl.js'
|
import snoise2 from '../../glsl/snoise2.glsl.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
import useCannon from './useCannon.js'
|
import useCannon from './useCannon.js'
|
||||||
import { RendererInjectionKey } from '../../core/Renderer'
|
import { RendererInjectionKey, SceneInjectionKey } from '../../../build/trois.module.js'
|
||||||
import { SceneInjectionKey } from '../../core/Scene'
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
inject: {
|
inject: {
|
||||||
|
@ -11,13 +11,8 @@ import { defineComponent } from 'vue'
|
|||||||
import { Object3D } from 'three'
|
import { Object3D } from 'three'
|
||||||
import { gsap, Power4 } from 'gsap'
|
import { gsap, Power4 } from 'gsap'
|
||||||
|
|
||||||
import Camera from '../../core/PerspectiveCamera'
|
import { lerp, useTextures, Camera, Renderer, Scene } from '../../../build/trois.module.js'
|
||||||
import Renderer from '../../core/Renderer'
|
|
||||||
import Scene from '../../core/Scene'
|
|
||||||
|
|
||||||
import { lerp } from '../../tools'
|
|
||||||
import AnimatedPlane from './AnimatedPlane.js'
|
import AnimatedPlane from './AnimatedPlane.js'
|
||||||
import useTextures from '../../use/useTextures'
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { Camera, Renderer, Scene },
|
components: { Camera, Renderer, Scene },
|
||||||
|
@ -10,13 +10,8 @@ import { defineComponent } from 'vue'
|
|||||||
import { Vector2 } from 'three'
|
import { Vector2 } from 'three'
|
||||||
import { gsap, Power4 } from 'gsap'
|
import { gsap, Power4 } from 'gsap'
|
||||||
|
|
||||||
import OrthographicCamera from '../../core/OrthographicCamera'
|
import { lerp, useTextures, OrthographicCamera, Renderer, Scene } from '../../../build/trois.module.js'
|
||||||
import Renderer from '../../core/Renderer'
|
|
||||||
import Scene from '../../core/Scene'
|
|
||||||
|
|
||||||
import { lerp, lerpv2 } from '../../tools'
|
|
||||||
import ZoomBlurImage from './ZoomBlurImage.js'
|
import ZoomBlurImage from './ZoomBlurImage.js'
|
||||||
import useTextures from '../../use/useTextures'
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { OrthographicCamera, Renderer, Scene },
|
components: { OrthographicCamera, Renderer, Scene },
|
||||||
@ -88,8 +83,10 @@ export default defineComponent({
|
|||||||
animate() {
|
animate() {
|
||||||
const { positionN } = this.renderer.three.pointer
|
const { positionN } = this.renderer.three.pointer
|
||||||
this.center.copy(positionN).divideScalar(2).addScalar(0.5)
|
this.center.copy(positionN).divideScalar(2).addScalar(0.5)
|
||||||
lerpv2(this.image1.uCenter.value, this.center, 0.1)
|
this.image1.uCenter.value.lerp(this.center, 0.1)
|
||||||
lerpv2(this.image2.uCenter.value, 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()
|
this.updateProgress()
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user