Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

fix/sphere-no-animation-path #117

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions ui/sphere/src/loader/loader.component.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { useGLTF } from '@react-three/drei'
import { useGLTF } from '@react-three/drei'

import React from 'react'
import { Suspense } from 'react'
import { FC } from 'react'
import { PropsWithChildren } from 'react'
import React from 'react'
import { Suspense } from 'react'
import { FC } from 'react'
import { PropsWithChildren } from 'react'

import { SphereNoAnimationGltf } from '../../assets'
import { CDN_SPHERE_PATH } from '../sphere.constants'
import { CDN_SPHERE_NO_ANIMATION_PATH } from '../sphere.constants'
import { CDN_SPHERE_PATH } from '../sphere.constants'

export const Loader: FC<PropsWithChildren<{}>> = ({ children }) => (
<Suspense fallback={null}>{children}</Suspense>
)

useGLTF.preload(CDN_SPHERE_PATH)
useGLTF.preload(SphereNoAnimationGltf)
useGLTF.preload(CDN_SPHERE_NO_ANIMATION_PATH)
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { useGLTF } from '@react-three/drei'
import { useGLTF } from '@react-three/drei'

import React from 'react'
import { FC } from 'react'
import { Group } from 'three'
import { useRef } from 'react'
import React from 'react'
import { FC } from 'react'
import { Group } from 'three'
import { useRef } from 'react'

import { SphereNoAnimationGltf } from '../../assets'
import { GLTFResult } from './model-no-animation.interfaces'
import { ModelProps } from './model-no-animation.interfaces'
import { CDN_SPHERE_NO_ANIMATION_PATH } from '../sphere.constants'
import { GLTFResult } from './model-no-animation.interfaces'
import { ModelProps } from './model-no-animation.interfaces'

export const ModelNoAnimation: FC<ModelProps> = (props) => {
const group = useRef<Group>(null)
const { nodes, materials } = useGLTF(SphereNoAnimationGltf, true) as unknown as GLTFResult
const { nodes, materials } = useGLTF(CDN_SPHERE_NO_ANIMATION_PATH, true) as unknown as GLTFResult

return (
<group ref={group} {...props} dispose={null}>
Expand Down
1 change: 1 addition & 0 deletions ui/sphere/src/sphere.constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const CDN_SPHERE_PATH = 'https://cdn.dream-team.tech/sphere.gltf'
export const CDN_SPHERE_NO_ANIMATION_PATH = 'https://cdn.dream-team.tech/sphere-no-animation.gltf'
Loading