Compare commits
619 Commits
achalmers/
...
v0.19.14
Author | SHA1 | Date | |
---|---|---|---|
cd68f80b71 | |||
d341681c0d | |||
0578e9d2a1 | |||
b413538e9e | |||
c4e7754fc5 | |||
94515b5490 | |||
aa52407fda | |||
e45be831d0 | |||
005944f3a3 | |||
755ef8ce7f | |||
005d1f0ca7 | |||
e158f6f513 | |||
879d7ec4f4 | |||
f6838b9b14 | |||
cb75c47631 | |||
9b95ec1083 | |||
a3eeff65c8 | |||
fab3d2b130 | |||
0a96dc6fd2 | |||
e123a00d4b | |||
b950cc0583 | |||
c89780a489 | |||
1afed68dd7 | |||
dcbed4f06f | |||
379f154a5c | |||
60c4969322 | |||
cc6dee8ad4 | |||
2fc7c0d5fd | |||
bf2dcd808f | |||
ee21e486d4 | |||
b5a3eb9e9c | |||
c85645c9f2 | |||
cfa4dd2e33 | |||
c620f7269c | |||
2d8d29b345 | |||
00da062586 | |||
aafbaf6c50 | |||
2894c84a4e | |||
c01084feb0 | |||
c461db5f54 | |||
03fcb73aca | |||
8065e7e51a | |||
2d0ac249df | |||
3d73b82c23 | |||
0b235dc1cd | |||
0857415793 | |||
1da4fd03ef | |||
39d84c12ab | |||
537d86c8ff | |||
f08d955d40 | |||
7ea6722d2d | |||
39bd72fc83 | |||
88aec7e2c5 | |||
b936eafc26 | |||
6c11f0e456 | |||
06a7fcf6a7 | |||
6450622146 | |||
9dfe0c3d80 | |||
ba33b0da19 | |||
21756fe513 | |||
69d34c5318 | |||
f909ea7af5 | |||
38d9b5d4b4 | |||
ac140c054f | |||
215db38b44 | |||
0880199844 | |||
18ce254566 | |||
bc90840e7c | |||
3f8c4e7b5a | |||
168fed038d | |||
9544251b1a | |||
a490b4db8c | |||
410089549d | |||
05e27f354a | |||
6793555e86 | |||
6823c5eedd | |||
b13c1339aa | |||
624b1fc07d | |||
ed69213680 | |||
593b4e6f21 | |||
7eeaf96d18 | |||
6fa7698f42 | |||
4abb8fc267 | |||
ff482e5f9b | |||
dd51eecaed | |||
266450afbf | |||
e01b35d1e9 | |||
f0b9de2c1c | |||
35c3103186 | |||
08534a024c | |||
25fa3b48e1 | |||
db5abf0149 | |||
3634c96cf1 | |||
e9890aa22b | |||
36532c521e | |||
c75ecada03 | |||
21d64d7c29 | |||
2224c89909 | |||
9b0f9f321b | |||
f29573f3dc | |||
9a9c2223de | |||
6d12aa48f8 | |||
3fdf7bd45e | |||
fdadd059d6 | |||
b646504cfb | |||
ff8a994cb8 | |||
4f9a0be343 | |||
e8240ee896 | |||
70bc0accad | |||
9dedc56b7e | |||
72144052c0 | |||
82bad2cab1 | |||
63be31971f | |||
ba6b3d9a8d | |||
0b5802a0d2 | |||
e2d24edfee | |||
cc06825ec9 | |||
51f7addf54 | |||
226e4d2932 | |||
e7397ec564 | |||
af69856633 | |||
bce058ab52 | |||
75545ddff1 | |||
203fa7e454 | |||
76de64780c | |||
2d804dee2b | |||
c094d0ced1 | |||
a90fe3c066 | |||
f3ea7fd0e2 | |||
704ff0df62 | |||
eba17e92b7 | |||
d9d700624e | |||
1e547aeef0 | |||
22899c9e69 | |||
25702f454c | |||
11faf86983 | |||
67d73382b1 | |||
15b9f43f2c | |||
d28555a070 | |||
7bf116629f | |||
fe45b5b54d | |||
bcbd3f5bfd | |||
959433e357 | |||
d18e35b7ea | |||
596c9a0ee6 | |||
9106a81c77 | |||
8b5ebe67b2 | |||
a7f539eca6 | |||
f4c87c994c | |||
3d4ae05145 | |||
f5ee346408 | |||
544a7565e3 | |||
979046f7e6 | |||
07ae5106b9 | |||
e9ae484332 | |||
2a86ffc09a | |||
93903a8a47 | |||
45e85a1f81 | |||
c187989d18 | |||
47b5fa1459 | |||
d85781ef99 | |||
233f81a879 | |||
8ac0bf4953 | |||
24caeece65 | |||
f493cf11a0 | |||
594e888c12 | |||
b32295e1d9 | |||
e0838c1198 | |||
f03f34d8be | |||
108bb4ee90 | |||
092d459026 | |||
c4f7296e32 | |||
1cbd422d7f | |||
849685a986 | |||
359b3c1f35 | |||
f4ff5e43f2 | |||
daf7350c9e | |||
a829cdb006 | |||
1a7a19ee85 | |||
b045a89854 | |||
221f037eaa | |||
a93b72f7e1 | |||
63f36cbcbf | |||
79b50ef7d4 | |||
3d16dcd30d | |||
d605d4a029 | |||
77f51530f9 | |||
76480f1a43 | |||
f850f80de1 | |||
15ebbe6947 | |||
01beba42da | |||
509e372ed2 | |||
b0417114af | |||
0360a4021b | |||
6f36371e6d | |||
ebcc19e757 | |||
84cbcddff1 | |||
e758c6cab0 | |||
c63ea8e445 | |||
7e0e0e1ee1 | |||
db3e2879bd | |||
7804079d8c | |||
571406fca3 | |||
a9e41a616d | |||
9a0b086e07 | |||
358184c634 | |||
85ac8bf7a3 | |||
544a327ee9 | |||
868a560e1a | |||
32a2835d0e | |||
4c93346f48 | |||
bfa8b8aca4 | |||
b1fe2dddb6 | |||
6d3f6c784e | |||
4904785bbd | |||
ca30fd44bd | |||
5d69a62324 | |||
0e04e20b97 | |||
1dac62067a | |||
86de039dc4 | |||
dce5833d79 | |||
f714c19890 | |||
f52128c41a | |||
39566174e7 | |||
3688c8a05e | |||
0025349e9a | |||
d8cc57b843 | |||
e76db4a621 | |||
027e947bd5 | |||
0983dcca22 | |||
846fc99bbc | |||
c258ede25c | |||
4cc1b3d5ed | |||
be0dd1512d | |||
a5156c3f5d | |||
8038b5d7a3 | |||
54b234360e | |||
465d933d53 | |||
ccd0c619a6 | |||
7b570bf525 | |||
44d1c29801 | |||
0e916cfd5b | |||
e773e932b0 | |||
2d39fd32ce | |||
5a585a6c2d | |||
c09d6ee6bd | |||
09b55259ab | |||
68b61c9832 | |||
469ca94437 | |||
1d3850b46a | |||
0358343285 | |||
38b0603fa2 | |||
e48a8b6c5d | |||
73e573b251 | |||
793409d53d | |||
3e9ab16c4b | |||
ab226bc86f | |||
97677e4474 | |||
37fbc8c9ab | |||
29d61da552 | |||
ad2f669ec6 | |||
d66aad8b5d | |||
d8b8710a0d | |||
8f8ba2dca5 | |||
970b0abb54 | |||
06b464816f | |||
08f7bb2811 | |||
197df9f25d | |||
4d387dfaf7 | |||
912b97bea5 | |||
3e4ce44dc9 | |||
c2058a05fa | |||
7a57965690 | |||
c5b115ba97 | |||
90057c2dda | |||
f3e59690d6 | |||
9642a44a02 | |||
252c7651ac | |||
79edcf3826 | |||
b05ac3a05f | |||
1d01ba454b | |||
bf1d6963fe | |||
176ee63cb9 | |||
1ae8059c2b | |||
93f406d005 | |||
e97833f0ed | |||
35417dd8a6 | |||
cf0560dcfb | |||
3659946653 | |||
156c51484a | |||
dc8dd4bc72 | |||
335add67bd | |||
231794a69d | |||
8e5a6bc6fc | |||
4f82121105 | |||
46358b41a2 | |||
59274b76bf | |||
d11d363f19 | |||
f22ad7c4e7 | |||
1913519f68 | |||
4b9d4fd45b | |||
78e6816b06 | |||
6607ea1663 | |||
644a8ef3ca | |||
e3e132c0d5 | |||
be3fed8427 | |||
cefa6f85fe | |||
47ff4623bd | |||
69ff651201 | |||
788ae5dbab | |||
816870253e | |||
4987965731 | |||
042ceb42fd | |||
f40cdabfdf | |||
13cd3e179b | |||
a2176d9a1b | |||
fab5c47978 | |||
61d7950ca3 | |||
0579ccd53b | |||
cede44aacf | |||
e8149fca97 | |||
c571b15318 | |||
d3d2612a3b | |||
17b7c687d4 | |||
5d7d15a385 | |||
4be9f70965 | |||
a60bdd4cc3 | |||
6bab45a56a | |||
2d979b56f5 | |||
dfc51e6c30 | |||
7e40464d10 | |||
83fcdd52a2 | |||
8a30d5ec8f | |||
637c4a7d97 | |||
604446dba3 | |||
ed3952900b | |||
f934a17417 | |||
59fa7b13a5 | |||
8b2bf00641 | |||
73b7d3cc9d | |||
82fb227868 | |||
db5657a298 | |||
cd158f8db0 | |||
0342d1a5b4 | |||
cad64fb780 | |||
fbc458b6e6 | |||
dd852c2652 | |||
3395f34552 | |||
4ac40d5a78 | |||
8ccbb3a419 | |||
77e9a35c4d | |||
0d1852bbc3 | |||
ff9229f55a | |||
5a7f12a06d | |||
06f1257071 | |||
328e7faea9 | |||
5792d3eb2b | |||
15effddf6c | |||
5354ce140a | |||
a994338541 | |||
6c22154df1 | |||
4c18255b70 | |||
42b247bc99 | |||
7d7b176bb7 | |||
9aada41a0d | |||
23971465ce | |||
23e294930b | |||
22cc4c9a98 | |||
fe6478f568 | |||
1989734c3b | |||
f36984f52a | |||
5437538892 | |||
97bd60ae87 | |||
9116d79c50 | |||
b3b5dff60f | |||
55f842d3bd | |||
778478757e | |||
bc303fbaab | |||
d422f09045 | |||
adcf80331a | |||
4fbd7ace98 | |||
0df858b9ca | |||
c6f080c440 | |||
c1a14a107a | |||
3c721f2b29 | |||
61e2a1eddc | |||
6406e27794 | |||
1e382a76dd | |||
06cdaa9ae8 | |||
85c30be333 | |||
4d4a1d66e8 | |||
223b5952aa | |||
fedffbb384 | |||
ed4e3df3b2 | |||
18d200e790 | |||
0c50a5996d | |||
73bca2dcfc | |||
c6a50a3cdf | |||
b81c9d04cc | |||
9d8a7064da | |||
b0e6140e9f | |||
f9df7ff885 | |||
aec9637d7a | |||
e4c5fad8c7 | |||
cc0d601294 | |||
69cefafc19 | |||
b187ca3422 | |||
1edadcaa0f | |||
95c0ded8cf | |||
0ebb4e2cad | |||
f3e0939057 | |||
f5e233d8a0 | |||
1cab3e628f | |||
2ca6ba52b6 | |||
f741ea2e09 | |||
9f2a7781fc | |||
990f2b4154 | |||
0af0f15281 | |||
b558548b94 | |||
29e0f9a270 | |||
9385c32cfb | |||
ce3fb5c353 | |||
f920490518 | |||
d681e667ee | |||
5c6515a60e | |||
eb8a33312d | |||
d351b3bbe4 | |||
47d40eb801 | |||
adc4b6148d | |||
27d0d4a28b | |||
fb609c19ef | |||
8666989c85 | |||
bdf49c2084 | |||
a06b9d560a | |||
b81ff66f2b | |||
c0e6947170 | |||
65ebde0b34 | |||
0d6618b60a | |||
f0c44d11b3 | |||
44e71cd4bc | |||
a9f716dad8 | |||
a2455832e7 | |||
8f5034f997 | |||
af1c2c7ae1 | |||
ff38ae091e | |||
1dd7c95b8c | |||
20042ec87c | |||
fccf3508a7 | |||
8dab5527b8 | |||
f72eb0e8a7 | |||
40479d177f | |||
b88359dee2 | |||
f4c0347104 | |||
ad36b5f5fa | |||
b798cf19d3 | |||
7cfa897561 | |||
0d8804005a | |||
cbd26d29fa | |||
e501a542ac | |||
7cb4f4d101 | |||
1162f5f4c4 | |||
3975e6d8f5 | |||
d68d7a7e00 | |||
b135b97de6 | |||
de5885ce0b | |||
ad7c544754 | |||
4d77875bdc | |||
3377923dcb | |||
c6005660c8 | |||
66e62c6037 | |||
0a4a517bb4 | |||
70f3ded7e2 | |||
095108252b | |||
20b1c93f12 | |||
3747a1b993 | |||
198feb7d44 | |||
c7a8b8313e | |||
1576dc3256 | |||
341a3b7609 | |||
ecb42b89a6 | |||
f00ee3a44a | |||
900e3b96ad | |||
15fae05659 | |||
2730b6d152 | |||
602e7afef6 | |||
d9bcadb062 | |||
19f669b94c | |||
d9ef471385 | |||
39f8b306a2 | |||
19925d22c1 | |||
e1af4b4219 | |||
c699611f5b | |||
00ede7ec1a | |||
f30601bd2c | |||
cfbc77b62f | |||
808830d29e | |||
e714103655 | |||
fbcb96add5 | |||
7386ccf1bf | |||
6e73578933 | |||
b88d5c8799 | |||
5430c1fa66 | |||
c0d4bb6c9f | |||
25260a88c3 | |||
b6d6f0f4c1 | |||
b1276b2ed8 | |||
5f0f3f40d0 | |||
f1ea9b6ece | |||
b94c5be1af | |||
8378eb1e94 | |||
05f98a8c39 | |||
386571fa60 | |||
b0abdf4f70 | |||
81e70e139f | |||
d6bfc38d62 | |||
ada66de92d | |||
8f133f9662 | |||
b360dbb961 | |||
eca3dc2967 | |||
ae36ab6982 | |||
8cb6cf1b8a | |||
3c235c890a | |||
b6dfd30840 | |||
65d128eecd | |||
77b7c602f2 | |||
fa0e61a2be | |||
1cf35a611e | |||
952d0e4c7c | |||
0f85de9df8 | |||
0e8eed3f82 | |||
5b43a5075f | |||
f5ed4e37b2 | |||
19c8da1a86 | |||
a25f89aaba | |||
aeebe5416f | |||
661788b8b0 | |||
ac24563159 | |||
d17342dfb8 | |||
2e93b58ae6 | |||
6593656b08 | |||
47be749ec7 | |||
a03e7f5c41 | |||
b78e9fa131 | |||
c629233eaa | |||
f640f7a5e0 | |||
64398381a9 | |||
0bc5534056 | |||
9fc1df7c1d | |||
a5879ceeda | |||
379c30824e | |||
a4d3263b88 | |||
c1f661ab52 | |||
7d887a1497 | |||
4ca341e132 | |||
c6249f36d2 | |||
dcbe5d7f75 | |||
390cb2d51d | |||
98f7a564ea | |||
05f9e3c290 | |||
09760fc2e9 | |||
18ffc43e89 | |||
de63e4f19f | |||
b70b271e6b | |||
08b7cdc5f6 | |||
6efe6b54c0 | |||
69f72d62e0 | |||
e04b09fcd8 | |||
4903f6b9fc | |||
ef8149f03a | |||
1b75321bf1 | |||
3ed263da6b | |||
d59c4a2258 | |||
9c8351ea40 | |||
db98bcf2a0 | |||
15d96a072d | |||
088968c664 | |||
4bbf98bc34 | |||
ca08f5b337 | |||
a3649d09c0 | |||
635cb58036 | |||
7f050b114f | |||
c999819450 | |||
82905caad6 | |||
519e6d74ac | |||
edb7d68c05 | |||
345dd45caa | |||
b6a5f133f3 | |||
bc6407be6e | |||
038409124a | |||
d5567f8602 | |||
df8c17ac18 | |||
9d40f282a8 | |||
a61d931826 | |||
418350ddbc | |||
d43abe20d9 | |||
84380f3da9 | |||
eea55ff2b1 | |||
10b6c1cfbc | |||
d5570e5c62 | |||
0c9589f7ee | |||
ddf66c1e0f | |||
cf1f2bd235 | |||
0b5bb5f77d | |||
0825cb5a59 | |||
4ec94a721c | |||
16dd5aab96 | |||
bf68a87897 | |||
c6e97e729a | |||
d2535bb8c2 | |||
b01357b49e | |||
793e3510cc | |||
04ae8141c3 | |||
3ae5393dd7 | |||
38119d5a3b | |||
b453b4b453 | |||
3972431cb4 | |||
884545fcde | |||
6deb242eb5 | |||
77fa9af71e |
@ -1,3 +1,3 @@
|
|||||||
[codespell]
|
[codespell]
|
||||||
ignore-words-list: crate,everytime
|
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey,atleast
|
||||||
skip: **/target,node_modules,build
|
skip: **/target,node_modules,build,**/Cargo.lock,./docs/kcl/*.md,./src-tauri/gen/schemas
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
VITE_KC_API_WS_MODELING_URL=wss://api.dev.kittycad.io/ws/modeling/commands
|
VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands
|
||||||
VITE_KC_API_BASE_URL=https://api.dev.kittycad.io
|
VITE_KC_API_BASE_URL=https://api.dev.zoo.dev
|
||||||
VITE_KC_SITE_BASE_URL=https://dev.kittycad.io
|
VITE_KC_SITE_BASE_URL=https://dev.zoo.dev
|
||||||
VITE_KC_SKIP_AUTH=false
|
VITE_KC_SKIP_AUTH=false
|
||||||
VITE_KC_CONNECTION_TIMEOUT_MS=5000
|
VITE_KC_CONNECTION_TIMEOUT_MS=5000
|
||||||
VITE_KC_SENTRY_DSN=
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
VITE_KC_API_WS_MODELING_URL=wss://api.kittycad.io/ws/modeling/commands
|
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
|
||||||
VITE_KC_API_BASE_URL=https://api.kittycad.io
|
VITE_KC_API_BASE_URL=https://api.zoo.dev
|
||||||
VITE_KC_SITE_BASE_URL=https://kittycad.io
|
VITE_KC_SITE_BASE_URL=https://zoo.dev
|
||||||
VITE_KC_SKIP_AUTH=false
|
VITE_KC_SKIP_AUTH=false
|
||||||
VITE_KC_CONNECTION_TIMEOUT_MS=15000
|
VITE_KC_CONNECTION_TIMEOUT_MS=15000
|
||||||
VITE_KC_SENTRY_DSN=https://a814f2f66734989a90367f48feee28ca@o1042111.ingest.sentry.io/4505789425844224
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
src/wasm-lib/*
|
src/wasm-lib/*
|
||||||
|
*.typegen.ts
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
"never"
|
"never"
|
||||||
],
|
],
|
||||||
"react-hooks/exhaustive-deps": "off",
|
"react-hooks/exhaustive-deps": "off",
|
||||||
"@typescript-eslint/no-floating-promises": "warn"
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
|
"files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
"testing-library/prefer-screen-queries": "off"
|
"testing-library/prefer-screen-queries": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
85
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
85
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
name: Bug Report
|
||||||
|
description: File a bug report for the Zoo Modeling App
|
||||||
|
title: "[BUG]: "
|
||||||
|
labels: ["bug"]
|
||||||
|
assignees: []
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: "Thank you for taking the time to report a bug. Please provide as much information as possible to help us resolve it."
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: describe-bug
|
||||||
|
attributes:
|
||||||
|
label: Describe the bug
|
||||||
|
description: A clear and concise description of what the bug is.
|
||||||
|
placeholder: "Explain the bug..."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reproduce-bug
|
||||||
|
attributes:
|
||||||
|
label: Steps to Reproduce
|
||||||
|
description: Steps to reproduce the behavior.
|
||||||
|
placeholder: |
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expected-behavior
|
||||||
|
attributes:
|
||||||
|
label: Expected Behavior
|
||||||
|
description: Description of what you expected to happen.
|
||||||
|
placeholder: "I expected that..."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots and Recordings
|
||||||
|
description: If applicable, add screenshots to help explain your problem. Maximum upload size is 10MB.
|
||||||
|
placeholder: "You can attach images or video recordings here."
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: desktop-os
|
||||||
|
attributes:
|
||||||
|
label: Desktop OS
|
||||||
|
description: "Your operating system"
|
||||||
|
placeholder: "example: Windows 10, MacOS Big Sur"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: browser
|
||||||
|
attributes:
|
||||||
|
label: Browser
|
||||||
|
description: "If you are using the web version, please specify the browser you are using."
|
||||||
|
placeholder: "example: Chrome, Safari"
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Version
|
||||||
|
description: "The version of the Zoo Modeling App you're using."
|
||||||
|
placeholder: "example: v0.15.0. You can find this in the settings."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional-context
|
||||||
|
attributes:
|
||||||
|
label: Additional Context
|
||||||
|
description: Add any other context about the problem here.
|
||||||
|
placeholder: "Anything else you want to add..."
|
||||||
|
validations:
|
||||||
|
required: false
|
12
.github/dependabot.yml
vendored
12
.github/dependabot.yml
vendored
@ -9,15 +9,27 @@ updates:
|
|||||||
directory: '/' # Location of package manifests
|
directory: '/' # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'daily'
|
interval: 'daily'
|
||||||
|
reviewers:
|
||||||
|
- franknoirot
|
||||||
|
- irev-dev
|
||||||
- package-ecosystem: 'github-actions' # See documentation for possible values
|
- package-ecosystem: 'github-actions' # See documentation for possible values
|
||||||
directory: '/' # Location of package manifests
|
directory: '/' # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'daily'
|
interval: 'daily'
|
||||||
|
reviewers:
|
||||||
|
- adamchalmers
|
||||||
|
- jessfraz
|
||||||
- package-ecosystem: 'cargo' # See documentation for possible values
|
- package-ecosystem: 'cargo' # See documentation for possible values
|
||||||
directory: '/src/wasm-lib/' # Location of package manifests
|
directory: '/src/wasm-lib/' # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'daily'
|
interval: 'daily'
|
||||||
|
reviewers:
|
||||||
|
- adamchalmers
|
||||||
|
- jessfraz
|
||||||
- package-ecosystem: 'cargo' # See documentation for possible values
|
- package-ecosystem: 'cargo' # See documentation for possible values
|
||||||
directory: '/src-tauri/' # Location of package manifests
|
directory: '/src-tauri/' # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'daily'
|
interval: 'daily'
|
||||||
|
reviewers:
|
||||||
|
- adamchalmers
|
||||||
|
- jessfraz
|
||||||
|
33
.github/workflows/build-and-store-wasm.yml
vendored
Normal file
33
.github/workflows/build-and-store-wasm.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Build and Store WASM
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-upload:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Cache wasm
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './src/wasm-lib'
|
||||||
|
- name: build wasm
|
||||||
|
run: yarn build:wasm
|
||||||
|
|
||||||
|
|
||||||
|
# Upload the WASM bundle as an artifact
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: wasm-bundle
|
||||||
|
path: src/wasm-lib/pkg
|
@ -7,23 +7,23 @@ on:
|
|||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
- '**/Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
- '**/rust-toolchain.toml'
|
- '**/rust-toolchain.toml'
|
||||||
- .github/workflows/cargo-criterion.yml
|
- .github/workflows/cargo-bench.yml
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '**.rs'
|
- '**.rs'
|
||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
- '**/Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
- '**/rust-toolchain.toml'
|
- '**/rust-toolchain.toml'
|
||||||
- .github/workflows/cargo-criterion.yml
|
- .github/workflows/cargo-bench.yml
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
name: cargo criterion
|
name: cargo bench
|
||||||
jobs:
|
jobs:
|
||||||
cargocriterion:
|
cargo-bench:
|
||||||
name: cargo criterion
|
name: Benchmark with iai
|
||||||
runs-on: ubuntu-latest-8-cores
|
runs-on: ubuntu-latest-8-cores
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -31,10 +31,12 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-criterion
|
cargo install cargo-criterion
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y valgrind
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
uses: Swatinem/rust-cache@v2.6.1
|
||||||
- name: Benchmark kcl library
|
- name: Benchmark kcl library
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |-
|
run: |-
|
||||||
cd src/wasm-lib/kcl; cargo criterion
|
cd src/wasm-lib/kcl; cargo bench -- iai
|
||||||
|
|
34
.github/workflows/cargo-clippy.yml
vendored
34
.github/workflows/cargo-clippy.yml
vendored
@ -9,12 +9,6 @@ on:
|
|||||||
- '**.rs'
|
- '**.rs'
|
||||||
- .github/workflows/cargo-clippy.yml
|
- .github/workflows/cargo-clippy.yml
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '**/Cargo.lock'
|
|
||||||
- '**/rust-toolchain.toml'
|
|
||||||
- '**.rs'
|
|
||||||
- .github/workflows/cargo-build.yml
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@ -25,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
dir: ['src/wasm-lib']
|
dir: ['src/wasm-lib', 'src-tauri']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install latest rust
|
- name: Install latest rust
|
||||||
@ -37,23 +31,25 @@ jobs:
|
|||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
if: matrix.dir == 'src-tauri'
|
if: matrix.dir == 'src-tauri'
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
sudo apt-get install -y \
|
||||||
|
libgtk-3-dev \
|
||||||
|
libayatana-appindicator3-dev \
|
||||||
|
webkit2gtk-driver \
|
||||||
|
libsoup-3.0-dev \
|
||||||
|
libjavascriptcoregtk-4.1-dev \
|
||||||
|
libwebkit2gtk-4.1-dev \
|
||||||
|
at-spi2-core \
|
||||||
|
xvfb
|
||||||
|
yarn install
|
||||||
|
yarn build:wasm
|
||||||
|
yarn build:local
|
||||||
|
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
uses: Swatinem/rust-cache@v2.6.1
|
||||||
|
|
||||||
- name: Install ffmpeg
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install \
|
|
||||||
ffmpeg \
|
|
||||||
libavformat-dev \
|
|
||||||
libavutil-dev \
|
|
||||||
libclang-dev \
|
|
||||||
libswscale-dev \
|
|
||||||
--no-install-recommends
|
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: |
|
run: |
|
||||||
cd "${{ matrix.dir }}"
|
cd "${{ matrix.dir }}"
|
||||||
|
@ -3,48 +3,55 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '**.rs'
|
- 'src-tauri/**.rs'
|
||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
- '**/Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
- '**/rust-toolchain.toml'
|
- '**/rust-toolchain.toml'
|
||||||
- .github/workflows/cargo-build.yml
|
- .github/workflows/cargo-test-tauri.yml
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '**.rs'
|
- 'src-tauri/**.rs'
|
||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
- '**/Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
- '**/rust-toolchain.toml'
|
- '**/rust-toolchain.toml'
|
||||||
- .github/workflows/cargo-build.yml
|
- .github/workflows/cargo-test-tauri.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
permissions: read-all
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
name: cargo build
|
name: cargo test of tauri
|
||||||
jobs:
|
jobs:
|
||||||
cargobuild:
|
cargotest:
|
||||||
name: cargo build
|
name: cargo test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest-8-cores
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
dir: ['src/wasm-lib']
|
dir: ['src-tauri']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install latest rust
|
- name: Install latest rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
if: matrix.dir == 'src-tauri'
|
if: matrix.dir == 'src-tauri'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
sudo apt-get install -y \
|
||||||
|
libgtk-3-dev \
|
||||||
|
libayatana-appindicator3-dev \
|
||||||
|
webkit2gtk-driver \
|
||||||
|
libsoup-3.0-dev \
|
||||||
|
libjavascriptcoregtk-4.1-dev \
|
||||||
|
libwebkit2gtk-4.1-dev \
|
||||||
|
at-spi2-core \
|
||||||
|
xvfb
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
uses: Swatinem/rust-cache@v2.6.1
|
||||||
|
- name: cargo test
|
||||||
- name: Run cargo build
|
|
||||||
run: |
|
|
||||||
cd "${{ matrix.dir }}"
|
|
||||||
cargo build --all
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
run: |-
|
||||||
|
cd "${{ matrix.dir }}"
|
||||||
|
cargo test --all
|
41
.github/workflows/cargo-test.yml
vendored
41
.github/workflows/cargo-test.yml
vendored
@ -3,14 +3,15 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '**.rs'
|
- 'src/wasm-lib/**.rs'
|
||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
- '**/Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
- '**/rust-toolchain.toml'
|
- '**/rust-toolchain.toml'
|
||||||
- .github/workflows/cargo-test.yml
|
- .github/workflows/cargo-test.yml
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '**.rs'
|
- 'src/wasm-lib/**.rs'
|
||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
- '**/Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
- '**/rust-toolchain.toml'
|
- '**/rust-toolchain.toml'
|
||||||
@ -20,7 +21,7 @@ permissions: read-all
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
name: cargo test
|
name: cargo test of wasm-lib
|
||||||
jobs:
|
jobs:
|
||||||
cargotest:
|
cargotest:
|
||||||
name: cargo test
|
name: cargo test
|
||||||
@ -40,26 +41,38 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
- name: Install vector
|
||||||
|
run: |
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
||||||
|
chmod +x /tmp/vector.sh
|
||||||
|
/tmp/vector.sh -y -no-modify-path
|
||||||
|
mkdir -p /tmp/vector
|
||||||
|
cp .github/workflows/vector.toml /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml
|
||||||
|
sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml
|
||||||
|
cat /tmp/vector.toml
|
||||||
|
${HOME}/.vector/bin/vector --config /tmp/vector.toml &
|
||||||
- uses: taiki-e/install-action@cargo-llvm-cov
|
- uses: taiki-e/install-action@cargo-llvm-cov
|
||||||
- uses: taiki-e/install-action@nextest
|
- uses: taiki-e/install-action@nextest
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
uses: Swatinem/rust-cache@v2.6.1
|
||||||
- name: Install ffmpeg
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install \
|
|
||||||
ffmpeg \
|
|
||||||
libavformat-dev \
|
|
||||||
libavutil-dev \
|
|
||||||
libclang-dev \
|
|
||||||
libswscale-dev \
|
|
||||||
--no-install-recommends
|
|
||||||
- name: cargo test
|
- name: cargo test
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |-
|
run: |-
|
||||||
cd "${{ matrix.dir }}"
|
cd "${{ matrix.dir }}"
|
||||||
cargo nextest run --workspace --no-fail-fast -P ci
|
cargo llvm-cov nextest --all --lcov --output-path lcov.info --test-threads=1 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
||||||
env:
|
env:
|
||||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
RUST_MIN_STACK: 10485760000
|
RUST_MIN_STACK: 10485760000
|
||||||
|
- name: Upload to codecov.io
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
|
with:
|
||||||
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
|
fail_ci_if_error: true
|
||||||
|
flags: wasm-lib
|
||||||
|
verbose: true
|
||||||
|
files: lcov.info
|
||||||
|
|
||||||
|
36
.github/workflows/check-exampleKcl.yml
vendored
Normal file
36
.github/workflows/check-exampleKcl.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Check Onboarding KCL
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize]
|
||||||
|
paths:
|
||||||
|
- 'src/lib/exampleKcl.ts'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
comment:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Comment on PR
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const message = '`src/lib/exampleKcl.ts` has been updated in this PR, please review and update the `src/routes/onboarding`, if needed.';
|
||||||
|
const issue_number = context.payload.pull_request.number;
|
||||||
|
const owner = context.repo.owner;
|
||||||
|
const repo = context.repo.repo;
|
||||||
|
|
||||||
|
// Post a comment on the PR
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number,
|
||||||
|
body: message,
|
||||||
|
});
|
136
.github/workflows/ci.yml
vendored
136
.github/workflows/ci.yml
vendored
@ -46,6 +46,7 @@ jobs:
|
|||||||
workspaces: './src/wasm-lib'
|
workspaces: './src/wasm-lib'
|
||||||
|
|
||||||
- run: yarn build:wasm
|
- run: yarn build:wasm
|
||||||
|
- run: yarn xstate:typegen
|
||||||
- run: yarn tsc
|
- run: yarn tsc
|
||||||
|
|
||||||
|
|
||||||
@ -55,7 +56,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
- name: Install codespell
|
- name: Install codespell
|
||||||
run: |
|
run: |
|
||||||
python -m pip install codespell
|
python -m pip install codespell
|
||||||
@ -85,8 +86,6 @@ jobs:
|
|||||||
|
|
||||||
- run: yarn test:nowatch
|
- run: yarn test:nowatch
|
||||||
|
|
||||||
- run: yarn test:cov
|
|
||||||
|
|
||||||
|
|
||||||
prepare-json-files:
|
prepare-json-files:
|
||||||
runs-on: ubuntu-latest # seperate job on Ubuntu for easy string manipulations (compared to Windows)
|
runs-on: ubuntu-latest # seperate job on Ubuntu for easy string manipulations (compared to Windows)
|
||||||
@ -104,8 +103,12 @@ jobs:
|
|||||||
if: github.event_name == 'schedule'
|
if: github.event_name == 'schedule'
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(date +'%-y.%-m.%-d') yarn bump-jsons
|
VERSION=$(date +'%-y.%-m.%-d') yarn bump-jsons
|
||||||
echo "$(jq --arg url 'https://dl.kittycad.io/releases/modeling-app/nightly/last_update.json' \
|
echo "$(jq --arg url 'https://dl.zoo.dev/releases/modeling-app/nightly/last_update.json' \
|
||||||
'.tauri.updater.endpoints[]=$url' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json
|
'.plugins.updater.endpoints[]=$url' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json
|
||||||
|
echo "$(jq --arg id 'dev.zoo.modeling-app-nightly' \
|
||||||
|
'.identifier=$id' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json
|
||||||
|
echo "$(jq --arg name 'Zoo Modeling App (Nightly)' \
|
||||||
|
'.productName=$name' src-tauri/tauri.release.conf.json --indent 2)" > src-tauri/tauri.release.conf.json
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: github.event_name == 'schedule'
|
if: github.event_name == 'schedule'
|
||||||
@ -123,8 +126,12 @@ jobs:
|
|||||||
needs: [prepare-json-files]
|
needs: [prepare-json-files]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
os: [macos-14, ubuntu-latest, windows-latest]
|
||||||
|
env:
|
||||||
|
TAURI_ARGS_MACOS: ${{ matrix.os == 'macos-14' && '--target universal-apple-darwin' || '' }}
|
||||||
|
TAURI_ARGS_UBUNTU: ${{ matrix.os == 'ubuntu-latest' && '--bundles' || '' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -140,14 +147,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Install ubuntu system dependencies
|
- name: Install ubuntu system dependencies
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: >
|
run: |
|
||||||
sudo apt-get update &&
|
sudo apt-get update
|
||||||
sudo apt-get install -y
|
sudo apt-get install -y \
|
||||||
libgtk-3-dev
|
libgtk-3-dev \
|
||||||
libgtksourceview-3.0-dev
|
libayatana-appindicator3-dev \
|
||||||
webkit2gtk-4.0
|
webkit2gtk-driver \
|
||||||
libappindicator3-dev
|
libsoup-3.0-dev \
|
||||||
webkit2gtk-driver
|
libjavascriptcoregtk-4.1-dev \
|
||||||
|
libwebkit2gtk-4.1-dev \
|
||||||
|
at-spi2-core \
|
||||||
xvfb
|
xvfb
|
||||||
|
|
||||||
- name: Sync node version and setup cache
|
- name: Sync node version and setup cache
|
||||||
@ -161,7 +170,9 @@ jobs:
|
|||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
# TODO: re-enable for Windows builds, see https://github.com/tauri-apps/tauri/issues/9045
|
||||||
- name: Setup Rust cache
|
- name: Setup Rust cache
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
uses: swatinem/rust-cache@v2
|
uses: swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src-tauri -> target'
|
workspaces: './src-tauri -> target'
|
||||||
@ -181,13 +192,16 @@ jobs:
|
|||||||
cd ../../
|
cd ../../
|
||||||
cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
||||||
|
|
||||||
|
- name: Run vite build (build:both)
|
||||||
|
run: yarn vite build --mode ${{ env.BUILD_RELEASE == 'true' && 'production' || 'development' }}
|
||||||
|
|
||||||
- name: Fix format
|
- name: Fix format
|
||||||
run: yarn fmt
|
run: yarn fmt
|
||||||
|
|
||||||
- name: Install Universal target (MacOS only)
|
- name: Install x86 target for Universal builds (MacOS only)
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-14'
|
||||||
run: |
|
run: |
|
||||||
rustup target add aarch64-apple-darwin
|
rustup target add x86_64-apple-darwin
|
||||||
|
|
||||||
- name: Prepare certificate and variables (Windows only)
|
- name: Prepare certificate and variables (Windows only)
|
||||||
if: ${{ matrix.os == 'windows-latest' && env.BUILD_RELEASE == 'true' }}
|
if: ${{ matrix.os == 'windows-latest' && env.BUILD_RELEASE == 'true' }}
|
||||||
@ -221,14 +235,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
includeRelease: false
|
includeRelease: false
|
||||||
includeDebug: true
|
includeDebug: true
|
||||||
args: ${{ matrix.os == 'macos-latest' && '--target universal-apple-darwin' || '' }}
|
args: "${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}"
|
||||||
|
|
||||||
- name: Build the app (release) and sign
|
- name: Build the app (release) and sign
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
if: ${{ env.BUILD_RELEASE == 'true' }}
|
if: ${{ env.BUILD_RELEASE == 'true' }}
|
||||||
env:
|
env:
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||||
@ -237,23 +251,27 @@ jobs:
|
|||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
TAURI_CONF_ARGS: "--config ${{ matrix.os == 'windows-latest' && 'src-tauri\\tauri.release.conf.json' || 'src-tauri/tauri.release.conf.json' }}"
|
TAURI_CONF_ARGS: "--config ${{ matrix.os == 'windows-latest' && 'src-tauri\\tauri.release.conf.json' || 'src-tauri/tauri.release.conf.json' }}"
|
||||||
with:
|
with:
|
||||||
args: "${{ matrix.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} ${{ env.TAURI_CONF_ARGS }}"
|
args: "${{ env.TAURI_CONF_ARGS }} ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: matrix.os != 'ubuntu-latest'
|
||||||
env:
|
env:
|
||||||
PREFIX: ${{ matrix.os == 'macos-latest' && 'src-tauri/target/universal-apple-darwin' || 'src-tauri/target' }}
|
PREFIX: ${{ matrix.os == 'macos-14' && 'src-tauri/target/universal-apple-darwin' || 'src-tauri/target' }}
|
||||||
MODE: ${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }}
|
MODE: ${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }}
|
||||||
with:
|
with:
|
||||||
path: "${{ env.PREFIX }}/${{ env.MODE }}/bundle/*/*"
|
path: "${{ env.PREFIX }}/${{ env.MODE }}/bundle/*/*"
|
||||||
|
|
||||||
|
# TODO: re-enable linux e2e tests when possible
|
||||||
- name: Run e2e tests (linux only)
|
- name: Run e2e tests (linux only)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: false
|
||||||
run: |
|
run: |
|
||||||
cargo install tauri-driver
|
cargo install tauri-driver
|
||||||
|
source .env.${{ env.BUILD_RELEASE == 'true' && 'production' || 'development' }}
|
||||||
|
export VITE_KC_API_BASE_URL
|
||||||
xvfb-run yarn test:e2e:tauri
|
xvfb-run yarn test:e2e:tauri
|
||||||
env:
|
env:
|
||||||
E2E_APPLICATION: "./src-tauri/target/${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }}/kittycad-modeling"
|
E2E_APPLICATION: "./src-tauri/target/${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }}/zoo-modeling-app"
|
||||||
KITTYCAD_API_TOKEN: ${{ secrets.KITTYCAD_API_TOKEN }}
|
KITTYCAD_API_TOKEN: ${{ env.BUILD_RELEASE == 'true' && secrets.KITTYCAD_API_TOKEN || secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
|
||||||
|
|
||||||
publish-apps-release:
|
publish-apps-release:
|
||||||
@ -266,26 +284,25 @@ jobs:
|
|||||||
PUB_DATE: ${{ github.event_name == 'release' && github.event.release.created_at || github.event.repository.updated_at }}
|
PUB_DATE: ${{ github.event_name == 'release' && github.event.release.created_at || github.event.repository.updated_at }}
|
||||||
NOTES: ${{ github.event_name == 'release' && github.event.release.body || format('Nightly build, commit {0}', github.sha) }}
|
NOTES: ${{ github.event_name == 'release' && github.event.release.body || format('Nightly build, commit {0}', github.sha) }}
|
||||||
BUCKET_DIR: ${{ github.event_name == 'release' && 'dl.kittycad.io/releases/modeling-app' || 'dl.kittycad.io/releases/modeling-app/nightly' }}
|
BUCKET_DIR: ${{ github.event_name == 'release' && 'dl.kittycad.io/releases/modeling-app' || 'dl.kittycad.io/releases/modeling-app/nightly' }}
|
||||||
|
WEBSITE_DIR: ${{ github.event_name == 'release' && 'dl.zoo.dev/releases/modeling-app' || 'dl.zoo.dev/releases/modeling-app/nightly' }}
|
||||||
|
URL_CODED_NAME: ${{ github.event_name == 'schedule' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
|
|
||||||
- name: Generate the update static endpoint
|
- name: Generate the update static endpoint
|
||||||
run: |
|
run: |
|
||||||
ls -l artifact/*/*itty*
|
ls -l artifact/*/*oo*
|
||||||
DARWIN_SIG=`cat artifact/macos/*.app.tar.gz.sig`
|
DARWIN_SIG=`cat artifact/macos/*.app.tar.gz.sig`
|
||||||
LINUX_SIG=`cat artifact/appimage/*.AppImage.tar.gz.sig`
|
|
||||||
WINDOWS_SIG=`cat artifact/msi/*.msi.zip.sig`
|
WINDOWS_SIG=`cat artifact/msi/*.msi.zip.sig`
|
||||||
RELEASE_DIR=https://${BUCKET_DIR}/${VERSION}
|
RELEASE_DIR=https://${WEBSITE_DIR}/${VERSION}
|
||||||
jq --null-input \
|
jq --null-input \
|
||||||
--arg version "${VERSION}" \
|
--arg version "${VERSION}" \
|
||||||
--arg pub_date "${PUB_DATE}" \
|
--arg pub_date "${PUB_DATE}" \
|
||||||
--arg notes "${NOTES}" \
|
--arg notes "${NOTES}" \
|
||||||
--arg darwin_sig "$DARWIN_SIG" \
|
--arg darwin_sig "$DARWIN_SIG" \
|
||||||
--arg darwin_url "$RELEASE_DIR/macos/KittyCAD%20Modeling.app.tar.gz" \
|
--arg darwin_url "$RELEASE_DIR/macos/${{ env.URL_CODED_NAME }}.app.tar.gz" \
|
||||||
--arg linux_sig "$LINUX_SIG" \
|
|
||||||
--arg linux_url "$RELEASE_DIR/appimage/kittycad-modeling_${VERSION_NO_V}_amd64.AppImage.tar.gz" \
|
|
||||||
--arg windows_sig "$WINDOWS_SIG" \
|
--arg windows_sig "$WINDOWS_SIG" \
|
||||||
--arg windows_url "$RELEASE_DIR/msi/KittyCAD%20Modeling_${VERSION_NO_V}_x64_en-US.msi.zip" \
|
--arg windows_url "$RELEASE_DIR/msi/${{ env.URL_CODED_NAME }}_${VERSION_NO_V}_x64_en-US.msi.zip" \
|
||||||
'{
|
'{
|
||||||
"version": $version,
|
"version": $version,
|
||||||
"pub_date": $pub_date,
|
"pub_date": $pub_date,
|
||||||
@ -299,10 +316,6 @@ jobs:
|
|||||||
"signature": $darwin_sig,
|
"signature": $darwin_sig,
|
||||||
"url": $darwin_url
|
"url": $darwin_url
|
||||||
},
|
},
|
||||||
"linux-x86_64": {
|
|
||||||
"signature": $linux_sig,
|
|
||||||
"url": $linux_url
|
|
||||||
},
|
|
||||||
"windows-x86_64": {
|
"windows-x86_64": {
|
||||||
"signature": $windows_sig,
|
"signature": $windows_sig,
|
||||||
"url": $windows_url
|
"url": $windows_url
|
||||||
@ -313,14 +326,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate the download static endpoint
|
- name: Generate the download static endpoint
|
||||||
run: |
|
run: |
|
||||||
RELEASE_DIR=https://${BUCKET_DIR}/${VERSION}
|
RELEASE_DIR=https://${WEBSITE_DIR}/${VERSION}
|
||||||
jq --null-input \
|
jq --null-input \
|
||||||
--arg version "${VERSION}" \
|
--arg version "${VERSION}" \
|
||||||
--arg pub_date "${PUB_DATE}" \
|
--arg pub_date "${PUB_DATE}" \
|
||||||
--arg notes "${NOTES}" \
|
--arg notes "${NOTES}" \
|
||||||
--arg darwin_url "$RELEASE_DIR/dmg/KittyCAD%20Modeling_${VERSION_NO_V}_universal.dmg" \
|
--arg darwin_url "$RELEASE_DIR/dmg/${{ env.URL_CODED_NAME }}_${VERSION_NO_V}_universal.dmg" \
|
||||||
--arg linux_url "$RELEASE_DIR/appimage/kittycad-modeling_${VERSION_NO_V}_amd64.AppImage" \
|
--arg windows_url "$RELEASE_DIR/msi/${{ env.URL_CODED_NAME }}_${VERSION_NO_V}_x64_en-US.msi" \
|
||||||
--arg windows_url "$RELEASE_DIR/msi/KittyCAD%20Modeling_${VERSION_NO_V}_x64_en-US.msi" \
|
|
||||||
'{
|
'{
|
||||||
"version": $version,
|
"version": $version,
|
||||||
"pub_date": $pub_date,
|
"pub_date": $pub_date,
|
||||||
@ -329,9 +341,6 @@ jobs:
|
|||||||
"dmg-universal": {
|
"dmg-universal": {
|
||||||
"url": $darwin_url
|
"url": $darwin_url
|
||||||
},
|
},
|
||||||
"appimage-x86_64": {
|
|
||||||
"url": $linux_url
|
|
||||||
},
|
|
||||||
"msi-x86_64": {
|
"msi-x86_64": {
|
||||||
"url": $windows_url
|
"url": $windows_url
|
||||||
}
|
}
|
||||||
@ -340,37 +349,62 @@ jobs:
|
|||||||
cat last_download.json
|
cat last_download.json
|
||||||
|
|
||||||
- name: Authenticate to Google Cloud
|
- name: Authenticate to Google Cloud
|
||||||
uses: 'google-github-actions/auth@v2.0.0'
|
uses: 'google-github-actions/auth@v2.1.2'
|
||||||
with:
|
with:
|
||||||
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
||||||
|
|
||||||
- name: Set up Google Cloud SDK
|
- name: Set up Google Cloud SDK
|
||||||
uses: google-github-actions/setup-gcloud@v1.1.1
|
uses: google-github-actions/setup-gcloud@v2.1.0
|
||||||
with:
|
with:
|
||||||
project_id: kittycadapi
|
project_id: kittycadapi
|
||||||
|
|
||||||
- name: Upload release files to public bucket
|
- name: Upload release files to public bucket
|
||||||
uses: google-github-actions/upload-cloud-storage@v1.0.3
|
uses: google-github-actions/upload-cloud-storage@v2.1.0
|
||||||
with:
|
with:
|
||||||
path: artifact
|
path: artifact
|
||||||
glob: '*/*itty*'
|
glob: '*/Zoo*'
|
||||||
parent: false
|
parent: false
|
||||||
destination: ${{ env.BUCKET_DIR }}/${{ env.VERSION }}
|
destination: ${{ env.BUCKET_DIR }}/${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Upload update endpoint to public bucket
|
- name: Upload update endpoint to public bucket
|
||||||
uses: google-github-actions/upload-cloud-storage@v1.0.3
|
uses: google-github-actions/upload-cloud-storage@v2.1.0
|
||||||
with:
|
with:
|
||||||
path: last_update.json
|
path: last_update.json
|
||||||
destination: ${{ env.BUCKET_DIR }}
|
destination: ${{ env.BUCKET_DIR }}
|
||||||
|
|
||||||
- name: Upload download endpoint to public bucket
|
- name: Upload download endpoint to public bucket
|
||||||
uses: google-github-actions/upload-cloud-storage@v1.0.3
|
uses: google-github-actions/upload-cloud-storage@v2.1.0
|
||||||
with:
|
with:
|
||||||
path: last_download.json
|
path: last_download.json
|
||||||
destination: ${{ env.BUCKET_DIR }}
|
destination: ${{ env.BUCKET_DIR }}
|
||||||
|
|
||||||
- name: Upload release files to Github
|
- name: Upload release files to Github
|
||||||
if: ${{ github.event_name == 'release' }}
|
if: ${{ github.event_name == 'release' }}
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: artifact/*/*itty*
|
files: 'artifact/*/Zoo*'
|
||||||
|
|
||||||
|
announce_release:
|
||||||
|
needs: [publish-apps-release]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install requests
|
||||||
|
|
||||||
|
- name: Announce Release
|
||||||
|
env:
|
||||||
|
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
RELEASE_VERSION: ${{ github.event.release.tag_name }}
|
||||||
|
RELEASE_BODY: ${{ github.event.release.body}}
|
||||||
|
run: python public/announce_release.py
|
||||||
|
65
.github/workflows/generate-website-docs.yml
vendored
Normal file
65
.github/workflows/generate-website-docs.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- .github/workflows/generate-website-docs.yml
|
||||||
|
- 'docs/**'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- .github/workflows/generate-website-docs.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
name: generate-website-docs
|
||||||
|
concurrency:
|
||||||
|
group: docs-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
generate-website-docs:
|
||||||
|
name: generate-website-docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
# required
|
||||||
|
app-id: ${{ secrets.GH_ORG_APP_ID }}
|
||||||
|
private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
|
# Checkout the docs repo since we will want to update the files there.
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: 'kittycad/documentation'
|
||||||
|
path: 'documentation'
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
- name: move docs to docs
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p documentation/content/pages/docs/kcl/
|
||||||
|
# cleanup old
|
||||||
|
rm -rf documentation/content/pages/docs/kcl/*.md
|
||||||
|
# move new
|
||||||
|
mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/
|
||||||
|
- name: commit the changes in the docs repo
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd documentation
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git add .
|
||||||
|
git commit -am "YOYO NEW KCL DOCS!!" || exit 0
|
||||||
|
git fetch origin
|
||||||
|
git rebase origin/main || exit 0
|
||||||
|
export NEW_BRANCH="update-kcl-docs"
|
||||||
|
git checkout -b "$NEW_BRANCH"
|
||||||
|
git push -f origin "$NEW_BRANCH"
|
||||||
|
gh pr create --title "Update KCL docs" \
|
||||||
|
--body "Updating the generated kcl docs cc @jessfraz @franknoirot merge this" \
|
||||||
|
--head "$NEW_BRANCH" \
|
||||||
|
--reviewer jessfraz \
|
||||||
|
--reviewer irev-dev \
|
||||||
|
--reviewer franknoirot \
|
||||||
|
--base main || true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
|
|
95
.github/workflows/playwright.yml
vendored
95
.github/workflows/playwright.yml
vendored
@ -4,27 +4,82 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
check-rust-changes:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
rust-changed: ${{ steps.filter.outputs.rust }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- id: filter
|
||||||
|
name: Check for Rust changes
|
||||||
|
uses: dorny/paths-filter@v3
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
rust:
|
||||||
|
- 'src/wasm-lib/**'
|
||||||
|
|
||||||
playwright-ubuntu:
|
playwright-ubuntu:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest-8-cores
|
||||||
|
needs: check-rust-changes
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
- uses: KittyCAD/action-install-cli@main
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps
|
||||||
|
- name: Download Wasm Cache
|
||||||
|
id: download-wasm
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
|
uses: dawidd6/action-download-artifact@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
name: wasm-bundle
|
||||||
|
workflow: build-and-store-wasm.yml
|
||||||
|
branch: main
|
||||||
|
path: src/wasm-lib/pkg
|
||||||
|
- name: copy wasm blob
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
|
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
||||||
|
continue-on-error: true
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Cache wasm
|
- name: Cache Wasm (because rust diff)
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './src/wasm-lib'
|
||||||
- name: build wasm
|
- name: OR Cache Wasm (because wasm cache failed)
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './src/wasm-lib'
|
||||||
|
- name: Build Wasm (because rust diff)
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
|
run: yarn build:wasm
|
||||||
|
- name: OR Build Wasm (because wasm cache failed)
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: build web
|
- name: build web
|
||||||
run: yarn build:local
|
run: yarn build:local
|
||||||
@ -33,6 +88,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }}
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
@ -77,8 +133,8 @@ jobs:
|
|||||||
|
|
||||||
playwright-macos:
|
playwright-macos:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
runs-on: macos-latest
|
runs-on: macos-14
|
||||||
needs: playwright-ubuntu
|
needs: check-rust-changes
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
@ -89,13 +145,38 @@ jobs:
|
|||||||
run: yarn
|
run: yarn
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps
|
||||||
|
- name: Download Wasm Cache
|
||||||
|
id: download-wasm
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
|
uses: dawidd6/action-download-artifact@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
name: wasm-bundle
|
||||||
|
workflow: build-and-store-wasm.yml
|
||||||
|
branch: main
|
||||||
|
path: src/wasm-lib/pkg
|
||||||
|
- name: copy wasm blob
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'false'
|
||||||
|
run: cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
||||||
|
continue-on-error: true
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Cache wasm
|
- name: Cache Wasm (because rust diff)
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: './src/wasm-lib'
|
workspaces: './src/wasm-lib'
|
||||||
- name: build wasm
|
- name: OR Cache Wasm (because wasm cache failed)
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './src/wasm-lib'
|
||||||
|
- name: Build Wasm (because rust diff)
|
||||||
|
if: needs.check-rust-changes.outputs.rust-changed == 'true'
|
||||||
|
run: yarn build:wasm
|
||||||
|
- name: OR Build Wasm (because wasm cache failed)
|
||||||
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: build web
|
- name: build web
|
||||||
run: yarn build:local
|
run: yarn build:local
|
||||||
|
21
.github/workflows/vector.toml
vendored
Normal file
21
.github/workflows/vector.toml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[sources.github-actions-file]
|
||||||
|
type = "file"
|
||||||
|
data_dir = "/tmp/vector"
|
||||||
|
include = ["/tmp/github-actions.log"]
|
||||||
|
|
||||||
|
# Modify the logs to include the action name.
|
||||||
|
[transforms.add-action-name]
|
||||||
|
type = "remap"
|
||||||
|
inputs = [ "github-actions-file" ]
|
||||||
|
source = '''
|
||||||
|
.action = "GITHUB_WORKFLOW"
|
||||||
|
.repo = "GITHUB_REPOSITORY"
|
||||||
|
.sha = "GITHUB_SHA"
|
||||||
|
.ref = "GITHUB_REF_NAME"
|
||||||
|
'''
|
||||||
|
|
||||||
|
[sinks.axiom]
|
||||||
|
type = "axiom"
|
||||||
|
inputs = ["add-action-name"]
|
||||||
|
token = "GH_ACTIONS_AXIOM_TOKEN"
|
||||||
|
dataset = "github-actions"
|
13
.gitignore
vendored
13
.gitignore
vendored
@ -33,11 +33,24 @@ src/wasm-lib/bindings
|
|||||||
src/wasm-lib/kcl/bindings
|
src/wasm-lib/kcl/bindings
|
||||||
public/wasm_lib_bg.wasm
|
public/wasm_lib_bg.wasm
|
||||||
src/wasm-lib/lcov.info
|
src/wasm-lib/lcov.info
|
||||||
|
src/wasm-lib/grackle/test_json_output
|
||||||
|
|
||||||
e2e/playwright/playwright-secrets.env
|
e2e/playwright/playwright-secrets.env
|
||||||
e2e/playwright/temp1.png
|
e2e/playwright/temp1.png
|
||||||
e2e/playwright/temp2.png
|
e2e/playwright/temp2.png
|
||||||
|
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
||||||
|
e2e/playwright/export-snapshots/*
|
||||||
|
!e2e/playwright/export-snapshots/*.png
|
||||||
|
|
||||||
|
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/blob-report/
|
/blob-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
|
|
||||||
|
|
||||||
|
## generated files
|
||||||
|
src/**/*.typegen.ts
|
||||||
|
src-tauri/gen
|
||||||
|
|
||||||
|
src/wasm-lib/grackle/stdlib_cube_partial.json
|
||||||
|
@ -10,4 +10,4 @@ src/wasm-lib/kcl/bindings
|
|||||||
e2e/playwright/export-snapshots
|
e2e/playwright/export-snapshots
|
||||||
|
|
||||||
# XState generated files
|
# XState generated files
|
||||||
src/machines/modelingMachine.typegen.ts
|
src/machines/**.typegen.ts
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2023 The KittyCAD Authors
|
Copyright (c) 2023 The Zoo Authors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
34
README.md
34
README.md
@ -1,17 +1,17 @@
|
|||||||

|

|
||||||
|
|
||||||
## KittyCAD Modeling App
|
## Zoo Modeling App
|
||||||
|
|
||||||
live at [app.kittycad.io](https://app.kittycad.io/)
|
live at [app.zoo.dev](https://app.zoo.dev/)
|
||||||
|
|
||||||
A CAD application from the future, brought to you by the [KittyCAD team](https://kittycad.io).
|
A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev).
|
||||||
|
|
||||||
The KittyCAD modeling app is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence:
|
Modeling App is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence:
|
||||||
|
|
||||||
- All artifacts—including parts and assemblies—should be represented as human-readable code. At the end of the day, your CAD project should be "plain text"
|
- All artifacts—including parts and assemblies—should be represented as human-readable code. At the end of the day, your CAD project should be "plain text"
|
||||||
- This makes version control—which is a solved problem in software engineering—trivial for CAD
|
- This makes version control—which is a solved problem in software engineering—trivial for CAD
|
||||||
- All GUI (or point-and-click) interactions should be actions performed on this code representation under the hood
|
- All GUI (or point-and-click) interactions should be actions performed on this code representation under the hood
|
||||||
- This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in KittyCAD Modeling App
|
- This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in Modeling App
|
||||||
- Everything graphics _has_ to be built for the GPU
|
- Everything graphics _has_ to be built for the GPU
|
||||||
- Most CAD applications have had to retrofit support for GPUs, but our geometry engine is made for GPUs (primarily Nvidia's Vulkan), getting the order of magnitude rendering performance boost with it
|
- Most CAD applications have had to retrofit support for GPUs, but our geometry engine is made for GPUs (primarily Nvidia's Vulkan), getting the order of magnitude rendering performance boost with it
|
||||||
- Make the resource-intensive pieces of an application auto-scaling
|
- Make the resource-intensive pieces of an application auto-scaling
|
||||||
@ -19,9 +19,9 @@ The KittyCAD modeling app is our take on what a modern modelling experience can
|
|||||||
|
|
||||||
We are excited about what a small team of people could build in a short time with our API. We welcome you to try our API, build your own applications, or contribute to ours!
|
We are excited about what a small team of people could build in a short time with our API. We welcome you to try our API, build your own applications, or contribute to ours!
|
||||||
|
|
||||||
KittyCAD Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more.
|
Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more.
|
||||||
|
|
||||||
The 3D view in KittyCAD Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine.
|
The 3D view in Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine.
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
||||||
@ -59,6 +59,10 @@ followed by:
|
|||||||
```
|
```
|
||||||
yarn build:wasm-dev
|
yarn build:wasm-dev
|
||||||
```
|
```
|
||||||
|
or if you have the gh cli installed
|
||||||
|
```
|
||||||
|
./get-latest-wasm-bundle.sh # this will download the latest main wasm bundle
|
||||||
|
```
|
||||||
|
|
||||||
That will build the WASM binary and put in the `public` dir (though gitignored)
|
That will build the WASM binary and put in the `public` dir (though gitignored)
|
||||||
|
|
||||||
@ -94,7 +98,6 @@ For running the rust (not tauri rust though) only, you can
|
|||||||
cd src/wasm-lib
|
cd src/wasm-lib
|
||||||
cargo test
|
cargo test
|
||||||
```
|
```
|
||||||
but you will need to have install ffmpeg prior to.
|
|
||||||
|
|
||||||
## Tauri
|
## Tauri
|
||||||
|
|
||||||
@ -137,7 +140,12 @@ Before you submit a contribution PR to this repo, please ensure that:
|
|||||||
VERSION=x.y.z yarn run bump-jsons
|
VERSION=x.y.z yarn run bump-jsons
|
||||||
```
|
```
|
||||||
|
|
||||||
The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and past in the following
|
Alternatively you can try the experimental `make-release.sh` bash script that will create the branch with the updated json files for you.
|
||||||
|
run `./make-release.sh` for a patch update
|
||||||
|
run `./make-release.sh "minor"` for minor
|
||||||
|
run `./make-release.sh "major"` for major
|
||||||
|
|
||||||
|
The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and paste in the following
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
console.log(
|
console.log(
|
||||||
@ -183,9 +191,9 @@ For more information on fuzzing you can check out
|
|||||||
First time running plawright locally, you'll need to add the secrets file
|
First time running plawright locally, you'll need to add the secrets file
|
||||||
```bash
|
```bash
|
||||||
touch ./e2e/playwright/playwright-secrets.env
|
touch ./e2e/playwright/playwright-secrets.env
|
||||||
echo 'token="your-token"' > ./e2e/playwright/playwright-secrets.env
|
printf 'token="your-token"\nsnapshottoken="your-snapshot-token"' > ./e2e/playwright/playwright-secrets.env
|
||||||
```
|
```
|
||||||
then replace "your-token" with a dev token from dev.kittycad.io/account/api-tokens
|
then replace "your-token" with a dev token from dev.zoo.dev/account/api-tokens
|
||||||
|
|
||||||
then:
|
then:
|
||||||
run playwright
|
run playwright
|
||||||
@ -277,7 +285,7 @@ https://github.com/KittyCAD/modeling-app/assets/29681384/6f5e8e85-1003-4fd9-be7f
|
|||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary>
|
<summary>
|
||||||
Ps for the debug panel, the following JSON is useful for snapping the camera
|
PS: for the debug panel, the following JSON is useful for snapping the camera
|
||||||
</summary>
|
</summary>
|
||||||
|
|
||||||
```JSON
|
```JSON
|
||||||
|
BIN
app-icon.png
BIN
app-icon.png
Binary file not shown.
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 113 KiB |
@ -1,3 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ["@babel/preset-env"],
|
presets: ['@babel/preset-env'],
|
||||||
}
|
}
|
||||||
|
20
docs/kcl/KNOWN-ISSUES.md
Normal file
20
docs/kcl/KNOWN-ISSUES.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: "KCL Known Issues"
|
||||||
|
excerpt: "Known issues with the KCL standard library for the Zoo Modeling App."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
The following are bugs that are not in modeling-app or kcl itself. These bugs
|
||||||
|
once fixed in engine will just start working here with no language changes.
|
||||||
|
|
||||||
|
- **Sketch on Face**: If your sketch is outside the edges of the face (on which you
|
||||||
|
are sketching) you will get multiple models returned instead of one single
|
||||||
|
model for that sketch and its underlying 3D object.
|
||||||
|
If you see a red line around your model, it means this is happening.
|
||||||
|
|
||||||
|
- **Import**: Right now you can import a file, even if that file has brep data
|
||||||
|
you cannot edit it, after v1, the engine will account for this. You also cannot
|
||||||
|
currently move or transform the imported objects at all, once we have assemblies
|
||||||
|
this will work.
|
||||||
|
|
||||||
|
- **Fillets**: Fillets cannot intersect, you will get an error. Only simple fillet cases work currently.
|
34
docs/kcl/abs.md
Normal file
34
docs/kcl/abs.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "abs"
|
||||||
|
excerpt: "Computes the absolute value of a number."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the absolute value of a number.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
abs(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = abs(-4)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/acos.md
Normal file
34
docs/kcl/acos.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "acos"
|
||||||
|
excerpt: "Computes the arccosine of a number (in radians)."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the arccosine of a number (in radians).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
acos(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = acos(0.5)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
207
docs/kcl/angleToMatchLengthX.md
Normal file
207
docs/kcl/angleToMatchLengthX.md
Normal file
File diff suppressed because one or more lines are too long
207
docs/kcl/angleToMatchLengthY.md
Normal file
207
docs/kcl/angleToMatchLengthY.md
Normal file
File diff suppressed because one or more lines are too long
379
docs/kcl/angledLine.md
Normal file
379
docs/kcl/angledLine.md
Normal file
File diff suppressed because one or more lines are too long
379
docs/kcl/angledLineOfXLength.md
Normal file
379
docs/kcl/angledLineOfXLength.md
Normal file
File diff suppressed because one or more lines are too long
380
docs/kcl/angledLineOfYLength.md
Normal file
380
docs/kcl/angledLineOfYLength.md
Normal file
File diff suppressed because one or more lines are too long
385
docs/kcl/angledLineThatIntersects.md
Normal file
385
docs/kcl/angledLineThatIntersects.md
Normal file
File diff suppressed because one or more lines are too long
379
docs/kcl/angledLineToX.md
Normal file
379
docs/kcl/angledLineToX.md
Normal file
File diff suppressed because one or more lines are too long
378
docs/kcl/angledLineToY.md
Normal file
378
docs/kcl/angledLineToY.md
Normal file
File diff suppressed because one or more lines are too long
389
docs/kcl/arc.md
Normal file
389
docs/kcl/arc.md
Normal file
File diff suppressed because one or more lines are too long
34
docs/kcl/asin.md
Normal file
34
docs/kcl/asin.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "asin"
|
||||||
|
excerpt: "Computes the arcsine of a number (in radians)."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the arcsine of a number (in radians).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
asin(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = asin(0.5)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/atan.md
Normal file
34
docs/kcl/atan.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "atan"
|
||||||
|
excerpt: "Computes the arctangent of a number (in radians)."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the arctangent of a number (in radians).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
atan(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = atan(1.0)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
382
docs/kcl/bezierCurve.md
Normal file
382
docs/kcl/bezierCurve.md
Normal file
File diff suppressed because one or more lines are too long
34
docs/kcl/ceil.md
Normal file
34
docs/kcl/ceil.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "ceil"
|
||||||
|
excerpt: "Computes the smallest integer greater than or equal to a number."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the smallest integer greater than or equal to a number.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
ceil(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = ceil(4.5)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
439
docs/kcl/circle.md
Normal file
439
docs/kcl/circle.md
Normal file
File diff suppressed because one or more lines are too long
379
docs/kcl/close.md
Normal file
379
docs/kcl/close.md
Normal file
File diff suppressed because one or more lines are too long
34
docs/kcl/cos.md
Normal file
34
docs/kcl/cos.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "cos"
|
||||||
|
excerpt: "Computes the cosine of a number (in radians)."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the cosine of a number (in radians).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
cos(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const anotherVar = cos(2 * pi())
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
33
docs/kcl/e.md
Normal file
33
docs/kcl/e.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
title: "e"
|
||||||
|
excerpt: "Return the value of Euler’s number `e`."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Return the value of Euler’s number `e`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
e() -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = e()
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
342
docs/kcl/extrude.md
Normal file
342
docs/kcl/extrude.md
Normal file
File diff suppressed because one or more lines are too long
309
docs/kcl/fillet.md
Normal file
309
docs/kcl/fillet.md
Normal file
File diff suppressed because one or more lines are too long
34
docs/kcl/floor.md
Normal file
34
docs/kcl/floor.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "floor"
|
||||||
|
excerpt: "Computes the largest integer less than or equal to a number."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the largest integer less than or equal to a number.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
floor(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = floor(4.5)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
180
docs/kcl/getEdge.md
Normal file
180
docs/kcl/getEdge.md
Normal file
File diff suppressed because one or more lines are too long
177
docs/kcl/getExtrudeWallTransform.md
Normal file
177
docs/kcl/getExtrudeWallTransform.md
Normal file
File diff suppressed because one or more lines are too long
173
docs/kcl/getNextAdjacentEdge.md
Normal file
173
docs/kcl/getNextAdjacentEdge.md
Normal file
File diff suppressed because one or more lines are too long
173
docs/kcl/getOppositeEdge.md
Normal file
173
docs/kcl/getOppositeEdge.md
Normal file
File diff suppressed because one or more lines are too long
173
docs/kcl/getPreviousAdjacentEdge.md
Normal file
173
docs/kcl/getPreviousAdjacentEdge.md
Normal file
File diff suppressed because one or more lines are too long
308
docs/kcl/helix.md
Normal file
308
docs/kcl/helix.md
Normal file
File diff suppressed because one or more lines are too long
540
docs/kcl/hole.md
Normal file
540
docs/kcl/hole.md
Normal file
File diff suppressed because one or more lines are too long
136
docs/kcl/import.md
Normal file
136
docs/kcl/import.md
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
---
|
||||||
|
title: "import"
|
||||||
|
excerpt: "Import a CAD file."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Import a CAD file.
|
||||||
|
|
||||||
|
For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well.
|
||||||
|
Import paths are relative to the current project directory. This only works in the desktop app not in browser.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import(file_path: String, options?: ImportFormat) -> ImportedGeometry
|
||||||
|
```
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const model = import("thing.obj")
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
const model = import("cube.obj", { type: "obj", units: "m" })
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
const model = import("my_model.gltf")
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
const model = import("my_model.sldprt")
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
const model = import("my_model.step")
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `file_path`: `String` (REQUIRED)
|
||||||
|
* `options`: `ImportFormat` - Import format specifier (OPTIONAL)
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
type: "fbx",
|
||||||
|
} |
|
||||||
|
{
|
||||||
|
type: "gltf",
|
||||||
|
} |
|
||||||
|
{
|
||||||
|
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
|
||||||
|
coords: {
|
||||||
|
// Axis the front face of a model looks along.
|
||||||
|
forward: {
|
||||||
|
// Axis specifier.
|
||||||
|
axis: "y" | "z",
|
||||||
|
// Specifies which direction the axis is pointing.
|
||||||
|
direction: "positive" | "negative",
|
||||||
|
},
|
||||||
|
// Axis pointing up and away from a model.
|
||||||
|
up: {
|
||||||
|
// Axis specifier.
|
||||||
|
axis: "y" | "z",
|
||||||
|
// Specifies which direction the axis is pointing.
|
||||||
|
direction: "positive" | "negative",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
type: "obj",
|
||||||
|
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
|
||||||
|
units: "cm" | "ft" | "in" | "m" | "mm" | "yd",
|
||||||
|
} |
|
||||||
|
{
|
||||||
|
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
|
||||||
|
coords: {
|
||||||
|
// Axis the front face of a model looks along.
|
||||||
|
forward: {
|
||||||
|
// Axis specifier.
|
||||||
|
axis: "y" | "z",
|
||||||
|
// Specifies which direction the axis is pointing.
|
||||||
|
direction: "positive" | "negative",
|
||||||
|
},
|
||||||
|
// Axis pointing up and away from a model.
|
||||||
|
up: {
|
||||||
|
// Axis specifier.
|
||||||
|
axis: "y" | "z",
|
||||||
|
// Specifies which direction the axis is pointing.
|
||||||
|
direction: "positive" | "negative",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
type: "ply",
|
||||||
|
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
|
||||||
|
units: "cm" | "ft" | "in" | "m" | "mm" | "yd",
|
||||||
|
} |
|
||||||
|
{
|
||||||
|
type: "sldprt",
|
||||||
|
} |
|
||||||
|
{
|
||||||
|
type: "step",
|
||||||
|
} |
|
||||||
|
{
|
||||||
|
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
|
||||||
|
coords: {
|
||||||
|
// Axis the front face of a model looks along.
|
||||||
|
forward: {
|
||||||
|
// Axis specifier.
|
||||||
|
axis: "y" | "z",
|
||||||
|
// Specifies which direction the axis is pointing.
|
||||||
|
direction: "positive" | "negative",
|
||||||
|
},
|
||||||
|
// Axis pointing up and away from a model.
|
||||||
|
up: {
|
||||||
|
// Axis specifier.
|
||||||
|
axis: "y" | "z",
|
||||||
|
// Specifies which direction the axis is pointing.
|
||||||
|
direction: "positive" | "negative",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
type: "stl",
|
||||||
|
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
|
||||||
|
units: "cm" | "ft" | "in" | "m" | "mm" | "yd",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`ImportedGeometry` - Data for an imported geometry.
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
// The ID of the imported geometry.
|
||||||
|
id: uuid,
|
||||||
|
// The original file paths.
|
||||||
|
value: [string],
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
79
docs/kcl/index.md
Normal file
79
docs/kcl/index.md
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
---
|
||||||
|
title: "KCL Standard Library"
|
||||||
|
excerpt: "Documentation for the KCL standard library for the Zoo Modeling App."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
* [Types](kcl/types)
|
||||||
|
* [Known Issues](kcl/KNOWN-ISSUES)
|
||||||
|
* [`abs`](kcl/abs)
|
||||||
|
* [`acos`](kcl/acos)
|
||||||
|
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
|
||||||
|
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
|
||||||
|
* [`angledLine`](kcl/angledLine)
|
||||||
|
* [`angledLineOfXLength`](kcl/angledLineOfXLength)
|
||||||
|
* [`angledLineOfYLength`](kcl/angledLineOfYLength)
|
||||||
|
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
||||||
|
* [`angledLineToX`](kcl/angledLineToX)
|
||||||
|
* [`angledLineToY`](kcl/angledLineToY)
|
||||||
|
* [`arc`](kcl/arc)
|
||||||
|
* [`asin`](kcl/asin)
|
||||||
|
* [`atan`](kcl/atan)
|
||||||
|
* [`bezierCurve`](kcl/bezierCurve)
|
||||||
|
* [`ceil`](kcl/ceil)
|
||||||
|
* [`circle`](kcl/circle)
|
||||||
|
* [`close`](kcl/close)
|
||||||
|
* [`cos`](kcl/cos)
|
||||||
|
* [`e`](kcl/e)
|
||||||
|
* [`extrude`](kcl/extrude)
|
||||||
|
* [`fillet`](kcl/fillet)
|
||||||
|
* [`floor`](kcl/floor)
|
||||||
|
* [`getEdge`](kcl/getEdge)
|
||||||
|
* [`getExtrudeWallTransform`](kcl/getExtrudeWallTransform)
|
||||||
|
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
||||||
|
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
||||||
|
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
||||||
|
* [`helix`](kcl/helix)
|
||||||
|
* [`hole`](kcl/hole)
|
||||||
|
* [`import`](kcl/import)
|
||||||
|
* [`lastSegX`](kcl/lastSegX)
|
||||||
|
* [`lastSegY`](kcl/lastSegY)
|
||||||
|
* [`legAngX`](kcl/legAngX)
|
||||||
|
* [`legAngY`](kcl/legAngY)
|
||||||
|
* [`legLen`](kcl/legLen)
|
||||||
|
* [`line`](kcl/line)
|
||||||
|
* [`lineTo`](kcl/lineTo)
|
||||||
|
* [`ln`](kcl/ln)
|
||||||
|
* [`log`](kcl/log)
|
||||||
|
* [`log10`](kcl/log10)
|
||||||
|
* [`log2`](kcl/log2)
|
||||||
|
* [`max`](kcl/max)
|
||||||
|
* [`min`](kcl/min)
|
||||||
|
* [`patternCircular2d`](kcl/patternCircular2d)
|
||||||
|
* [`patternCircular3d`](kcl/patternCircular3d)
|
||||||
|
* [`patternLinear2d`](kcl/patternLinear2d)
|
||||||
|
* [`patternLinear3d`](kcl/patternLinear3d)
|
||||||
|
* [`pi`](kcl/pi)
|
||||||
|
* [`pow`](kcl/pow)
|
||||||
|
* [`revolve`](kcl/revolve)
|
||||||
|
* [`segAng`](kcl/segAng)
|
||||||
|
* [`segEndX`](kcl/segEndX)
|
||||||
|
* [`segEndY`](kcl/segEndY)
|
||||||
|
* [`segLen`](kcl/segLen)
|
||||||
|
* [`sin`](kcl/sin)
|
||||||
|
* [`sqrt`](kcl/sqrt)
|
||||||
|
* [`startProfileAt`](kcl/startProfileAt)
|
||||||
|
* [`startSketchAt`](kcl/startSketchAt)
|
||||||
|
* [`startSketchOn`](kcl/startSketchOn)
|
||||||
|
* [`tan`](kcl/tan)
|
||||||
|
* [`tangentialArc`](kcl/tangentialArc)
|
||||||
|
* [`tangentialArcTo`](kcl/tangentialArcTo)
|
||||||
|
* [`tau`](kcl/tau)
|
||||||
|
* [`toDegrees`](kcl/toDegrees)
|
||||||
|
* [`toRadians`](kcl/toRadians)
|
||||||
|
* [`xLine`](kcl/xLine)
|
||||||
|
* [`xLineTo`](kcl/xLineTo)
|
||||||
|
* [`yLine`](kcl/yLine)
|
||||||
|
* [`yLineTo`](kcl/yLineTo)
|
203
docs/kcl/lastSegX.md
Normal file
203
docs/kcl/lastSegX.md
Normal file
File diff suppressed because one or more lines are too long
203
docs/kcl/lastSegY.md
Normal file
203
docs/kcl/lastSegY.md
Normal file
File diff suppressed because one or more lines are too long
35
docs/kcl/legAngX.md
Normal file
35
docs/kcl/legAngX.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
title: "legAngX"
|
||||||
|
excerpt: "Returns the angle of the given leg for x."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Returns the angle of the given leg for x.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
legAngX(hypotenuse: number, leg: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `utilities`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
legAngX(5, 3)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `hypotenuse`: `number` (REQUIRED)
|
||||||
|
* `leg`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
35
docs/kcl/legAngY.md
Normal file
35
docs/kcl/legAngY.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
title: "legAngY"
|
||||||
|
excerpt: "Returns the angle of the given leg for y."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Returns the angle of the given leg for y.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
legAngY(hypotenuse: number, leg: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `utilities`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
legAngY(5, 3)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `hypotenuse`: `number` (REQUIRED)
|
||||||
|
* `leg`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
35
docs/kcl/legLen.md
Normal file
35
docs/kcl/legLen.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
title: "legLen"
|
||||||
|
excerpt: "Returns the length of the given leg."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Returns the length of the given leg.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
legLen(hypotenuse: number, leg: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `utilities`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
legLen(5, 3)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `hypotenuse`: `number` (REQUIRED)
|
||||||
|
* `leg`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
369
docs/kcl/line.md
Normal file
369
docs/kcl/line.md
Normal file
File diff suppressed because one or more lines are too long
376
docs/kcl/lineTo.md
Normal file
376
docs/kcl/lineTo.md
Normal file
File diff suppressed because one or more lines are too long
34
docs/kcl/ln.md
Normal file
34
docs/kcl/ln.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "ln"
|
||||||
|
excerpt: "Computes the natural logarithm of the number."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the natural logarithm of the number.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
ln(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = ln(4)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
35
docs/kcl/log.md
Normal file
35
docs/kcl/log.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
title: "log"
|
||||||
|
excerpt: "Computes the logarithm of the number with respect to an arbitrary base."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the logarithm of the number with respect to an arbitrary base.
|
||||||
|
|
||||||
|
The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10.
|
||||||
|
|
||||||
|
```js
|
||||||
|
log(num: number, base: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = log(4, 2)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
* `base`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/log10.md
Normal file
34
docs/kcl/log10.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "log10"
|
||||||
|
excerpt: "Computes the base 10 logarithm of the number."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the base 10 logarithm of the number.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
log10(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = log10(4)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/log2.md
Normal file
34
docs/kcl/log2.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "log2"
|
||||||
|
excerpt: "Computes the base 2 logarithm of the number."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the base 2 logarithm of the number.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
log2(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = log2(4)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/max.md
Normal file
34
docs/kcl/max.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "max"
|
||||||
|
excerpt: "Computes the maximum of the given arguments."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the maximum of the given arguments.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
max(args: [number]) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = max(4, 5, 6)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `args`: `[number]` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/min.md
Normal file
34
docs/kcl/min.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "min"
|
||||||
|
excerpt: "Computes the minimum of the given arguments."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the minimum of the given arguments.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
min(args: [number]) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = min(4, 5, 6)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `args`: `[number]` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
218
docs/kcl/patternCircular2d.md
Normal file
218
docs/kcl/patternCircular2d.md
Normal file
File diff suppressed because one or more lines are too long
190
docs/kcl/patternCircular3d.md
Normal file
190
docs/kcl/patternCircular3d.md
Normal file
File diff suppressed because one or more lines are too long
219
docs/kcl/patternLinear2d.md
Normal file
219
docs/kcl/patternLinear2d.md
Normal file
File diff suppressed because one or more lines are too long
184
docs/kcl/patternLinear3d.md
Normal file
184
docs/kcl/patternLinear3d.md
Normal file
File diff suppressed because one or more lines are too long
33
docs/kcl/pi.md
Normal file
33
docs/kcl/pi.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
title: "pi"
|
||||||
|
excerpt: "Return the value of `pi`. Archimedes’ constant (π)."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Return the value of `pi`. Archimedes’ constant (π).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
pi() -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = pi() * 3.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
35
docs/kcl/pow.md
Normal file
35
docs/kcl/pow.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
title: "pow"
|
||||||
|
excerpt: "Computes the number to a power."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the number to a power.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
pow(num: number, pow: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = pow(4, 2)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
* `pow`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
444
docs/kcl/revolve.md
Normal file
444
docs/kcl/revolve.md
Normal file
File diff suppressed because one or more lines are too long
206
docs/kcl/segAng.md
Normal file
206
docs/kcl/segAng.md
Normal file
File diff suppressed because one or more lines are too long
204
docs/kcl/segEndX.md
Normal file
204
docs/kcl/segEndX.md
Normal file
File diff suppressed because one or more lines are too long
204
docs/kcl/segEndY.md
Normal file
204
docs/kcl/segEndY.md
Normal file
File diff suppressed because one or more lines are too long
204
docs/kcl/segLen.md
Normal file
204
docs/kcl/segLen.md
Normal file
File diff suppressed because one or more lines are too long
34
docs/kcl/sin.md
Normal file
34
docs/kcl/sin.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "sin"
|
||||||
|
excerpt: "Computes the sine of a number (in radians)."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the sine of a number (in radians).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
sin(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = sin(2 * pi())
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/sqrt.md
Normal file
34
docs/kcl/sqrt.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "sqrt"
|
||||||
|
excerpt: "Computes the square root of a number."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the square root of a number.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
sqrt(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = sqrt(4)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
266
docs/kcl/startProfileAt.md
Normal file
266
docs/kcl/startProfileAt.md
Normal file
File diff suppressed because one or more lines are too long
201
docs/kcl/startSketchAt.md
Normal file
201
docs/kcl/startSketchAt.md
Normal file
File diff suppressed because one or more lines are too long
293
docs/kcl/startSketchOn.md
Normal file
293
docs/kcl/startSketchOn.md
Normal file
File diff suppressed because one or more lines are too long
84336
docs/kcl/std.json
84336
docs/kcl/std.json
File diff suppressed because it is too large
Load Diff
4709
docs/kcl/std.md
4709
docs/kcl/std.md
File diff suppressed because it is too large
Load Diff
34
docs/kcl/tan.md
Normal file
34
docs/kcl/tan.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "tan"
|
||||||
|
excerpt: "Computes the tangent of a number (in radians)."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Computes the tangent of a number (in radians).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
tan(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = tan(2 * pi())
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
378
docs/kcl/tangentialArc.md
Normal file
378
docs/kcl/tangentialArc.md
Normal file
File diff suppressed because one or more lines are too long
369
docs/kcl/tangentialArcTo.md
Normal file
369
docs/kcl/tangentialArcTo.md
Normal file
File diff suppressed because one or more lines are too long
33
docs/kcl/tau.md
Normal file
33
docs/kcl/tau.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
title: "tau"
|
||||||
|
excerpt: "Return the value of `tau`. The full circle constant (τ). Equal to 2π."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Return the value of `tau`. The full circle constant (τ). Equal to 2π.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
tau() -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = tau()
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/toDegrees.md
Normal file
34
docs/kcl/toDegrees.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "toDegrees"
|
||||||
|
excerpt: "Converts a number from radians to degrees."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Converts a number from radians to degrees.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
toDegrees(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = toDegrees(2 * pi())
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
34
docs/kcl/toRadians.md
Normal file
34
docs/kcl/toRadians.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: "toRadians"
|
||||||
|
excerpt: "Converts a number from degrees to radians."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Converts a number from degrees to radians.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
toRadians(num: number) -> number
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tags
|
||||||
|
|
||||||
|
* `math`
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myVar = toRadians(180)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
* `num`: `number` (REQUIRED)
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
`number`
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
|||||||
# Types
|
---
|
||||||
|
title: "KCL Types"
|
||||||
|
excerpt: "Documentation of types for the KCL standard library for the Zoo Modeling App."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
`KCL` defines the following types and keywords the language.
|
`KCL` defines the following types and keywords the language.
|
||||||
|
|
||||||
|
369
docs/kcl/xLine.md
Normal file
369
docs/kcl/xLine.md
Normal file
File diff suppressed because one or more lines are too long
369
docs/kcl/xLineTo.md
Normal file
369
docs/kcl/xLineTo.md
Normal file
File diff suppressed because one or more lines are too long
369
docs/kcl/yLine.md
Normal file
369
docs/kcl/yLine.md
Normal file
File diff suppressed because one or more lines are too long
370
docs/kcl/yLineTo.md
Normal file
370
docs/kcl/yLineTo.md
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
e2e/playwright/export-snapshots/gltf-binary.png
Normal file
BIN
e2e/playwright/export-snapshots/gltf-binary.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 224 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user