/
githubmirror
/
anime
Обзор
Документация
Войти
/
githubmirror
/
anime
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/adapters/three/adapter.js
15 строк
631 B
Julian Garnier
4.5.0
22 июн 2026, 17:32
22 июн 2026, 17:32
34f4179
Код
Авторство
О чём код?
import { registerAdapter } from '../registry.js'; // Duck-typed gate for three.js targets, used as threeAdapter's Adapter-level detect. // Early-rejects DOM nodes via nodeType so the OR chain only runs on non-DOM objects. // Includes the isAnimejsInstanceProxy marker set in instance.js for per-instance wrappers. const isThreeTarget = (t) => !!( t && !t.nodeType && ( t.isObject3D || t.isMaterial || t.isTexture || t.isFog || t.isFogExp2 || t.isUniformNode || t.isColor || t.isVector2 || t.isVector3 || t.isVector4 || t.isAnimejsInstanceProxy ) ); export const threeAdapter = registerAdapter(isThreeTarget);