<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Using JScad just to display 3D-Object]]></title><description><![CDATA[<p dir="auto">Hi there,</p>
<p dir="auto">I would like to use JSCAD to display 3D Objects in a webpage automatically as soon as the page loaded, without any modification around the objects.</p>
<p dir="auto">I have read/tried the file <code>packages/web/demo.{html,js}</code>. They are designed as an online IDE, but not as a display-tool.</p>
<p dir="auto">I have some experience with JavaScript, so for the first help I just need to know where I find example/document so far.</p>
<p dir="auto">Thanks for response/answer <img src="https://openjscad.nodebb.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=k4h1pp0pk3c" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" /></p>
<p dir="auto">Hong-Phuc Bui</p>
]]></description><link>https://openjscad.nodebb.com/topic/438/using-jscad-just-to-display-3d-object</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 16:02:07 GMT</lastBuildDate><atom:link href="https://openjscad.nodebb.com/topic/438.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Feb 2025 14:07:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Fri, 14 Feb 2025 22:58:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/852">@hpb-htw</a> Nice! You might be the first person using V3.</p>
<p dir="auto">So, V3 is currently in Alpha release. Or course, V3 is in the same GIT repository but on the V3 branch. So, you can get all the packages by checking out the branch.</p>
<p dir="auto">git checkout V3</p>
<p dir="auto">Again, take a look at the demos in regl-rendering</p>
]]></description><link>https://openjscad.nodebb.com/post/1461</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1461</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Fri, 14 Feb 2025 22:58:56 GMT</pubDate></item><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Thu, 13 Feb 2025 09:23:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/852">@hpb-htw</a> I am happy more people are using jscad, but I have to schose my battles carefuly <img src="https://openjscad.nodebb.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=k4h1pp0pk3c" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" />  (so many things I would like todo in jscad, and so little time).</p>
<p dir="auto">I am not able to lead the effort, but I will be here to help troubleshooting while you explore options how to use import with jscad.</p>
<p dir="auto">There is one project that is doing it this way, and it uses sourcemaps. This could help you get stared: <a href="https://github.com/receter/jscad-playground/blob/main/index.html" rel="nofollow ugc">https://github.com/receter/jscad-playground/blob/main/index.html</a></p>
<p dir="auto">Looking forward to see what you find and what you make, as there are likely others interested in this approach.</p>
]]></description><link>https://openjscad.nodebb.com/post/1460</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1460</guid><dc:creator><![CDATA[hrgdavor]]></dc:creator><pubDate>Thu, 13 Feb 2025 09:23:48 GMT</pubDate></item><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Thu, 13 Feb 2025 09:18:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/1">@z3dev</a> Yes, I'd like to try the version 3. For me it is very comfortable to use the standard.</p>
]]></description><link>https://openjscad.nodebb.com/post/1459</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1459</guid><dc:creator><![CDATA[hpb-htw]]></dc:creator><pubDate>Thu, 13 Feb 2025 09:18:59 GMT</pubDate></item><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Thu, 13 Feb 2025 09:16:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/152">@hrgdavor</a> My Model is very simple: One is an extruding, one is a model of H2O with 3 Atoms. I construct them in JavaScript. Principal I am happy with replacement the function <code>demo</code> in the file <code>demo.html</code> with my model. So my task is done. But I'm a software developer, so I'd like to use ES-6 standard <code>import</code> than <code>require</code>.</p>
]]></description><link>https://openjscad.nodebb.com/post/1458</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1458</guid><dc:creator><![CDATA[hpb-htw]]></dc:creator><pubDate>Thu, 13 Feb 2025 09:16:04 GMT</pubDate></item><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Wed, 12 Feb 2025 13:22:58 GMT]]></title><description><![CDATA[<p dir="auto">I am a bit confused, as initial description says model, but in the conversation here I am seing that you may want to actually execute a jscad script (to generate a model).</p>
<p dir="auto">If you have STL files or some other format supported by jscad/io regl renderer is really a good choice as it is very light, and is just fine for displaying the model.</p>
<p dir="auto">regl is still great if you want to execute a jscad script, but thigs get bit complicated there. Demo if I remember correctly executes model code directly on main thread, adn is you make sth complex that will need x number of seconds to generate, it would freeze the UI and confuse users.</p>
<p dir="auto">If you will have more complex scripts, you will want to use a worker, and then thing get complicated. Especially if you want scripts that are split in multiple imports.</p>
<p dir="auto">give us some more info on your use case, so we can suggest a good direction.</p>
]]></description><link>https://openjscad.nodebb.com/post/1457</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1457</guid><dc:creator><![CDATA[hrgdavor]]></dc:creator><pubDate>Wed, 12 Feb 2025 13:22:58 GMT</pubDate></item><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Wed, 12 Feb 2025 13:10:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/852">@hpb-htw</a> you can use V2 (commonjs/require) or you can use V3 (es6/import). Both are passing all tests.</p>
<p dir="auto">Do you want to try V3? It's still Alpha but works well.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/152">@hrgdavor</a> What do you think?</p>
]]></description><link>https://openjscad.nodebb.com/post/1456</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1456</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Wed, 12 Feb 2025 13:10:06 GMT</pubDate></item><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Tue, 11 Feb 2025 20:07:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/1">@z3dev</a><br />
yes! It works fine for a proof of concept <img src="https://openjscad.nodebb.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=k4h1pp0pk3c" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" /> and Nodejs's <code>require()</code>. Now I try to use the modules in manner of ES-6 <code>import</code> by using</p>
<pre><code>// in main.js
import myModelFunction from "myModel.js";
// do setup as in demo.html
// ...
</code></pre>
<p dir="auto">and in <code>myModel.js</code> I would like to use ES-6 <code>import</code> to import <code>@jscad/modeling</code> and <code>@jscad/regl-renderer</code>.<br />
How do you think about it? Is my approach ok or I should only use the Nodejs <code>require()</code>-Function?</p>
]]></description><link>https://openjscad.nodebb.com/post/1455</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1455</guid><dc:creator><![CDATA[hpb-htw]]></dc:creator><pubDate>Tue, 11 Feb 2025 20:07:08 GMT</pubDate></item><item><title><![CDATA[Reply to Using JScad just to display 3D-Object on Tue, 11 Feb 2025 08:13:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/852">@hpb-htw</a> Welcome!</p>
<p dir="auto">The web package is a very complex web-application.</p>
<p dir="auto">You can find a very simple viewer in the packages/utils/regl-render directory. See the html files for an example.</p>
<p dir="auto">Let us know if you need more.</p>
]]></description><link>https://openjscad.nodebb.com/post/1454</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1454</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Tue, 11 Feb 2025 08:13:56 GMT</pubDate></item></channel></rss>