Jump to content
Search Community

sandeepdev

Members
  • Posts

    4
  • Joined

  • Last visited

sandeepdev's Achievements

  1. Yea thank you so much fo your help, its working now if i use immediateRender: false, and delay: 0.01,the other 3d models are working fine normally just this one is odd...
  2. My bad i guess..my communication isn't good. goes through this video - https://www.veed.io/view/42dedbd3-0853-418b-83de-75ccb4dba21a?panel=share&sharingWidget=true This is what im trying to do....
  3. I'm just trying to simple animation of can landing from y position 10 to its initial position between the text,when i save my code initially it works,but once i start reloading in browser,its initial position becomes y position so it goes down.... https://stackblitz.com/~/github.com/Sandeep18JS/OakHaven-Beer, 76643cc0-631f-40fa-a8a5-8713ea619b9e.mp4
  4. import React, { useRef } from 'react' import { useGLTF } from '@react-three/drei' import gsap from 'gsap' import { useGSAP } from '@gsap/react'; export function BeerCan(props) { const { nodes, materials } = useGLTF('/beercannew.glb') const canRef = useRef(null) useGSAP(() => { let ctx = gsap.context(() => { gsap.from(canRef.current.position, { y: 10, duration: 1, }) }) return () => ctx.revert() }, []) return ( <group ref={canRef} position={[-0.829, 4.1, -4.274]} rotation={[-0.1, 1.35, 0]} scale={[1.11, 2.0, 1.11]}> <mesh geometry={nodes.Cylinder_1.geometry} material={materials['top of can']} /> <mesh geometry={nodes.Cylinder_2.geometry} material={materials.image} /> </group> ) } useGLTF.preload('/beercannew.glb'),once i save it ,it works well,but after i reload my page it takes previous position as initial position
×
×
  • Create New...