@buerli.io/buerligons 0.0.0-stage → 2.0.0-beta.20261016085358

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 AWV Informatik AG
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,99 @@
1
- # Temporary Holding Version
1
+ # buerligons
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A user-friendly interactive CAD application
4
+
5
+ buerligons lives in the buerli repository, next to the libraries it is made of. First, clone it and
6
+ install at its root:
7
+
8
+ ```shell
9
+ git clone https://github.com/awv-informatik/buerli
10
+ cd buerli
11
+ yarn
12
+ cd packages/buerligons
13
+ ```
14
+
15
+ buerli and react-cad are compiled from their sources (`vite.config.ts`), so an edit in either of
16
+ them hot-reloads in the running app.
17
+
18
+ ### Create an account and get your ClassCAD key
19
+
20
+ In order for **buerligons** to work, you need to have a running ClassCAD. You can connect to a ClassCAD worker over WebSocket, run ClassCAD in the browser using WASM, or connect to a local or remote ClassCAD server using SocketIO.
21
+
22
+ Which one is used is set in the .env file in the root of this project: the first of `WSCLIENT_URL`, `CLASSCAD_TOKEN` (or `CLASSCAD_WASM_KEY`) and `SOCKETIO_URL` that is set.
23
+
24
+ ### Running ClassCAD as a worker (the default)
25
+
26
+ Start a ClassCAD worker (`classcad-cli worker`). It listens on port 9094, which is where the .env file points:
27
+
28
+ ```shell
29
+ WSCLIENT_URL=ws://localhost:9094
30
+ ```
31
+
32
+ A worker shares its session: the **Session Management** button in the dock opens the invite panel, where you create invite links to edit or to view. A page opened with such a link (`?invite=...`) joins the session as a guest.
33
+
34
+ ### Running ClassCAD using WASM
35
+
36
+ The engine needs a key, and buerligons carries none. Sign in on [classcad.ch/account](https://classcad.ch/account) (a new account comes with two weeks of Solo) and make a **public access token** there. Open the .env file, comment out `WSCLIENT_URL` and put the token into `CLASSCAD_TOKEN=`. When the page starts, it asks ClassCAD for the key your plan allows for this page's origin (`localhost` works on every plan; other domains are registered on the account page with Pro and Business), keeps it until shortly before it expires, and renews it. The menus save in the formats your plan includes. `CLASSCAD_WASM_KEY` takes a key of your own instead of a token. The variable `SOCKETIO_URL` is not relevant in this case.
37
+
38
+ > The first time ClassCAD starts using WASM, loading may take some time depending on your internet speed.
39
+
40
+ ```shell
41
+ #WSCLIENT_URL=ws://localhost:9094
42
+ CLASSCAD_TOKEN=ccpk_....
43
+ SOCKETIO_URL=ws://localhost:9091
44
+ ```
45
+
46
+ With the engine in the page, the page hosts its session itself, and the **Session Management** panel creates invite links here too. Nobody can connect to a page, so its guests are introduced by a [ClassCAD MCP](https://github.com/awv-informatik/classcad-ai/tree/master/packages/mcp) running on the same machine: an AI agent joins with the link, and so does another page opened with it. The page looks for the MCP on `ws://127.0.0.1:9098/session`; `CLASSCAD_SESSION_URL` in the .env file names another address. While no MCP runs there, the links cannot be joined.
47
+
48
+ ### Running ClassCAD using SocketIO
49
+
50
+ Follow the instruction points 1-3 about **"Create an account, get your ClassCAD key, download ClassCAD"** on [Getting Started with SocketIO](https://buerli.io/docs/quickstart/socketio)
51
+
52
+ Start ClassCAD via SocketIO as described in the [Downloads](https://classcad.ch/downloads/) page
53
+
54
+ Open the .env file and comment out `WSCLIENT_URL` and `CLASSCAD_TOKEN` to make sure ClassCAD is reached over SocketIO
55
+
56
+ ```shell
57
+ #WSCLIENT_URL=ws://localhost:9094
58
+ #CLASSCAD_TOKEN=ccpk_....
59
+ SOCKETIO_URL=ws://localhost:9091
60
+ ```
61
+
62
+ ### Working with an AI agent
63
+
64
+ In a shared session buerligons says what is selected and selects what the others ask for. An AI agent in the session (a ClassCAD MCP that joined with an invite link) therefore knows what "this face" means, and can point something out to you. You both work on the same model: what the agent builds appears as it happens, and what you change is what the agent reads next. This works with a worker and with WASM alike.
65
+
66
+ ### buerligons as the app of a ClassCAD MCP
67
+
68
+ It also works the other way around: a ClassCAD MCP brings buerligons along as the app of its sessions. There the agent's session is the host, and the page joins it as a guest. That is a build of its own:
69
+
70
+ ```shell
71
+ yarn build:mcp
72
+ ```
73
+
74
+ It is vite's `mcp` mode and reads `.env.mcp`: `WSCLIENT_URL=/session` is an address without a scheme, taken on the server the page came from, because the MCP serves the app and its session on the same local address. The page is opened with the link the agent hands out (`?invite=...`); it has no welcome screen of its own, **New** starts the shared model over, and the File menu saves in the formats the session offers.
75
+
76
+ The build goes to `dist/mcp`, and that is what the npm package `@buerli.io/buerligons` holds: the app built, nothing to install with it, and no sources. An MCP takes it from there (`node_modules/@buerli.io/buerligons/dist/mcp`, or `package/dist/mcp/` in the package's tarball) and serves it as it is. Its addresses are relative, so it works at the root of an address and in a folder alike.
77
+
78
+ ### The stage: WebGPU, and WebGL2 where there is none
79
+
80
+ The stage draws with three's WebGPURenderer: on WebGPU where the browser has it, and on WebGL2 where it does not (the same renderer and the same materials, compiled to GLSL). `?renderer=webgl` in the address, or `localStorage['buerligons.renderer'] = 'webgl'`, asks for WebGL2; the canvas says which backend runs it (`data-backend`).
81
+
82
+ Its frame is its own, without a post-processing library (`src/postpro`): the scene and its normals in one multisampled pass, ambient occlusion, and the outlines of what is hovered and selected. The **look** button in the dock on the right switches from the flat look (the drawing's) to a realistic one, and the page remembers it: a studio of softboxes (`src/postpro/studio.ts`, after handguard's product photo), edges rounded in screen space that catch the softboxes as lines of light, light bounced once between what is on the screen (global illumination), reflections of what is near, and ACES tone mapping. What buerli and react-cad draw with GLSL materials of their own (sketch lines and arcs, vertices, the sketch grid, fat lines, troika's SDF text) is drawn by node materials made for it in `src/postpro/compat`; text stays SDF text.
83
+
84
+ ### Run buerligons
85
+
86
+ ```shell
87
+ yarn start
88
+ ```
89
+
90
+ The buerligons application is now available at http://localhost:5173.
91
+
92
+ > Please check the console output for possible node incompatiblities of the development tools. In case of problems, the use of `nvm` is recommended. `nvm` allows installing different Node versions on the same system.
93
+
94
+ ### Links to our homepages and documentations
95
+
96
+ - [buerligons.io](https://buerligons.io)
97
+ - [buerli.io](https://buerli.io)
98
+ - [classcad.ch](https://classcad.ch)
99
+ - [awv-informatik.ch](https://awv-informatik.ch)
@@ -0,0 +1 @@
1
+ html,body{width:100%;height:100%}input::-ms-clear{display:none}input::-ms-reveal{display:none}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:#0000;font-family:sans-serif;line-height:1.15}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:0;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{text-align:left;caption-side:bottom;padding-top:.75em;padding-bottom:.3em}input,button,select,optgroup,textarea{color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner{border-style:none;padding:0}[type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]::-moz-focus-inner{border-style:none;padding:0}[type=submit]::-moz-focus-inner{border-style:none;padding:0}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{resize:vertical;overflow:auto}fieldset{border:0;min-width:0;margin:0;padding:0}legend{width:100%;max-width:100%;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal;margin-bottom:.5em;padding:0;display:block}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button{height:auto}[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}