jscad parameters default values and float type #582

Merged
hrgdavor merged 1 commits from fix-getParameterDefinitions into main 2022-01-08 20:32:32 +01:00
hrgdavor commented 2021-12-26 22:50:52 +01:00 (Migrated from github.com)

float type was missing from jscad params parser, so even the basic getParameterDefinitions example from jscad docs did not work.

Also parser was sending empty parameters object when customizer is closed, and it is wrong to do so if the parameters have a defined initial value.

`float` type was missing from jscad params parser, so even the basic getParameterDefinitions example from jscad docs did not work. Also parser was sending empty parameters object when customizer is closed, and it is wrong to do so if the parameters have a defined initial value.
Irev-Dev (Migrated from github.com) reviewed 2022-01-07 22:52:24 +01:00
@@ -317,3 +317,3 @@
const makeScriptWorker = ({ callback, convertToSolids }) => {
let onInit, main, scriptStats, entities
let onInit, main, scriptStats, entities, lastParamsDef
Irev-Dev (Migrated from github.com) commented 2022-01-07 22:52:24 +01:00

Should jscad handle a missing param and use the scripts default value by itself?

Should jscad handle a missing param and use the scripts default value by itself?
hrgdavor (Migrated from github.com) reviewed 2022-01-07 23:27:46 +01:00
@@ -317,3 +317,3 @@
const makeScriptWorker = ({ callback, convertToSolids }) => {
let onInit, main, scriptStats, entities
let onInit, main, scriptStats, entities, lastParamsDef
hrgdavor (Migrated from github.com) commented 2022-01-07 23:27:46 +01:00

Yes, that is expected behavior in jscad currently, just not properly implemented in my integration for CadHub.

Yes, that is expected behavior in jscad currently, just not properly implemented in my integration for CadHub.
Irev-Dev (Migrated from github.com) approved these changes 2022-01-08 20:32:26 +01:00
Irev-Dev (Migrated from github.com) left a comment

Thanks Hrg.

Thanks Hrg.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#582