Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using my own hosted version #108

Open
SirClickALot opened this issue Oct 4, 2024 · 5 comments
Open

Using my own hosted version #108

SirClickALot opened this issue Oct 4, 2024 · 5 comments

Comments

@SirClickALot
Copy link

Forgive me for being a bit dim here but I am not sure whether I can this.

What I want to do is to be able to have my own hosted version so that I can set up 'worksheet' pages which use JavaScript (as detailed in https://www.falstad.com/circuit/jsinterface.html) to add a series of 'adjustment' buttons saying things like 'Set R to 10ohms' etc.

I get how to do all that but the example (falstad.com/circuit/jsinterface.html) references its iframe src as "circuitjs.html?startCircuit=jsinterface.txt"

What I am hoping is that I can have my own circuitjs.html hosted on my own site with all the .js etc that it needs.

This way I can customise each model very specifically.

Am I barkign up the wrong tree; I just can't seem to see where I effectively get hold of 'release'?

Thank you

@pfalstad
Copy link
Owner

pfalstad commented Oct 5, 2024

Yes, you can host it on your site. You can follow the directions here to build the web application: https://github.com/pfalstad/circuitjs1

Then it will generate all the files you need.

Alternatively, you could download one of the offline versions here:

https://www.falstad.com/circuit/offline/

For example the win version circuitjs1-win.zip contains all the files you need under circuitjs1/resources/app/war .

@SirClickALot
Copy link
Author

Got it!

Thank you very Paul, much appeciated :-)

@SirClickALot
Copy link
Author

I have start my customisation journey by taking the file index.html from the folder...
C:\Users\nick\Downloads\circuitjs1-win.zip\circuitjs1\resources\app\war

Straight away I noticed that it does not have in intact <head>?

The file starts...

<meta name="viewport" content="width=820">
<title>Circuit Simulator Applet</title>
<link rel="SHORTCUT ICON" href="favicon.ico">

That is surely a bug in distribution or have I missed something very obvious?

Thank you

@pfalstad
Copy link
Owner

pfalstad commented Oct 5, 2024

It's the same as https://www.falstad.com/circuit/index.html , right?

Sure it should have an intact head, but it still works.

@SirClickALot
Copy link
Author

I don't think so Paul, https://www.falstad.com/circuit/index.html has its <head> all intact but I appreciate what you mean about the browsers being very tolerant anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants