hrgdavor / jscadui

MIT License
30 stars 9 forks source link

feat-file-input #72

Closed hrgdavor closed 10 months ago

hrgdavor commented 10 months ago

file imput supprot for parameters, that reads file the same ways as require for different types of geometry.

example script:

import * as jscad from '@jscad/modeling'
export const main =({// @jscad-params
  mesh,// {type:"file"}
  check=false,
})=>{  
  return mesh ? mesh : jscad.primitives.sphere()
}

no file chosen, the sample script returns a sphere image

stl file, the sample script returns the geometry form the stl image