import functionCodePoint from '@/examples/point-function.js?raw'
import functionCodeLine from '@/examples/line-function.js?raw'
import functionCodePlane from '@/examples/plane-function.js?raw'

import functionCodeRain from '@/examples/rain-function.js?raw'
import functionCodeSnow from '@/examples/snow-function.js?raw'

const functionCodeMap = {
    点: functionCodePoint,
    多线: functionCodeLine,
    多面: functionCodePlane,

    雨: functionCodeRain,
    雪: functionCodeSnow
}

export function findFunctionCodeById(id){
    if(!functionCodeMap.hasOwnProperty(id)){
        throw new Error(`${id}不存在`);
    } 
    return functionCodeMap[id]
}