@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
75 lines (73 loc) • 3.07 kB
text/typescript
import {CameraSopNodeType, NodeContext} from '../../engine/poly/NodeContext';
import {AudioType} from '../../engine/poly/registers/nodes/types/Audio';
import {CopType, CopTypeImage} from '../../engine/poly/registers/nodes/types/Cop';
import {SopType, SopTypeFile, SopExporter, SopTypeFileMulti} from '../../engine/poly/registers/nodes/types/Sop';
import {
GeometryExtension,
AUDIO_EXTENSIONS,
ImageExtension,
SDF_EXTENSIONS,
VIDEO_EXTENSIONS,
FontExtension,
} from '../FileTypeController';
export const EXTENSIONS_BY_NODE_TYPE_BY_CONTEXT: Record<NodeContext, Record<string, string[]>> = {
[]: {},
[]: {
[]: [...AUDIO_EXTENSIONS],
},
// [NodeContext.CAD]: {},
[]: {
[]: [ImageExtension.PNG, ImageExtension.JPEG, ImageExtension.JPG, ImageExtension.WEBP],
[]: [ImageExtension.GIF],
[]: [ImageExtension.PNG, ImageExtension.JPEG, ImageExtension.JPG, ImageExtension.WEBP],
[]: [ImageExtension.EXR],
[]: [ImageExtension.HDR],
[]: [ImageExtension.KTX2],
[]: [ImageExtension.PNG],
[]: [...SDF_EXTENSIONS],
[]: [FontExtension.TTF],
[]: [...VIDEO_EXTENSIONS],
},
// [NodeContext.CSG]: {},
[]: {},
[]: {},
[]: {},
[]: {},
[]: {},
[]: {},
[]: {},
[]: {},
[]: {
[]: [
ImageExtension.PNG,
ImageExtension.JPEG,
ImageExtension.JPG,
ImageExtension.WEBP,
...VIDEO_EXTENSIONS,
],
[]: [GeometryExtension.STEP],
[]: [GeometryExtension.STEP],
[]: [GeometryExtension.JSON],
[]: [GeometryExtension.GLB],
[]: [GeometryExtension.OBJ],
[]: [GeometryExtension.PLY],
[]: [GeometryExtension.STL],
[]: [GeometryExtension.TDS],
[]: [GeometryExtension.GLB, GeometryExtension.GLTF],
[]: [GeometryExtension.DRC],
[]: [GeometryExtension.FBX],
[]: [GeometryExtension.GEOJSON],
[]: [GeometryExtension.JSON],
[]: [GeometryExtension.MPD],
[]: [GeometryExtension.GLTF, GeometryExtension.GLB],
[]: [GeometryExtension.OBJ],
[]: [GeometryExtension.OBJ],
[]: [GeometryExtension.PDB],
[]: [GeometryExtension.PLY],
[]: [GeometryExtension.STL],
[]: [GeometryExtension.SVG],
[]: [GeometryExtension.USDZ],
[]: [GeometryExtension.VOX],
[]: [FontExtension.TTF, FontExtension.JSON],
},
};