17 lines
757 B
TypeScript
17 lines
757 B
TypeScript
// src/types/global.d.ts
|
|
import * as THREE from 'three';
|
|
import { Object3DNode } from '@react-three/fiber';
|
|
|
|
declare global {
|
|
namespace JSX {
|
|
interface IntrinsicElements {
|
|
// Three.js 元素
|
|
mesh: Object3DNode<THREE.Mesh, typeof THREE.Mesh>;
|
|
boxGeometry: Object3DNode<THREE.BoxGeometry, typeof THREE.BoxGeometry>;
|
|
meshStandardMaterial: Object3DNode<THREE.MeshStandardMaterial, typeof THREE.MeshStandardMaterial>;
|
|
ambientLight: Object3DNode<THREE.AmbientLight, typeof THREE.AmbientLight>;
|
|
spotLight: Object3DNode<THREE.SpotLight, typeof THREE.SpotLight>;
|
|
meshBasicMaterial: Object3DNode<THREE.MeshBasicMaterial, typeof THREE.MeshBasicMaterial>;
|
|
}
|
|
}
|
|
} |