Replies: 12 comments 5 replies
-
Good evening! Did it track it? When you click to export it start to spy on all events and records them. Then you need to move it in the full range, so that everything will be recorded (system does not know the ranges, it just sees some events and updates and records them) For your example I would reduce the steps to get less combinations (no it is ~200) Manipulate[ArcCos[Sqrt[(b^2 + c^2 - a^2)/(2*b*c)]], {a, 0, 1, 0.2}, {b, 0, 1,0.2}, {c, 0, 1, 0.2}] ManipualteExp1-ezgif.com-gif-maker.mp4 |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your response!!!
|
Beta Was this translation helpful? Give feedback.
-
It is a problem of accuracy. When you drag a slider with A sniffer program is stupid and it only sees values -> changes and has no idea about if it a slider, continuous range or something else. With Here is a low-level version of Module[{
output = ""
},
{
EventHandler[InputRange[0,1,0.001, 0.5, "Label"->"a"], Function[v,
output = ToString[
v^2
, StandardForm]
]],
EditorView[output // Offload]
} // Column
] Then "scanning" the full range will be easier. You should always keep in mind, that there is no magic in this export. HTML document cannot reproduce the calculation, only "play" prerecorded data.
start = InputButton["Start"]
Animate[Row[{Sin[x], "==", Series[Sin[x], {x,0,n}], Invisible[1/2]}], {n, 1, 10, 1}, AnimationRate->3, AnimationRepetitions->1, "TriggerEvent"->start] |
Beta Was this translation helpful? Give feedback.
-
Another example with 100 values sampled automatically
Example.with.Animate.mp4 |
Beta Was this translation helpful? Give feedback.
-
I added video tutorials to that section https://wljs.io/frontend/Exporting/Dynamic%20HTML#what-else-can-be-exported |
Beta Was this translation helpful? Give feedback.
-
I see... I had the impression that, somehow, the input/output values would be automatically stored and would just work in the HTML. P.S.: Thanks a lot anyway!!! Really appreciate it!!! |
Beta Was this translation helpful? Give feedback.
-
You are welcome!
It was somewhat added recently :) We can still improve it, may be statistically guess by events generation that this is a slider and automatically scan all possible values. We also tried to replace it with a small CNN neural network, which is trained on input and output data and then loaded to Javascript, but the training was too long and not robust. If you don't mind I would convert it to discussion, so that other people could see it on our forum. |
Beta Was this translation helpful? Give feedback.
-
One day we may try a translation/compilation of WL to JS ;) |
Beta Was this translation helpful? Give feedback.
-
Initial tests on a multilinear interpolation were successful! LinrarInterp.mp4Here we have a canvas with technically infinite number of positions. However, we sample only ~100 and the rest is interpolated in exported HTML file live. |
Beta Was this translation helpful? Give feedback.
-
Another test (much more complex) holeCow.mp4 |
Beta Was this translation helpful? Give feedback.
-
Here are some tech demos https://megastore.rz.uni-augsburg.de/get/Z_3EG8Rr0q/ and @kkoudas01 special calculator. One can enter any number directly to the number field, the result will be linearly interpolated from the existing points sampled https://megastore.rz.uni-augsburg.de/get/5IX4AQld43/ PS: I added unnecessary contour plot 3D, but that was can be removed ;) |
Beta Was this translation helpful? Give feedback.
-
We have rolled out a new release! 2.7.6 https://wljs.io/frontend/Exporting/Dynamic%20HTML#state-machine-1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Good evening!
I'm writing this
Manipulate[a^2, {a, 0, 1}]
with the intention of using it in an interactive HTML. It works perfectly fine in the WLJS notebook, but the problem arises when I try to convert it into dynamic HTML. It does get converted into HTML, but afterwards, when I change the value of the slider, nothing happens. The value ofa^2
remains exactly where it was the last time I moved the slider in the WLJS notebook.I've seen the
InputRange
(https://wljs.io/frontend/Reference/GUI/InputRange), but I haven't quite understood how it works—especially when I try to create something more complex, like:Manipulate[ArcCos[Sqrt[(b^2 + c^2 - a^2)/(2*b*c)]], {a, 0, 1}, {b, 0, 1}, {c, 0, 1}]
.Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions