paradise _hope

paradise _hope

Пікірлер

  • @SarfarazKhan-ot9jr
    @SarfarazKhan-ot9jr4 сағат бұрын

    Beshak

  • @sohailahmed-vx2jt
    @sohailahmed-vx2jt5 сағат бұрын

    Allah hidayat ata farma

  • @TARJAN6286
    @TARJAN628613 сағат бұрын

    ❤❤❤❤

  • @farahumer3327
    @farahumer332723 сағат бұрын

    Subhanalahh

  • @mohdasif3964
    @mohdasif3964Күн бұрын

    Ali imran 101.103

  • @JamshadNwaz-bp8ug
    @JamshadNwaz-bp8ugКүн бұрын

    Beshak allahu akber

  • @user-bt9qm6rl8b
    @user-bt9qm6rl8bКүн бұрын

    Beshaq

  • @fariarafi9019
    @fariarafi9019Күн бұрын

    Subhan Allah❤

  • @v.r.kudale4055
    @v.r.kudale4055Күн бұрын

    Thank you very much for your very detailed information video. It has helped me a lot to make a project without micro controllers.

  • @paradise_hope
    @paradise_hopeКүн бұрын

    Welcome sir 🙏❤️

  • @paradise_hope
    @paradise_hopeКүн бұрын

    If u need any place let me know

  • @user-sl3yu3pq7g
    @user-sl3yu3pq7gКүн бұрын

    Beshak❤

  • @sherzaman4905
    @sherzaman4905Күн бұрын

    Mashallah

  • @sherzaman4905
    @sherzaman4905Күн бұрын

    Subhanallah

  • @sherzaman4905
    @sherzaman4905Күн бұрын

    Bashk

  • @user-gi5le8bp2u
    @user-gi5le8bp2uКүн бұрын

    Baisak

  • @GauravChandra-yi6ug
    @GauravChandra-yi6ugКүн бұрын

    Jai shree ram

  • @ajaygaming2381
    @ajaygaming2381Күн бұрын

    Jai shree Ram 😊😊😊

  • @roneykhan9382
    @roneykhan93822 күн бұрын

    Beshak

  • @nahidislam5817
    @nahidislam58172 күн бұрын

    Allah hukbar 😊😢

  • @user-qj7ys4bn1x
    @user-qj7ys4bn1x2 күн бұрын

    Beshaq ALLAH HU AKBAR ❤❤❤

  • @Hotwonder12345
    @Hotwonder123452 күн бұрын

    Subhanallah

  • @user-ni7lb6lo6j
    @user-ni7lb6lo6j2 күн бұрын

    😢😢😢😢😢😢😢😢😢😢

  • @shaikhsaad8460
    @shaikhsaad84602 күн бұрын

    SUBHANALLAH

  • @imranpasha9471
    @imranpasha94712 күн бұрын

    Allha allha allha allha allha allha allha allha allha allha allha ❤❤

  • @RashidKhan-bg4cn
    @RashidKhan-bg4cn2 күн бұрын

    अलहम्दो लिल्लाह।

  • @BeautifulReligionIslam
    @BeautifulReligionIslam2 күн бұрын

    Beshak❤❤

  • @mansurshaikh9865
    @mansurshaikh98652 күн бұрын

    Beshak

  • @user-xs3qk1tp7i
    @user-xs3qk1tp7i2 күн бұрын

    Subhanallah

  • @user-xs3qk1tp7i
    @user-xs3qk1tp7i2 күн бұрын

    Subhanallah

  • @Siluvan6906
    @Siluvan69062 күн бұрын

    Dont make fool, your Allah is just a stone deity kept in the khaba. Shame on u

  • @shakeelahmadahmad4187
    @shakeelahmadahmad41873 күн бұрын

    Beshaq

  • @paradise_hope
    @paradise_hope3 күн бұрын

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Simple Babylon.js Scene</title> <style> body { margin: 0; overflow: hidden; } canvas { width: 100%; height: 100%; display: block; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script src="cdn.jsdelivr.net/npm/[email protected]/babylon.min.js"></script> <script> // Get the canvas element const canvas = document.getElementById('renderCanvas'); // Create the Babylon.js engine const engine = new BABYLON.Engine(canvas, true); // Create a basic scene const createScene = function() { // Create a new scene const scene = new BABYLON.Scene(engine); // Create a camera and set its position const camera = new BABYLON.ArcRotateCamera( 'camera1', Math.PI / 2, Math.PI / 4, 10, BABYLON.Vector3.Zero(), scene ); camera.attachControl(canvas, true); // Create a basic light const light = new BABYLON.HemisphericLight( 'light1', new BABYLON.Vector3(1, 1, 0), scene ); light.intensity = 0.7; // Create a sphere const sphere = BABYLON.MeshBuilder.CreateSphere('sphere', { diameter: 2 }, scene); // Set the position of the sphere sphere.position = new BABYLON.Vector3(2, 1, 0); // x, y, z coordinates // Create a ground plane const ground = BABYLON.MeshBuilder.CreateGround('ground', { width: 6, height: 6 ,depth: 100}, scene); ground.position.y = -1 // Rotate the sphere continuously scene.registerBeforeRender(function() { sphere.rotation.y += 0.01; }); return scene; }; // Create the scene const scene = createScene(); // Render loop engine.runRenderLoop(function() { scene.render(); }); // Resize event handler window.addEventListener('resize', function() { engine.resize(); }); </script> </body> </html> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Simple Babylon.js Scene</title> <style> body { margin: 0; overflow: hidden; } canvas { width: 100%; height: 100%; display: block; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script src="cdn.jsdelivr.net/npm/[email protected]/babylon.min.js"></script> <script> // Get the canvas element const canvas = document.getElementById('renderCanvas'); // Create the Babylon.js engine const engine = new BABYLON.Engine(canvas, true); // Create a basic scene const createScene = function() { // Create a new scene const scene = new BABYLON.Scene(engine); // Create a camera and set its position const camera = new BABYLON.ArcRotateCamera( 'camera1', Math.PI / 2, Math.PI / 4, 10, BABYLON.Vector3.Zero(), scene ); camera.attachControl(canvas, true); // Create a basic light const light = new BABYLON.HemisphericLight( 'light1', new BABYLON.Vector3(1, 1, 0), scene ); light.intensity = 0.7; // Create a sphere const sphere = BABYLON.MeshBuilder.CreateSphere('sphere', { diameter: 2 }, scene); // Set the position of the sphere sphere.position = new BABYLON.Vector3(2, 1, 0); // x, y, z coordinates // Create a ground plane const ground = BABYLON.MeshBuilder.CreateGround('ground', { width: 6, height: 6 ,depth: 100}, scene); ground.position.y = -1 // Rotate the sphere continuously scene.registerBeforeRender(function() { sphere.rotation.y += 0.01; }); return scene; }; // Create the scene const scene = createScene(); // Render loop engine.runRenderLoop(function() { scene.render(); }); // Resize event handler window.addEventListener('resize', function() { engine.resize(); }); </script> </body> </html>

  • @zackcreator4563
    @zackcreator456316 күн бұрын

    Thanks

  • @paradise_hope
    @paradise_hope16 күн бұрын

    Welcome 🙏

  • @levalsevan7
    @levalsevan716 күн бұрын

    hello bro plzz reply

  • @paradise_hope
    @paradise_hope16 күн бұрын

    Hello

  • @levalsevan7
    @levalsevan716 күн бұрын

    @@paradise_hope bro ek help chahiye aapse

  • @paradise_hope
    @paradise_hope16 күн бұрын

    @levalsevan7 tell me

  • @levalsevan7
    @levalsevan716 күн бұрын

    @@paradise_hope reply bro

  • @paradise_hope
    @paradise_hope16 күн бұрын

    Bolo bhai

  • @ramelectricalautomation1668
    @ramelectricalautomation1668Ай бұрын

    Hi

  • @paradise_hope
    @paradise_hopeАй бұрын

    Hey

  • @ramelectricalautomation1668
    @ramelectricalautomation1668Ай бұрын

    @@paradise_hope contact number

  • @ramelectricalautomation1668
    @ramelectricalautomation1668Ай бұрын

    @@paradise_hope contact number

  • @paradise_hope
    @paradise_hopeАй бұрын

    7486882890

  • @luisdelaa2226
    @luisdelaa2226Ай бұрын

    Solución efectiva 100%, gracias

  • @paradise_hope
    @paradise_hopeАй бұрын

    Thanks 🙏

  • @BeingNoobYT
    @BeingNoobYTАй бұрын

    Can i order from Nepal

  • @paradise_hope
    @paradise_hopeАй бұрын

    Yes

  • @colsanjaybajpai5747
    @colsanjaybajpai5747Ай бұрын

    Incomprehensible content

  • @paradise_hope
    @paradise_hopeАй бұрын

    Completed

  • @paradise_hope
    @paradise_hopeАй бұрын

    import { OrbitControls, useAnimations, useGLTF } from "@react-three/drei"; import { Physics, RigidBody } from "@react-three/rapier"; import { useEffect, useRef } from "react"; import { Canvas } from "react-three-fiber"; import * as THREE from 'three' import React from "react"; import { useFrame } from "react-three-fiber"; import { useBox } from "@react-three/rapier"; import { useState } from "react"; import { useRapier, Collider } from "@react-three/rapier"; function Box(props) { const meshRef = useRef(); const [position, setPosition] = useState([0, 0, 0]); // Use useFrame to animate the mesh useFrame(() => { if (meshRef.current) { meshRef.current.position.set(...position); } }); // Event listener for keyboard input const handleKeyDown = (event) => { const speed = 0.1; // Adjust as needed switch (event.key) { case 'w': setPosition([position[0], position[1], position[2] - speed]); break; case 'a': setPosition([position[0] - speed, position[1], position[2]]); break; case 's': setPosition([position[0], position[1], position[2] + speed]); break; case 'd': setPosition([position[0] + speed, position[1], position[2]]); break; default: break; } }; // Attach event listener when the component mounts React.useEffect(() => { window.addEventListener('keydown', handleKeyDown); return () => { window.removeEventListener('keydown', handleKeyDown); }; }, [position]); return ( <mesh {...props} ref={meshRef}> <boxGeometry args={[1, 1, 1]} /> <meshBasicMaterial color="blue" /> </mesh> ); } const Scene = () => { const { scene, animations } = useGLTF('./hallwb.glb'); const group = useRef(); const { actions } = useAnimations(animations, group); return ( <group> <Physics debug color="red"> <RigidBody type="fixed" colliders="trimesh"> <Box/> <primitive object={scene} ref={group} /> </RigidBody> </Physics> </group> ); }; const App = () => { return ( <Canvas style={{height:"100vh"}}> <OrbitControls/> <Scene/> </Canvas> ); }; export default App;

  • @paradise_hope
    @paradise_hopeАй бұрын

    import { OrbitControls, useAnimations, useGLTF } from "@react-three/drei"; import { Physics, RigidBody } from "@react-three/rapier"; import { useEffect, useRef } from "react"; import { Canvas } from "react-three-fiber"; const Scene = () => { const { scene, animations } = useGLTF('./hallwb.glb'); const group = useRef(); const { actions } = useAnimations(animations, group); return ( <group> <Physics debug color="red"> <RigidBody type="fixed" colliders="trimesh"> <primitive object={scene} ref={group} /> </RigidBody> </Physics> </group> ); }; const App = () => { return ( <Canvas style={{height:"100vh"}}> <OrbitControls/> <Scene/> </Canvas> ); }; export default App;

  • @na7la-135
    @na7la-135Ай бұрын

    thx

  • @paradise_hope
    @paradise_hopeАй бұрын

    App.js ................................................................................................................................................ import { useRef, Suspense } from "react"; import { Text3D, OrbitControls, Center, Stars, Float, Sparkles, useMatcapTexture } from "@react-three/drei"; import { Canvas, useThree } from "@react-three/fiber"; import { Physics } from "@react-three/cannon"; function Hero() { const [matcapTexture] = useMatcapTexture("CB4E88_F99AD6_F384C3_ED75B9"); const ref = useRef(); const { width: w, height: h } = useThree((state) => state.viewport); return ( <> <Center scale={[0.9, 1, 1]}> <Physics gravity={1}> <Float speed={1}> <Text3D position={[0, 0, -10]} scale={[-1, 1, 1]} ref={ref} size={w / 9} maxWidth={[-w / 5, -h * 2, 3]} font={"/gt.json"} curveSegments={24} brevelSegments={1} bevelEnabled bevelSize={0.08} bevelThickness={0.03} height={1} lineHeight={0.9} letterSpacing={0.3} > PARADISE HOPE <meshMatcapMaterial color="white" matcap={matcapTexture} /> </Text3D> </Float> </Physics> </Center> </> ); } function App() { return ( <div className="scene"> <Canvas camera={{ position: [0, 0, -10], fov: 60 }}> <OrbitControls enableZoom={true} autoRotate={true} autoRotateSpeed={-0.1} enablePan={true} azimuth={[-Math.PI / 4, Math.PI / 4]} zoomSpeed={0.15} dampingFactor={0.05} /> <Suspense fallback={"Loading"}> <Stars radius={100} depth={100} count={4000} factor={4} saturation={0} fade speed={0.2} /> <Sparkles count={300} size={3} speed={0.02} opacity={1} scale={10} color="#fff3b0" /> <Hero /> </Suspense> <ambientLight intensity={0.6} color={"#dee2ff"} /> </Canvas> </div> ); } export default App

  • @paradise_hope
    @paradise_hopeАй бұрын

    import { useEffect, useRef, useState } from 'react' import { Canvas, useFrame } from '@react-three/fiber' import { OrbitControls, useAnimations, useGLTF } from '@react-three/drei' function Box(props) { // This reference gives us direct access to the THREE.Mesh object const ref = useRef() // Hold state for hovered and clicked events const [hovered, hover] = useState(false) const [clicked, click] = useState(false) // Subscribe this component to the render-loop, rotate the mesh every frame useFrame((state, delta) => (ref.current.rotation.x += delta)) // Return the view, these are regular Threejs elements expressed in JSX return ( <mesh {...props} ref={ref} scale={clicked ? 2 : 1} onClick={(event) => click(!clicked)} onPointerOver={(event) => (event.stopPropagation(), hover(true))} onPointerOut={(event) => hover(false)}> <boxGeometry args={[1, 1, 1]} /> <meshStandardMaterial color={hovered ? 'hotpink' : 'orange'} /> </mesh> ) } const Character = () => { const [hovered, hover] = useState(false) const [clicked, click] = useState(false) //const { scene, animations } = useGLTF('/SuitMan.glb'); const ref =useRef() const { scene, animations } = useGLTF('/SM.glb'); const { actions } = useAnimations(animations, ref); console.log("actions animation",actions) useFrame((state, delta) => { console.log("useFram runing....".hovered) if(clicked){ actions.Walking.play() } else{ actions.Walking.stop() } if(hovered){ actions.Jumping.play() } else{ actions.Jumping.stop() } }); useEffect(()=>{ console.log("clicked",clicked) },[clicked]) return( <> {scene && ( <mesh scale={clicked ? 2 : 1} onClick={(event) => click(!clicked)} onPointerOver={(event) => (event.stopPropagation(), hover(true))} onPointerOut={(event) => (event.stopPropagation(),hover(false))}> <meshStandardMaterial color={hovered ? 'red' : 'orange'} /> <primitive object={scene} ref={(node) => { ref.current = node; // Assign to physics ref // Assign to animation ref }}/> </mesh> )} </> ) } export default function App() { return ( <Canvas style={{height:"100vh"}}> <ambientLight intensity={Math.PI / 2} /> <spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} decay={0} intensity={Math.PI} /> <pointLight position={[-10, -10, -10]} decay={0} intensity={Math.PI} /> <Box position={[-1.2, 0, 0]} /> <Box position={[1.2, 0, 0]} /> <Character/> <OrbitControls /> </Canvas> ) }

  • @paradise_hope
    @paradise_hopeАй бұрын

    //mode1.jsx --------> here i m usinf useAnimation hook to play animation // Scene.js import React, { useRef } from 'react'; import { useLoader, useFrame } from '@react-three/fiber'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; import * as THREE from 'three' import { Canvas } from '@react-three/fiber'; import { OrbitControls, useAnimations } from '@react-three/drei'; const Scene = () => { const modelRef=useRef() const { scene, animations } = useLoader(GLTFLoader, '/SM.glb'); const { actions } = useAnimations(animations, modelRef); console.log("actions animation",actions) useFrame((state, delta) => { //console.log("useFram runing....") actions.Running.play() //actions.walking.play() }); return ( <primitive object={scene} ref={modelRef}/> ); }; export default Scene

  • @paradise_hope
    @paradise_hopeАй бұрын

    model.jsx ------------------------> here i m using Animation Mixer Class // Scene.js import React, { useRef,useEffect } from 'react'; import { useLoader, useFrame } from '@react-three/fiber'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; import * as THREE from 'three' import { Canvas } from '@react-three/fiber'; import { OrbitControls, useAnimations } from '@react-three/drei'; const Scene = () => { const group = useRef(); const { nodes, materials, animations } = useLoader(GLTFLoader, '/SuitMan.glb'); console.log("animations",animations) const mixer = useRef(); // Create a mixer to manage animations // Play all animations on component mount useEffect(() => { if (animations && animations.length) { mixer.current = new THREE.AnimationMixer(group.current); animations.forEach((clip) => { mixer.current.clipAction(clip); }); } return () => { mixer.current && mixer.current.stopAllAction(); }; }, [animations]); useFrame((state, delta) => { if (mixer.current) mixer.current.update(delta); }); // Function to play animation by name const playAnimationByName = (animationName) => { if (mixer.current && animations) { const clip = animations.find((clip) => clip.name === animationName); if (clip) { mixer.current.stopAllAction(); mixer.current.clipAction(clip).play(); } } }; // Example of playing an animation by name (you can trigger this based on your app logic) React.useEffect(() => { playAnimationByName("Jumping"); // Replace with actual animation name }, []); return ( <group ref={group}> <primitive object={nodes.Scene} /> {/* Add more primitives or adjust scene as needed */} </group> ); }; export default Scene import { Canvas } from "@react-three/fiber"; import { OrbitControls } from '@react-three/drei'; import Scene from "./Model"; const App = () => { return ( <Canvas style={{height:"100vh"}}> <ambientLight intensity={3}/> <OrbitControls/> <ambientLight intensity={0.5} /> <spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} /> <Scene /> </Canvas> ); }; export default App;

  • @paradise_hope
    @paradise_hopeАй бұрын

    mode1.jsx --------> here i m usinf useAnimation hook to play animation // Scene.js import React, { useRef } from 'react'; import { useLoader, useFrame } from '@react-three/fiber'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; import * as THREE from 'three' import { Canvas } from '@react-three/fiber'; import { OrbitControls, useAnimations } from '@react-three/drei'; const Scene = () => { const modelRef=useRef() const { scene, animations } = useLoader(GLTFLoader, '/Soldier.glb'); const { actions } = useAnimations(animations, modelRef); console.log("actions animation",actions) useFrame((state, delta) => { //console.log("useFram runing....") actions.Walk.play() }); return ( <primitive object={scene} ref={modelRef}/> ); }; export default Scene import { Canvas } from "@react-three/fiber"; import { OrbitControls } from '@react-three/drei'; import Scene from "./Model1"; const App = () => { return ( <Canvas style={{height:"100vh"}}> <ambientLight intensity={3}/> <OrbitControls/> <ambientLight intensity={0.5} /> <spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} /> <Scene /> </Canvas> ); }; export default App;

  • @paradise_hope
    @paradise_hopeАй бұрын

    import React, { Suspense, useRef, useEffect } from 'react'; import { Canvas, useFrame } from '@react-three/fiber'; import { useGLTF, Html, useAnimations, Grid } from '@react-three/drei'; import * as THREE from 'three' import { useProgress } from '@react-three/drei'; import { OrbitControls } from '@react-three/drei'; const Loading = () => { const { progress } = useProgress(); return <Html><h1>Loading {progress.toFixed(2)} %</h1></Html>; }; const Character=()=>{ const {scene,animations} = useGLTF('/Soldier.glb'); const group=useRef() const modelRef = useRef(); const { actions } = useAnimations(animations, modelRef); console.log("Action",actions) //const {actions,name}=useAnimations(animations,group) const [movementSpeed, setMovementSpeed] = React.useState(0.01); // Adjust movement speed as needed useFrame(()=>{ //actions.Idle.play() }) const handleKeyDown = (event) => { switch (event.key.toLowerCase()) { case 'w': actions.Walk.play() modelRef.current.position.z -= movementSpeed; break; case 's': actions.Walk.play() modelRef.current.position.z += movementSpeed; break; case 'a': actions.Walk.play() modelRef.current.position.x -= movementSpeed; break; case 'd': actions.Walk.play() modelRef.current.position.x += movementSpeed; break; default: break; } }; const handleKeyUp = (event) => { switch (event.key.toLowerCase()) { case 'w': case 's': case 'a': case 'd': actions.Walk.stop(); break; default: break; } }; useEffect(() => { actions.Idle.play() window.addEventListener('keydown', handleKeyDown); window.addEventListener('keyup',handleKeyUp) return () => { window.removeEventListener('keydown', handleKeyDown); window.addEventListener('keyup',handleKeyUp) }; }, []); return(<> {scene && ( <primitive object={scene} ref={modelRef} /> )} </>) } const ModelViewer = () => { return ( <Canvas> <ambientLight intensity={5}/> <OrbitControls/> <Suspense fallback={<Loading />}> <ambientLight intensity={0.5} /> <pointLight position={[10, 10, 10]} /> <Character/> </Suspense> </Canvas> ); }; export default ModelViewer;

  • @paradise_hope
    @paradise_hopeАй бұрын

    import React, { Suspense, useRef, useEffect } from 'react'; import { Canvas } from '@react-three/fiber'; import { useGLTF, Html } from '@react-three/drei'; import * as THREE from 'three' import { useProgress } from '@react-three/drei'; const Loading = () => { const { progress } = useProgress(); return <Html><h1>Loading {progress.toFixed(2)} %</h1></Html>; }; const ModelViewer = () => { const gltf = useGLTF('/Soldier.glb'); const modelRef = useRef(); const [movementSpeed, setMovementSpeed] = React.useState(0.1); const handleKeyDown = (event) => { switch (event.key.toLowerCase()) { case 'w': modelRef.current.position.z -= movementSpeed; break; case 's': modelRef.current.position.z += movementSpeed; break; case 'a': modelRef.current.position.x -= movementSpeed; break; case 'd': modelRef.current.position.x += movementSpeed; break; default: break; } }; useEffect(() => { window.addEventListener('keydown', handleKeyDown); return () => { window.removeEventListener('keydown', handleKeyDown); }; }, []); return ( <Canvas> <Suspense fallback={<Loading />}> <ambientLight intensity={0.5} /> <pointLight position={[10, 10, 10]} /> {gltf.scene && ( <primitive object={gltf.scene} ref={modelRef} /> )} </Suspense> </Canvas> ); }; export default ModelViewer;

  • @paradise_hope
    @paradise_hopeАй бұрын

    // src/ModelViewer.js import React,{ useRef} from 'react'; import { Canvas } from '@react-three/fiber'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; import { Suspense } from 'react'; import { Html, useGLTF, useProgress } from '@react-three/drei'; import { useFrame } from '@react-three/fiber'; // please correct your modal path /* const Model = () => { const gltf = useGLTF('/Soldier.glb'); return <primitive object={gltf.scene} position={[0, 0, 0]} // Example position rotation={[0, Math.PI / 2, 0]} // Example rotation (Y-axis) scale={[1, 1, 1]} // Example scale (optional) /> }; */ const Model = () => { const gltf = useGLTF('/Soldier.glb'); const modelRef = useRef(); // Animate the model useFrame(() => { // Example rotation animation (rotates around Y-axis) modelRef.current.rotation.y += 0.01; }); return <primitive object={gltf.scene} ref={modelRef} />; }; const Loading = () => { const { progress } = useProgress(); return <Html><h1>Loading {progress} %</h1>;</Html> }; const ModelViewer = () => { return ( <Canvas> <Suspense fallback={<Loading />}> <ambientLight /> <pointLight position={[10, 10, 10]} /> <Model /> </Suspense> </Canvas> ); }; export default ModelViewer;

  • @paradise_hope
    @paradise_hopeАй бұрын

    // src/ModelViewer.js import React from 'react'; import { Canvas } from '@react-three/fiber'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; import { Suspense } from 'react'; import { Html, useGLTF, useProgress } from '@react-three/drei'; // please correct your modal path const Model = () => { const gltf = useGLTF('/hall.glb'); return <primitive object={gltf.scene} />; }; const Loading = () => { const { progress } = useProgress(); return <Html><h1>Loading {progress} %</h1>;</Html> }; const ModelViewer = () => { return ( <Canvas> <Suspense fallback={<Loading />}> <ambientLight /> <pointLight position={[10, 10, 10]} /> <Model /> </Suspense> </Canvas> ); }; export default ModelViewer;