@bitbybit-dev/create-app 1.3.2 → 1.4.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/README.md +47 -124
  2. package/dist/index.js +253 -21
  3. package/dist/index.js.map +1 -1
  4. package/dist/scaffold.d.ts +30 -0
  5. package/dist/scaffold.d.ts.map +1 -0
  6. package/dist/scaffold.js +107 -0
  7. package/dist/scaffold.js.map +1 -0
  8. package/package.json +4 -3
  9. package/src/index.test.ts +309 -8
  10. package/src/index.ts +285 -24
  11. package/src/scaffold.test.ts +177 -0
  12. package/src/scaffold.ts +99 -0
  13. package/templates/_agent/AGENTS.md +39 -0
  14. package/templates/_agent/CLAUDE.md +1 -0
  15. package/templates/_agent/_dot-cursor/mcp.json +5 -0
  16. package/templates/_agent/_dot-gitignore +7 -0
  17. package/templates/_agent/_dot-mcp.json +5 -0
  18. package/templates/_agent/_dot-vscode/mcp.json +5 -0
  19. package/templates/apps/drone-assembly/AGENTS.section.md +20 -0
  20. package/templates/apps/drone-assembly/README.md +35 -0
  21. package/templates/apps/drone-assembly/eslint.config.js +47 -0
  22. package/templates/apps/drone-assembly/index.html +17 -0
  23. package/templates/apps/drone-assembly/package.json +31 -0
  24. package/templates/apps/drone-assembly/public/favicon.ico +0 -0
  25. package/templates/apps/drone-assembly/public/logo.png +0 -0
  26. package/templates/apps/drone-assembly/scripts/smoke.ts +172 -0
  27. package/templates/apps/drone-assembly/src/assembly.ts +99 -0
  28. package/templates/apps/drone-assembly/src/exports.ts +10 -0
  29. package/templates/apps/drone-assembly/src/kernel.ts +14 -0
  30. package/templates/apps/drone-assembly/src/main.ts +298 -0
  31. package/templates/apps/drone-assembly/src/materials.ts +58 -0
  32. package/templates/apps/drone-assembly/src/model.ts +280 -0
  33. package/templates/apps/drone-assembly/src/parts.ts +343 -0
  34. package/templates/apps/drone-assembly/src/style.css +219 -0
  35. package/templates/apps/drone-assembly/src/ui.ts +180 -0
  36. package/templates/apps/drone-assembly/src/vite-env.d.ts +1 -0
  37. package/templates/apps/drone-assembly/tsconfig.json +29 -0
  38. package/templates/apps/laser-cut-box/AGENTS.section.md +17 -0
  39. package/templates/apps/laser-cut-box/README.md +34 -0
  40. package/templates/apps/laser-cut-box/eslint.config.js +47 -0
  41. package/templates/apps/laser-cut-box/index.html +17 -0
  42. package/templates/apps/laser-cut-box/package.json +30 -0
  43. package/templates/apps/laser-cut-box/public/favicon.ico +0 -0
  44. package/templates/apps/laser-cut-box/public/logo.png +0 -0
  45. package/templates/apps/laser-cut-box/scripts/smoke.ts +106 -0
  46. package/templates/apps/laser-cut-box/src/exports.ts +28 -0
  47. package/templates/apps/laser-cut-box/src/main.ts +176 -0
  48. package/templates/apps/laser-cut-box/src/model.ts +92 -0
  49. package/templates/apps/laser-cut-box/src/panels.ts +229 -0
  50. package/templates/apps/laser-cut-box/src/style.css +223 -0
  51. package/templates/apps/laser-cut-box/src/ui.ts +136 -0
  52. package/templates/apps/laser-cut-box/src/vite-env.d.ts +1 -0
  53. package/templates/apps/laser-cut-box/tsconfig.json +29 -0
  54. package/templates/apps/product-configurator/AGENTS.section.md +19 -0
  55. package/templates/apps/product-configurator/README.md +33 -0
  56. package/templates/apps/product-configurator/eslint.config.js +47 -0
  57. package/templates/apps/product-configurator/index.html +17 -0
  58. package/templates/apps/product-configurator/package.json +30 -0
  59. package/templates/apps/product-configurator/public/favicon.ico +0 -0
  60. package/templates/apps/product-configurator/public/logo.png +0 -0
  61. package/templates/apps/product-configurator/scripts/smoke.ts +69 -0
  62. package/templates/apps/product-configurator/src/catalog.ts +56 -0
  63. package/templates/apps/product-configurator/src/exports.ts +19 -0
  64. package/templates/apps/product-configurator/src/main.ts +134 -0
  65. package/templates/apps/product-configurator/src/model.ts +153 -0
  66. package/templates/apps/product-configurator/src/style.css +177 -0
  67. package/templates/apps/product-configurator/src/ui.ts +150 -0
  68. package/templates/apps/product-configurator/src/vite-env.d.ts +1 -0
  69. package/templates/apps/product-configurator/tsconfig.json +29 -0
  70. package/templates/apps/sheet-metal-unfold/AGENTS.section.md +26 -0
  71. package/templates/apps/sheet-metal-unfold/README.md +41 -0
  72. package/templates/apps/sheet-metal-unfold/backend/_dot-env.example +5 -0
  73. package/templates/apps/sheet-metal-unfold/backend/eslint.config.js +47 -0
  74. package/templates/apps/sheet-metal-unfold/backend/package.json +28 -0
  75. package/templates/apps/sheet-metal-unfold/backend/scripts/smoke.ts +52 -0
  76. package/templates/apps/sheet-metal-unfold/backend/src/app.ts +65 -0
  77. package/templates/apps/sheet-metal-unfold/backend/src/cloud.ts +42 -0
  78. package/templates/apps/sheet-metal-unfold/backend/src/index.ts +13 -0
  79. package/templates/apps/sheet-metal-unfold/backend/tsconfig.build.json +9 -0
  80. package/templates/apps/sheet-metal-unfold/backend/tsconfig.json +27 -0
  81. package/templates/apps/sheet-metal-unfold/frontend/eslint.config.js +47 -0
  82. package/templates/apps/sheet-metal-unfold/frontend/index.html +17 -0
  83. package/templates/apps/sheet-metal-unfold/frontend/package.json +30 -0
  84. package/templates/apps/sheet-metal-unfold/frontend/public/favicon.ico +0 -0
  85. package/templates/apps/sheet-metal-unfold/frontend/public/logo.png +0 -0
  86. package/templates/apps/sheet-metal-unfold/frontend/scripts/smoke.ts +84 -0
  87. package/templates/apps/sheet-metal-unfold/frontend/src/cloud-access.ts +37 -0
  88. package/templates/apps/sheet-metal-unfold/frontend/src/exports.ts +10 -0
  89. package/templates/apps/sheet-metal-unfold/frontend/src/flat.ts +71 -0
  90. package/templates/apps/sheet-metal-unfold/frontend/src/main.ts +193 -0
  91. package/templates/apps/sheet-metal-unfold/frontend/src/model.ts +166 -0
  92. package/templates/apps/sheet-metal-unfold/frontend/src/style.css +291 -0
  93. package/templates/apps/sheet-metal-unfold/frontend/src/ui.ts +150 -0
  94. package/templates/apps/sheet-metal-unfold/frontend/src/vite-env.d.ts +1 -0
  95. package/templates/apps/sheet-metal-unfold/frontend/tsconfig.json +29 -0
  96. package/templates/apps/sheet-metal-unfold/frontend/vite.config.ts +9 -0
  97. package/templates/apps/sheet-metal-unfold/package.json +18 -0
  98. package/templates/apps/step-to-gltf-cli/AGENTS.section.md +20 -0
  99. package/templates/apps/step-to-gltf-cli/README.md +34 -0
  100. package/templates/apps/step-to-gltf-cli/eslint.config.js +47 -0
  101. package/templates/apps/step-to-gltf-cli/package.json +26 -0
  102. package/templates/apps/step-to-gltf-cli/samples/bracket.step +2545 -0
  103. package/templates/apps/step-to-gltf-cli/scripts/smoke.ts +49 -0
  104. package/templates/apps/step-to-gltf-cli/src/cli.ts +106 -0
  105. package/templates/apps/step-to-gltf-cli/src/cloud.ts +34 -0
  106. package/templates/apps/step-to-gltf-cli/src/convert.ts +65 -0
  107. package/templates/apps/step-to-gltf-cli/src/kernel.ts +14 -0
  108. package/templates/apps/step-to-gltf-cli/tsconfig.json +27 -0
  109. package/templates/cloud/AGENTS.section.md +22 -0
  110. package/templates/cloud/backends/dotnet-rest/BitbybitClient.cs +22 -50
  111. package/templates/cloud/backends/dotnet-rest/Program.cs +1 -11
  112. package/templates/cloud/backends/dotnet-rest/dotnet-rest.csproj +4 -1
  113. package/templates/cloud/backends/hono-rest/eslint.config.js +47 -0
  114. package/templates/cloud/backends/hono-rest/package.json +11 -4
  115. package/templates/cloud/backends/hono-rest/src/bitbybit-client.ts +34 -45
  116. package/templates/cloud/backends/hono-rest/src/index.ts +1 -11
  117. package/templates/cloud/backends/hono-rest/tsconfig.json +19 -8
  118. package/templates/cloud/backends/hono-sdk/eslint.config.js +47 -0
  119. package/templates/cloud/backends/hono-sdk/package.json +12 -5
  120. package/templates/cloud/backends/hono-sdk/src/bitbybit-client.ts +6 -37
  121. package/templates/cloud/backends/hono-sdk/src/index.ts +1 -12
  122. package/templates/cloud/backends/hono-sdk/tsconfig.json +19 -8
  123. package/templates/cloud/backends/nodejs-rest/eslint.config.js +47 -0
  124. package/templates/cloud/backends/nodejs-rest/package.json +12 -5
  125. package/templates/cloud/backends/nodejs-rest/src/bitbybit-client.ts +6 -35
  126. package/templates/cloud/backends/nodejs-rest/src/index.ts +6 -16
  127. package/templates/cloud/backends/nodejs-rest/tsconfig.build.json +9 -0
  128. package/templates/cloud/backends/nodejs-rest/tsconfig.json +17 -7
  129. package/templates/cloud/backends/nodejs-sdk/eslint.config.js +47 -0
  130. package/templates/cloud/backends/nodejs-sdk/package.json +14 -7
  131. package/templates/cloud/backends/nodejs-sdk/src/bitbybit-client.ts +8 -33
  132. package/templates/cloud/backends/nodejs-sdk/src/index.ts +5 -16
  133. package/templates/cloud/backends/nodejs-sdk/tsconfig.build.json +9 -0
  134. package/templates/cloud/backends/nodejs-sdk/tsconfig.json +19 -9
  135. package/templates/cloud/frontend/eslint.config.js +50 -0
  136. package/templates/cloud/frontend/index.html +3 -1
  137. package/templates/cloud/frontend/package.json +13 -4
  138. package/templates/cloud/frontend/public/favicon.ico +0 -0
  139. package/templates/cloud/frontend/public/logo.png +0 -0
  140. package/templates/cloud/frontend/src/App.tsx +11 -9
  141. package/templates/cloud/frontend/src/api.ts +31 -0
  142. package/templates/cloud/frontend/src/components/ApiKeyWarning.tsx +28 -25
  143. package/templates/cloud/frontend/src/components/Header.tsx +4 -2
  144. package/templates/cloud/frontend/src/components/Tabs.tsx +4 -3
  145. package/templates/cloud/frontend/src/components/Viewer.tsx +57 -77
  146. package/templates/cloud/frontend/src/main.tsx +6 -1
  147. package/templates/cloud/frontend/src/panels/ModelsPanel.tsx +65 -73
  148. package/templates/cloud/frontend/src/panels/PipelinesPanel.tsx +82 -83
  149. package/templates/cloud/frontend/src/vite-env.d.ts +1 -0
  150. package/templates/cloud/frontend/tsconfig.json +19 -7
  151. package/templates/vite/babylonjs/typescript/AGENTS.section.md +13 -0
  152. package/templates/vite/babylonjs/typescript/eslint.config.js +47 -0
  153. package/templates/vite/babylonjs/typescript/index.html +4 -2
  154. package/templates/vite/babylonjs/typescript/package.json +14 -4
  155. package/templates/vite/babylonjs/typescript/public/favicon.ico +0 -0
  156. package/templates/vite/babylonjs/typescript/public/logo.png +0 -0
  157. package/templates/vite/babylonjs/typescript/scripts/smoke.ts +41 -0
  158. package/templates/vite/babylonjs/typescript/src/main.ts +8 -17
  159. package/templates/vite/babylonjs/typescript/src/model.ts +24 -0
  160. package/templates/vite/babylonjs/typescript/tsconfig.json +16 -12
  161. package/templates/vite/playcanvas/typescript/AGENTS.section.md +13 -0
  162. package/templates/vite/playcanvas/typescript/eslint.config.js +47 -0
  163. package/templates/vite/playcanvas/typescript/index.html +4 -2
  164. package/templates/vite/playcanvas/typescript/package.json +14 -4
  165. package/templates/vite/playcanvas/typescript/public/favicon.ico +0 -0
  166. package/templates/vite/playcanvas/typescript/public/logo.png +0 -0
  167. package/templates/vite/playcanvas/typescript/scripts/smoke.ts +41 -0
  168. package/templates/vite/playcanvas/typescript/src/main.ts +11 -22
  169. package/templates/vite/playcanvas/typescript/src/model.ts +24 -0
  170. package/templates/vite/playcanvas/typescript/tsconfig.json +16 -12
  171. package/templates/vite/threejs/typescript/AGENTS.section.md +13 -0
  172. package/templates/vite/threejs/typescript/eslint.config.js +47 -0
  173. package/templates/vite/threejs/typescript/index.html +4 -2
  174. package/templates/vite/threejs/typescript/package.json +16 -6
  175. package/templates/vite/threejs/typescript/public/favicon.ico +0 -0
  176. package/templates/vite/threejs/typescript/public/logo.png +0 -0
  177. package/templates/vite/threejs/typescript/scripts/smoke.ts +41 -0
  178. package/templates/vite/threejs/typescript/src/main.ts +11 -22
  179. package/templates/vite/threejs/typescript/src/model.ts +24 -0
  180. package/templates/vite/threejs/typescript/tsconfig.json +16 -12
  181. package/templates/vite/babylonjs/typescript/public/vite.svg +0 -1
  182. package/templates/vite/playcanvas/typescript/public/vite.svg +0 -1
  183. package/templates/vite/threejs/typescript/public/vite.svg +0 -1
  184. /package/templates/cloud/backends/dotnet-rest/{_gitignore → _dot-gitignore} +0 -0
  185. /package/templates/cloud/backends/hono-rest/{_gitignore → _dot-gitignore} +0 -0
  186. /package/templates/cloud/backends/hono-sdk/{_gitignore → _dot-gitignore} +0 -0
  187. /package/templates/cloud/backends/nodejs-rest/{.env.example → _dot-env.example} +0 -0
  188. /package/templates/cloud/backends/nodejs-rest/{_gitignore → _dot-gitignore} +0 -0
  189. /package/templates/cloud/backends/nodejs-sdk/{.env.example → _dot-env.example} +0 -0
  190. /package/templates/cloud/backends/nodejs-sdk/{_gitignore → _dot-gitignore} +0 -0
@@ -0,0 +1,47 @@
1
+ import { defineConfig, globalIgnores } from "eslint/config";
2
+ import eslint from "@eslint/js";
3
+ import tseslint from "typescript-eslint";
4
+ import noComments from "eslint-plugin-no-comments";
5
+
6
+ const DOUBLE_ASSERTION = ":matches(TSAsExpression, TSTypeAssertion) > :matches(TSAsExpression, TSTypeAssertion).expression[typeAnnotation.type=/^TS(Unknown|Any)Keyword$/]";
7
+
8
+ export default defineConfig([
9
+ globalIgnores(["dist/", "node_modules/", "**/*.d.ts"]),
10
+ {
11
+ files: ["**/*.ts"],
12
+ extends: [eslint.configs.recommended, tseslint.configs.strictTypeChecked, tseslint.configs.stylisticTypeChecked],
13
+ plugins: { "no-comments": noComments },
14
+ languageOptions: { parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname } },
15
+ rules: {
16
+ quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
17
+ semi: ["error", "always"],
18
+ eqeqeq: ["error", "always"],
19
+ curly: ["error", "multi-line"],
20
+ "prefer-const": "error",
21
+ "no-var": "error",
22
+ "max-lines": ["error", { max: 600, skipBlankLines: true, skipComments: true }],
23
+ "no-warning-comments": ["error", { terms: ["todo", "fixme", "hack"], location: "anywhere" }],
24
+ "no-comments/disallowComments": ["error", { allow: ["global", "eslint", "/ <reference"] }],
25
+ "no-restricted-syntax": ["error", { selector: DOUBLE_ASSERTION, message: "A double assertion replaces a type instead of narrowing it: write a type predicate, constrain a generic to the union, or fix the type this is arguing with." }],
26
+ "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_", ignoreRestSiblings: true }],
27
+ "@typescript-eslint/no-explicit-any": "error",
28
+ "@typescript-eslint/no-non-null-assertion": "error",
29
+ "@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true, allowTypedFunctionExpressions: true, allowHigherOrderFunctions: true, allowDirectConstAssertionInArrowFunctions: true }],
30
+ "@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports", fixStyle: "separate-type-imports", disallowTypeAnnotations: false }],
31
+ "@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true, allowBoolean: true, allowNullish: false, allowRegExp: false }],
32
+ "@typescript-eslint/naming-convention": [
33
+ "error",
34
+ { selector: "default", format: ["camelCase"], leadingUnderscore: "allow" },
35
+ { selector: "variable", format: ["camelCase", "UPPER_CASE"], leadingUnderscore: "allow" },
36
+ { selector: "parameter", format: ["camelCase"], leadingUnderscore: "allow" },
37
+ { selector: "typeLike", format: ["PascalCase"] },
38
+ { selector: "property", format: null },
39
+ { selector: "method", format: ["camelCase"] },
40
+ { selector: "import", format: null },
41
+ ],
42
+ "@typescript-eslint/only-throw-error": "error",
43
+ "@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
44
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
45
+ },
46
+ },
47
+ ]);
@@ -2,7 +2,9 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5
+ <link rel="icon" href="/favicon.ico" sizes="48x48" />
6
+ <link rel="icon" type="image/png" href="/logo.png" sizes="150x150" />
7
+ <link rel="apple-touch-icon" href="/logo.png" />
6
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
9
  <title>Bitbybit & PlayCanvas Project</title>
8
10
  </head>
@@ -15,7 +17,7 @@
15
17
  >
16
18
  <img
17
19
  alt="Logo of Bit by bit developers company"
18
- src="https://bitbybit.dev/logo-gold-small.png"
20
+ src="/logo.png"
19
21
  />
20
22
  <div>bitbybit.dev</div>
21
23
  <br />
@@ -5,15 +5,25 @@
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
8
- "build": "tsc && vite build",
9
- "preview": "vite preview"
8
+ "build": "npm run typecheck && vite build",
9
+ "preview": "vite preview",
10
+ "smoke": "npm run typecheck && npm run lint && tsx scripts/smoke.ts",
11
+ "typecheck": "tsc --noEmit",
12
+ "lint": "eslint . --max-warnings 0"
10
13
  },
11
14
  "dependencies": {
12
- "@bitbybit-dev/playcanvas": "1.3.2",
15
+ "@bitbybit-dev/playcanvas": "1.4.0-rc.0",
13
16
  "playcanvas": "2.22.2"
14
17
  },
15
18
  "devDependencies": {
16
- "typescript": "~5.8.3",
19
+ "@bitbybit-dev/occt": "1.4.0-rc.0",
20
+ "@eslint/js": "10.0.1",
21
+ "@types/node": "22.20.1",
22
+ "eslint": "10.10.0",
23
+ "eslint-plugin-no-comments": "1.2.1",
24
+ "tsx": "^4.19.0",
25
+ "typescript": "5.9.3",
26
+ "typescript-eslint": "8.70.0",
17
27
  "vite": "^6.3.2"
18
28
  }
19
29
  }
@@ -0,0 +1,41 @@
1
+ import { createRequire } from "node:module";
2
+ import { readdirSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import initOpenCascade from "@bitbybit-dev/occt/bitbybit-dev-occt/index.js";
5
+ import { OCCTService, OccHelper, VectorHelperService, ShapesHelperService } from "@bitbybit-dev/occt";
6
+ import { buildModel, defaultParams, type Occt } from "../src/model.ts";
7
+
8
+ function inProcess(service: object): Occt {
9
+ return service as Occt;
10
+ }
11
+
12
+ const require = createRequire(import.meta.url);
13
+ const kernelDir = dirname(require.resolve("@bitbybit-dev/occt/bitbybit-dev-occt/index.js"));
14
+ const wasmFile = readdirSync(kernelDir).find((file) => file.endsWith(".wasm"));
15
+ if (!wasmFile) throw new Error(`no OCCT kernel (.wasm) found in ${kernelDir}`);
16
+ const occ = await initOpenCascade({ locateFile: (file: string) => (file.endsWith(".wasm") ? join(kernelDir, wasmFile) : file) });
17
+ const occt = inProcess(new OCCTService(occ, new OccHelper(new VectorHelperService(), new ShapesHelperService(), occ)));
18
+
19
+ const shape = await buildModel(occt, defaultParams);
20
+ const info = await occt.shapes.solid.debugInfo({ shape });
21
+ const bbox = await occt.operations.boundingBoxOfShape({ shape });
22
+ const round = (n: number): number => Math.round(n * 1000) / 1000;
23
+
24
+ console.log(JSON.stringify({
25
+ template: "vite-playcanvas",
26
+ params: defaultParams,
27
+ valid: info.valid,
28
+ faces: info.nbFaces,
29
+ edges: info.nbEdges,
30
+ volume: round(info.volume),
31
+ area: round(info.area),
32
+ bbox: { min: bbox.min.map(round), max: bbox.max.map(round) },
33
+ }));
34
+
35
+ const problems: string[] = [];
36
+ if (!info.valid) problems.push("the model is not a valid solid");
37
+ if (!(info.volume > 0)) problems.push("the model has no volume");
38
+ if (problems.length) {
39
+ console.error(`smoke: ${problems.join("; ")}`);
40
+ process.exit(1);
41
+ }
@@ -1,10 +1,10 @@
1
1
  import "./style.css";
2
2
  import { BitByBitBase, Inputs, initBitByBit, initPlayCanvas, type InitBitByBitOptions } from "@bitbybit-dev/playcanvas";
3
+ import { buildModel, defaultParams } from "./model";
3
4
 
5
+ void start();
4
6
 
5
- start();
6
-
7
- async function start() {
7
+ async function start(): Promise<void> {
8
8
  const sceneOptions = new Inputs.PlayCanvasScene.InitPlayCanvasDto();
9
9
  sceneOptions.canvasId = "playcanvas-canvas";
10
10
  sceneOptions.sceneSize = 10;
@@ -20,29 +20,18 @@ async function start() {
20
20
  await initBitByBit(app, scene, bitbybit, options);
21
21
 
22
22
  if (options.enableOCCT) {
23
- await createOCCTGeometry(bitbybit, "#ff0000"); // Red
23
+ await createOCCTGeometry(bitbybit, "#ff0000");
24
24
  }
25
25
  if (options.enableManifold) {
26
- await createManifoldGeometry(bitbybit, "#00ff00"); // Green
26
+ await createManifoldGeometry(bitbybit, "#00ff00");
27
27
  }
28
28
  if (options.enableJSCAD) {
29
- await createJSCADGeometry(bitbybit, "#0000ff"); // Blue
29
+ await createJSCADGeometry(bitbybit, "#0000ff");
30
30
  }
31
-
32
31
  }
33
32
 
34
- async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) {
35
- const cubeOptions = new Inputs.OCCT.CubeDto();
36
- cubeOptions.size = 2.5;
37
- cubeOptions.center = [0, 1.25, 0];
38
-
39
- const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);
40
-
41
- const filletOptions =
42
- new Inputs.OCCT.FilletDto<Inputs.OCCT.TopoDSShapePointer>();
43
- filletOptions.shape = cube;
44
- filletOptions.radius = 0.4;
45
- const roundedCube = await bitbybit.occt.fillets.filletEdges(filletOptions);
33
+ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string): Promise<void> {
34
+ const roundedCube = await buildModel(bitbybit.occt, defaultParams);
46
35
 
47
36
  const drawOptions = new Inputs.Draw.DrawOcctShapeOptions();
48
37
  drawOptions.edgeWidth = 0.5;
@@ -56,7 +45,7 @@ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) {
56
45
  });
57
46
  }
58
47
 
59
- async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) {
48
+ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string): Promise<void> {
60
49
  const sphereOptions = new Inputs.Manifold.SphereDto();
61
50
  sphereOptions.radius = 1.5;
62
51
  sphereOptions.circularSegments = 32;
@@ -74,7 +63,7 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) {
74
63
  const translationOptions =
75
64
  new Inputs.Manifold.TranslateDto<Inputs.Manifold.ManifoldPointer>();
76
65
  translationOptions.manifold = diffedShape;
77
- translationOptions.vector = [0, 1.25, -4]; // Position below OCCT
66
+ translationOptions.vector = [0, 1.25, -4];
78
67
  const movedShape = await bitbybit.manifold.manifold.transforms.translate(
79
68
  translationOptions
80
69
  );
@@ -87,7 +76,7 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) {
87
76
  });
88
77
  }
89
78
 
90
- async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) {
79
+ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string): Promise<void> {
91
80
  const geodesicSphereOptions = new Inputs.JSCAD.GeodesicSphereDto();
92
81
  geodesicSphereOptions.radius = 1.5;
93
82
  geodesicSphereOptions.center = [0, 1.5, 4];
@@ -0,0 +1,24 @@
1
+ import type { BitByBitBase } from "@bitbybit-dev/playcanvas";
2
+
3
+ export type Occt = BitByBitBase["occt"];
4
+
5
+ export type Shape = Awaited<ReturnType<Occt["fillets"]["filletEdges"]>>;
6
+
7
+ export interface ModelParams {
8
+ size: number;
9
+ filletRadius: number;
10
+ }
11
+
12
+ export const defaultParams: ModelParams = {
13
+ size: 2.5,
14
+ filletRadius: 0.4,
15
+ };
16
+
17
+ export async function buildModel(occt: Occt, params: ModelParams): Promise<Shape> {
18
+ const cube = await occt.shapes.solid.createCube({
19
+ size: params.size,
20
+ center: [0, params.size / 2, 0],
21
+ originOnCenter: true,
22
+ });
23
+ return occt.fillets.filletEdges({ shape: cube, radius: params.filletRadius });
24
+ }
@@ -1,25 +1,29 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
3
+ "target": "ES2022",
5
4
  "module": "ESNext",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
5
  "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "types": ["node"],
11
8
  "allowImportingTsExtensions": true,
12
- "verbatimModuleSyntax": true,
13
9
  "moduleDetection": "force",
14
10
  "noEmit": true,
15
-
16
- /* Linting */
17
11
  "strict": true,
12
+ "noUncheckedIndexedAccess": true,
13
+ "exactOptionalPropertyTypes": true,
14
+ "noImplicitReturns": true,
15
+ "noImplicitOverride": true,
16
+ "noPropertyAccessFromIndexSignature": true,
17
+ "noFallthroughCasesInSwitch": true,
18
18
  "noUnusedLocals": true,
19
19
  "noUnusedParameters": true,
20
+ "useUnknownInCatchVariables": true,
21
+ "forceConsistentCasingInFileNames": true,
22
+ "isolatedModules": true,
23
+ "verbatimModuleSyntax": true,
20
24
  "erasableSyntaxOnly": true,
21
- "noFallthroughCasesInSwitch": true,
22
- "noUncheckedSideEffectImports": true
25
+ "noUncheckedSideEffectImports": true,
26
+ "skipLibCheck": true
23
27
  },
24
- "include": ["src"]
28
+ "include": ["src", "scripts"]
25
29
  }
@@ -0,0 +1,13 @@
1
+ ## This template: Vite + Three.js
2
+
3
+ - `src/model.ts` is the geometry. `buildModel(occt, params)` builds the OCCT shape from `ModelParams` and returns it. It knows nothing about rendering, and every kernel call is awaited, so the same function runs in the browser (through the OCCT worker, whose calls return promises) and in Node (in-process, whose calls return values). Put new geometry here, and new parameters in `ModelParams` with a default in `defaultParams`.
4
+ - `src/main.ts` is the wiring: it starts the Three.js scene, initialises Bitbybit, calls `buildModel` and draws the result. The Manifold and JSCAD demonstrations live here as well. Keep geometry out of this file.
5
+ - `scripts/smoke.ts` loads the OCCT kernel in Node, runs `buildModel` with `defaultParams` and prints one JSON line with the field names `template`, `params`, `valid`, `faces`, `edges`, `volume`, `area` and `bbox`. It exits 1 when the shape is not a valid solid or has no volume. Add an assertion here when a change to the model has a fact worth pinning, such as a face count or a bounding box.
6
+
7
+ Commands:
8
+
9
+ - `npm run dev` serves the app at http://localhost:5173
10
+ - `npm run build` typechecks and bundles for production; `npm run typecheck` and `npm run lint` run alone as well
11
+ - `npm run smoke` typechecks, lints, then builds the model headlessly and prints the summary line; the kernel loads from `node_modules`, so nothing is downloaded: it is the same WebAssembly the browser runs inside a worker, loaded in-process, its content-hashed `.wasm` found beside the loader. The smoke script types the in-process kernel as the same `Occt` the browser code sees, through one `inProcess` cast, and awaits every call, so `buildModel` runs exactly as it does in the browser and `scripts/` is typechecked with the rest.
12
+
13
+ The OCCT kernel runs in a web worker in the browser, so the objects `buildModel` handles there are pointers to shapes held by the worker, not the shapes themselves. That is why geometry is built entirely inside `buildModel` and only the result is drawn.
@@ -0,0 +1,47 @@
1
+ import { defineConfig, globalIgnores } from "eslint/config";
2
+ import eslint from "@eslint/js";
3
+ import tseslint from "typescript-eslint";
4
+ import noComments from "eslint-plugin-no-comments";
5
+
6
+ const DOUBLE_ASSERTION = ":matches(TSAsExpression, TSTypeAssertion) > :matches(TSAsExpression, TSTypeAssertion).expression[typeAnnotation.type=/^TS(Unknown|Any)Keyword$/]";
7
+
8
+ export default defineConfig([
9
+ globalIgnores(["dist/", "node_modules/", "**/*.d.ts"]),
10
+ {
11
+ files: ["**/*.ts"],
12
+ extends: [eslint.configs.recommended, tseslint.configs.strictTypeChecked, tseslint.configs.stylisticTypeChecked],
13
+ plugins: { "no-comments": noComments },
14
+ languageOptions: { parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname } },
15
+ rules: {
16
+ quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
17
+ semi: ["error", "always"],
18
+ eqeqeq: ["error", "always"],
19
+ curly: ["error", "multi-line"],
20
+ "prefer-const": "error",
21
+ "no-var": "error",
22
+ "max-lines": ["error", { max: 600, skipBlankLines: true, skipComments: true }],
23
+ "no-warning-comments": ["error", { terms: ["todo", "fixme", "hack"], location: "anywhere" }],
24
+ "no-comments/disallowComments": ["error", { allow: ["global", "eslint", "/ <reference"] }],
25
+ "no-restricted-syntax": ["error", { selector: DOUBLE_ASSERTION, message: "A double assertion replaces a type instead of narrowing it: write a type predicate, constrain a generic to the union, or fix the type this is arguing with." }],
26
+ "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_", ignoreRestSiblings: true }],
27
+ "@typescript-eslint/no-explicit-any": "error",
28
+ "@typescript-eslint/no-non-null-assertion": "error",
29
+ "@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true, allowTypedFunctionExpressions: true, allowHigherOrderFunctions: true, allowDirectConstAssertionInArrowFunctions: true }],
30
+ "@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports", fixStyle: "separate-type-imports", disallowTypeAnnotations: false }],
31
+ "@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true, allowBoolean: true, allowNullish: false, allowRegExp: false }],
32
+ "@typescript-eslint/naming-convention": [
33
+ "error",
34
+ { selector: "default", format: ["camelCase"], leadingUnderscore: "allow" },
35
+ { selector: "variable", format: ["camelCase", "UPPER_CASE"], leadingUnderscore: "allow" },
36
+ { selector: "parameter", format: ["camelCase"], leadingUnderscore: "allow" },
37
+ { selector: "typeLike", format: ["PascalCase"] },
38
+ { selector: "property", format: null },
39
+ { selector: "method", format: ["camelCase"] },
40
+ { selector: "import", format: null },
41
+ ],
42
+ "@typescript-eslint/only-throw-error": "error",
43
+ "@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
44
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
45
+ },
46
+ },
47
+ ]);
@@ -2,7 +2,9 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5
+ <link rel="icon" href="/favicon.ico" sizes="48x48" />
6
+ <link rel="icon" type="image/png" href="/logo.png" sizes="150x150" />
7
+ <link rel="apple-touch-icon" href="/logo.png" />
6
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
9
  <title>Bitbybit & Three.js Project</title>
8
10
  </head>
@@ -15,7 +17,7 @@
15
17
  >
16
18
  <img
17
19
  alt="Logo of Bit by bit developers company"
18
- src="https://bitbybit.dev/logo-gold-small.png"
20
+ src="/logo.png"
19
21
  />
20
22
  <div>bitbybit.dev</div>
21
23
  <br />
@@ -5,15 +5,25 @@
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
8
- "build": "tsc && vite build",
9
- "preview": "vite preview"
8
+ "build": "npm run typecheck && vite build",
9
+ "preview": "vite preview",
10
+ "smoke": "npm run typecheck && npm run lint && tsx scripts/smoke.ts",
11
+ "typecheck": "tsc --noEmit",
12
+ "lint": "eslint . --max-warnings 0"
10
13
  },
11
14
  "dependencies": {
12
- "@bitbybit-dev/threejs": "1.3.2"
15
+ "@bitbybit-dev/threejs": "1.4.0-rc.0"
13
16
  },
14
17
  "devDependencies": {
15
- "typescript": "~5.8.3",
16
- "vite": "^6.3.2",
17
- "@types/three": "0.186.0"
18
+ "@bitbybit-dev/occt": "1.4.0-rc.0",
19
+ "@eslint/js": "10.0.1",
20
+ "@types/node": "22.20.1",
21
+ "@types/three": "0.186.0",
22
+ "eslint": "10.10.0",
23
+ "eslint-plugin-no-comments": "1.2.1",
24
+ "tsx": "^4.19.0",
25
+ "typescript": "5.9.3",
26
+ "typescript-eslint": "8.70.0",
27
+ "vite": "^6.3.2"
18
28
  }
19
29
  }
@@ -0,0 +1,41 @@
1
+ import { createRequire } from "node:module";
2
+ import { readdirSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import initOpenCascade from "@bitbybit-dev/occt/bitbybit-dev-occt/index.js";
5
+ import { OCCTService, OccHelper, VectorHelperService, ShapesHelperService } from "@bitbybit-dev/occt";
6
+ import { buildModel, defaultParams, type Occt } from "../src/model.ts";
7
+
8
+ function inProcess(service: object): Occt {
9
+ return service as Occt;
10
+ }
11
+
12
+ const require = createRequire(import.meta.url);
13
+ const kernelDir = dirname(require.resolve("@bitbybit-dev/occt/bitbybit-dev-occt/index.js"));
14
+ const wasmFile = readdirSync(kernelDir).find((file) => file.endsWith(".wasm"));
15
+ if (!wasmFile) throw new Error(`no OCCT kernel (.wasm) found in ${kernelDir}`);
16
+ const occ = await initOpenCascade({ locateFile: (file: string) => (file.endsWith(".wasm") ? join(kernelDir, wasmFile) : file) });
17
+ const occt = inProcess(new OCCTService(occ, new OccHelper(new VectorHelperService(), new ShapesHelperService(), occ)));
18
+
19
+ const shape = await buildModel(occt, defaultParams);
20
+ const info = await occt.shapes.solid.debugInfo({ shape });
21
+ const bbox = await occt.operations.boundingBoxOfShape({ shape });
22
+ const round = (n: number): number => Math.round(n * 1000) / 1000;
23
+
24
+ console.log(JSON.stringify({
25
+ template: "vite-threejs",
26
+ params: defaultParams,
27
+ valid: info.valid,
28
+ faces: info.nbFaces,
29
+ edges: info.nbEdges,
30
+ volume: round(info.volume),
31
+ area: round(info.area),
32
+ bbox: { min: bbox.min.map(round), max: bbox.max.map(round) },
33
+ }));
34
+
35
+ const problems: string[] = [];
36
+ if (!info.valid) problems.push("the model is not a valid solid");
37
+ if (!(info.volume > 0)) problems.push("the model has no volume");
38
+ if (problems.length) {
39
+ console.error(`smoke: ${problems.join("; ")}`);
40
+ process.exit(1);
41
+ }
@@ -1,10 +1,10 @@
1
1
  import "./style.css";
2
2
  import { BitByBitBase, Inputs, initBitByBit, initThreeJS, type InitBitByBitOptions } from "@bitbybit-dev/threejs";
3
+ import { buildModel, defaultParams } from "./model";
3
4
 
5
+ void start();
4
6
 
5
- start();
6
-
7
- async function start() {
7
+ async function start(): Promise<void> {
8
8
  const sceneOptions = new Inputs.ThreeJSScene.InitThreeJSDto();
9
9
  sceneOptions.canvasId = "three-canvas";
10
10
  sceneOptions.sceneSize = 10;
@@ -21,29 +21,18 @@ async function start() {
21
21
  await initBitByBit(scene, bitbybit, options);
22
22
 
23
23
  if (options.enableOCCT) {
24
- await createOCCTGeometry(bitbybit, "#ff0000"); // Red
24
+ await createOCCTGeometry(bitbybit, "#ff0000");
25
25
  }
26
26
  if (options.enableManifold) {
27
- await createManifoldGeometry(bitbybit, "#00ff00"); // Green
27
+ await createManifoldGeometry(bitbybit, "#00ff00");
28
28
  }
29
29
  if (options.enableJSCAD) {
30
- await createJSCADGeometry(bitbybit, "#0000ff"); // Blue
30
+ await createJSCADGeometry(bitbybit, "#0000ff");
31
31
  }
32
-
33
32
  }
34
33
 
35
- async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) {
36
- const cubeOptions = new Inputs.OCCT.CubeDto();
37
- cubeOptions.size = 2.5;
38
- cubeOptions.center = [0, 1.25, 0];
39
-
40
- const cube = await bitbybit.occt.shapes.solid.createCube(cubeOptions);
41
-
42
- const filletOptions =
43
- new Inputs.OCCT.FilletDto<Inputs.OCCT.TopoDSShapePointer>();
44
- filletOptions.shape = cube;
45
- filletOptions.radius = 0.4;
46
- const roundedCube = await bitbybit.occt.fillets.filletEdges(filletOptions);
34
+ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string): Promise<void> {
35
+ const roundedCube = await buildModel(bitbybit.occt, defaultParams);
47
36
 
48
37
  const drawOptions = new Inputs.Draw.DrawOcctShapeOptions();
49
38
  drawOptions.edgeWidth = 0.5;
@@ -57,7 +46,7 @@ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) {
57
46
  });
58
47
  }
59
48
 
60
- async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) {
49
+ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string): Promise<void> {
61
50
  const sphereOptions = new Inputs.Manifold.SphereDto();
62
51
  sphereOptions.radius = 1.5;
63
52
  sphereOptions.circularSegments = 32;
@@ -75,7 +64,7 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) {
75
64
  const translationOptions =
76
65
  new Inputs.Manifold.TranslateDto<Inputs.Manifold.ManifoldPointer>();
77
66
  translationOptions.manifold = diffedShape;
78
- translationOptions.vector = [0, 1.25, -4]; // Position below OCCT
67
+ translationOptions.vector = [0, 1.25, -4];
79
68
  const movedShape = await bitbybit.manifold.manifold.transforms.translate(
80
69
  translationOptions
81
70
  );
@@ -88,7 +77,7 @@ async function createManifoldGeometry(bitbybit: BitByBitBase, color: string) {
88
77
  });
89
78
  }
90
79
 
91
- async function createJSCADGeometry(bitbybit: BitByBitBase, color: string) {
80
+ async function createJSCADGeometry(bitbybit: BitByBitBase, color: string): Promise<void> {
92
81
  const geodesicSphereOptions = new Inputs.JSCAD.GeodesicSphereDto();
93
82
  geodesicSphereOptions.radius = 1.5;
94
83
  geodesicSphereOptions.center = [0, 1.5, 4];
@@ -0,0 +1,24 @@
1
+ import type { BitByBitBase } from "@bitbybit-dev/threejs";
2
+
3
+ export type Occt = BitByBitBase["occt"];
4
+
5
+ export type Shape = Awaited<ReturnType<Occt["fillets"]["filletEdges"]>>;
6
+
7
+ export interface ModelParams {
8
+ size: number;
9
+ filletRadius: number;
10
+ }
11
+
12
+ export const defaultParams: ModelParams = {
13
+ size: 2.5,
14
+ filletRadius: 0.4,
15
+ };
16
+
17
+ export async function buildModel(occt: Occt, params: ModelParams): Promise<Shape> {
18
+ const cube = await occt.shapes.solid.createCube({
19
+ size: params.size,
20
+ center: [0, params.size / 2, 0],
21
+ originOnCenter: true,
22
+ });
23
+ return occt.fillets.filletEdges({ shape: cube, radius: params.filletRadius });
24
+ }
@@ -1,25 +1,29 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
3
+ "target": "ES2022",
5
4
  "module": "ESNext",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
5
  "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "types": ["node"],
11
8
  "allowImportingTsExtensions": true,
12
- "verbatimModuleSyntax": true,
13
9
  "moduleDetection": "force",
14
10
  "noEmit": true,
15
-
16
- /* Linting */
17
11
  "strict": true,
12
+ "noUncheckedIndexedAccess": true,
13
+ "exactOptionalPropertyTypes": true,
14
+ "noImplicitReturns": true,
15
+ "noImplicitOverride": true,
16
+ "noPropertyAccessFromIndexSignature": true,
17
+ "noFallthroughCasesInSwitch": true,
18
18
  "noUnusedLocals": true,
19
19
  "noUnusedParameters": true,
20
+ "useUnknownInCatchVariables": true,
21
+ "forceConsistentCasingInFileNames": true,
22
+ "isolatedModules": true,
23
+ "verbatimModuleSyntax": true,
20
24
  "erasableSyntaxOnly": true,
21
- "noFallthroughCasesInSwitch": true,
22
- "noUncheckedSideEffectImports": true
25
+ "noUncheckedSideEffectImports": true,
26
+ "skipLibCheck": true
23
27
  },
24
- "include": ["src"]
28
+ "include": ["src", "scripts"]
25
29
  }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFBD4F"></stop><stop offset="100%" stop-color="#FF980E"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFBD4F"></stop><stop offset="100%" stop-color="#FF980E"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFBD4F"></stop><stop offset="100%" stop-color="#FF980E"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>