Open Amith225 opened 2 years ago
So you need a website which serves as a replacement of the current GUI??
@Divyansh-0 yes
Okk i will try and replicate the features but i have never integrated a python app to a webpage
@Divyansh-0 do you want me to assign this issue to you?
Yeah
i didn't get what u want in dock secondary. Also i saw Your image code in the repo u shared why are You not using that??
i didn't get what u want in dock secondary
if u look at Warp
, Gradient
, LinearColorGradient
in selectionTools.py, they have @classmethods
which can be used as predefined options. All those options should be made available for selecting(dropdown menu?)
Also i saw Your image code in the repo u shared why are You not using that?
if u mean DImg
component, yes it converts arrays to image, but its not well optimized
I get that part i have to store those changed values and then where should i transfer them??
if u mean
DImg
component, yes it converts arrays to image, but its not well optimized
U want it to be fast or leaner??
where should i transfer them??
u can have a place-holder method which gets called whenever the state changes for now, latter it can make an API call to python runtime to change settings
U want it to be fast or leaner??
fast would be good, but not the rule. you can improve upon DImg
where should i transfer them??
u can have a place-holder method which gets called whenever the state changes for now, latter it can make an API call to python runtime to change settings
For state change detection u can just use useState hook it would it ll return the current state. Also what is a place-holder method never heard of it in state management context of react
U want it to be fast or leaner??
fast would be good, but not the rule. you can improve upon
DImg
So the logic has complications??
so here's what the API would be like, pyodide will run a python script when component mounts, it will have a noise
instance created and send an array to be shown, now whenever Primary Dock parameters is changed by user, it will call a function in js specifying the change, which intern will call the noise.set<method>
and again new noise values will be sent for display.
Secondary Dock does a very similar thing, but instead of change the noise parameters, it will ask for new gradient and color, which is again handled by the python script
the only thing js has to do is invoke python functions using pyodide, which will return an array to be displayed
So the logic has complications??
no not really, there might be small adjustments to be made.
i will commit the python script by today, so that you have a better idea.
for now just have a empty method which just console logs the change, and renders a random image
so here's what the API would be like, pyodide will run a python script when component mounts, it will have a
noise
instance created and send an array to be shown, now whenever Primary Dock parameters is changed by user, it will call a function in js specifying the change, which intern will call thenoise.set<method>
and again new noise values will be sent for display.Secondary Dock does a very similar thing, but instead of change the noise parameters, it will ask for new gradient and color, which is again handled by the python script
the only thing js has to do is invoke python functions using pyodide, which will return an array to be displayed
So basically You want to track the changes in the input fields and then user for instance presses a button then make an api call to transfer the newly collected params then py script does the work
For state change detection u can just use useState hook it would it ll return the current state. Also what is a place-holder method never heard of it in state management context of react.
no by placeholder i mean a function which doesn't do anything, it's just used for latter sake. it's a simple js function
So the logic has complications??
no not really, there might be small adjustments to
For state change detection u can just use useState hook it would it ll return the current state. Also what is a place-holder method never heard of it in state management context of react.
no by placeholder i mean a function which doesn't do anything, it's just used for latter sake. it's a simple js function
Ok i thought there are placeholder methods in Tenserflow and all . So i thought i might not be updated about React
i will commit the python script by today, so that you have a better idea.
for now just have a empty method which just console logs the change, and renders a random image
Ook
So basically You want to track the changes in the input fields and then user for instance presses a button then make an api call to transfer the newly collected params then py script does the work
yes spot on, but introduce some delay to the call, so its invoked only after user has made their desired change, we dont want to spam new request for every value the slider moves
So basically You want to track the changes in the input fields and then user for instance presses a button then make an api call to transfer the newly collected params then py script does the work
yes spot on, but introduce some delay to the call, so its invoked only after user has made their desired change, we dont want to spam new request for every value the slider moves
Thats what i was thinking that u should have a second confirmation by a button or something
Or a timeout maybe??
Or a timeout maybe??
yes
Ok i will in the first draft have a button to apply changes see how it goes and then re-configure it
Do you want me to create a repo for the website so that you can see how will it look before i do a PR ??
ALso u need a double range slider for range??
fork this repo, make your changes there, and then do a PR
ALso u need a double range slider for range??
i think there is no need for range slider, as it won't be displayed anywhere
ALso u need a double range slider for range??
i think there is no need for range slider, as it won't be displayed anywhere
You mentioned in point 1 of dock 1st that u need a range which accepts two params
Also i will PR the dock primary first U can suggest changes then i can make changes to both primary and secondary docks
You mentioned in point 1 of dock 1st that u need a range which accepts two params
right ignore it, no need for range, implement other parameters
@Divyansh-0 PR to 19-basic-website
branch not master
OK
@Divyansh-0 is it possible to host your files to vercel or some other place, to see the website?
@Divyansh-0 is it possible to host your files to vercel or some other place, to see the website
ok i will host on netlify with ur image section then i can keep making changes and u can see them
Also u should update contribution guidelines docs
Also u should update contribution guidelines docs
yes ik, but i am busy for few days, it will be done soon
Tell me the changes i will fix tmrw And let me know the theme You want to go for the webpage then It will be good for styling
@Divyansh-0, Warp should be a drop down menu of Warp
options (see selectionTools.py), waveLength should be an input of say step 128. And after Apply change is pressed all the values change, it should be visible all the time
Ok that input fields i will fix . For the apply change you dont want it to go back to original state??
Warp will take a N- dimensional array?? and a nested array ??
Warp
is a class, it has different options, to choose from, see selectionTools.py
, the options are the classmethods
Ok that input fields i will fix . For the apply change you dont want it to go back to original state??
no it should be visible what the selected parameters are, you can disable the div, and enable it back when user clicks edit
Ok that input fields i will fix . For the apply change you dont want it to go back to original state??
no it should be visible what the selected parameters are, you can disable the div, and enable it back when user clicks edit
Ok you want it to be visible all the time not only when the user edit??
Ok that input fields i will fix . For the apply change you dont want it to go back to original state??
no it should be visible what the selected parameters are, you can disable the div, and enable it back when user clicks edit
Ok you want it to be visible all the time not only when the user edit??
Sorry can you explain it clearly I can't get what you want ?
Warp
is a class, it has different options, to choose from, seeselectionTools.py
, the options are theclassmethods
Like the lerp cosine cubic and all?? You want separate fields for them ??
A Two page website with 4 main contents:
Page 1:
Noise
classGradient
andLinearColorGradient
classesPage2:
for initial commits / PRs, the python runtime connection need not be implemented, but placeholders can be created.
to be accepted for PR, Page1 (1, 2, 3) must be implemented or Page2 (4) must be implemented