-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
file imput supprot for parameters, that reads file the same ways as require for different types of geometry. example script: ```js 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](https://github.com/hrgdavor/jscadui/assets/2480762/54181e8c-64dc-47d7-bf0c-0b0ec0523389) stl file, the sample script returns the geometry form the stl ![image](https://github.com/hrgdavor/jscadui/assets/2480762/9a8a952e-0b1a-4ac1-8e6c-ae26f4ed0883)
- Loading branch information
Showing
5 changed files
with
48 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as jscad from '@jscad/modeling' | ||
|
||
export const main =({// @jscad-params | ||
mesh,// {type:"file"} | ||
check=false, | ||
})=>{ | ||
return mesh ? mesh : jscad.primitives.sphere() | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters