#
luxiaotao1123
2024-04-30 c723ad78c8ec058e44a6c4b245af2927ac69b249
src/components/shelf.jsx
@@ -16,6 +16,16 @@
        return useGLTF('/models/shelf/row.glb');
    }, [])
    const model = useMemo(() => {
        const fbx = useFBX('/models/shelf/row2.fbx');
        if (!fbx.castShadow) {
            Common.setShadow(fbx);
        }
        // Common.setColor(fbx)
        fbx.scale.set(MODEL_SHELF_SCALE * 1.5, MODEL_SHELF_SCALE, MODEL_SHELF_SCALE);
        return fbx.clone();
    }, [])
    useEffect(() => {
        state.shelfList[no] = position;
    }, [props]);
@@ -31,10 +41,12 @@
                    position={[0, 99, 0]}
                    scale={50000}
                /> */}
                <mesh position={[0, 100, 0]}>
                <primitive object={model} castShadow position={[0, 25, 0]} />
                {/* <mesh position={[0, 100, 0]}>
                    <boxGeometry args={[150, 200, 30]} />
                    <meshStandardMaterial color={'orange'} transparent={true} opacity={.5} />
                </mesh>
                </mesh> */}
                {/* <Box rotationY={0} position={[0, 0, 0]} /> */}
            </group>
        </>