first save
This commit is contained in:
17
src/types/three.d.ts
vendored
17
src/types/three.d.ts
vendored
@@ -0,0 +1,17 @@
|
||||
// src/types/three.d.ts
|
||||
import * as THREE from 'three';
|
||||
import { Object3DNode } from '@react-three/fiber';
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
// 使用大写开头的类名
|
||||
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>;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user