-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
5,917 additions
and
6,088 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LICENSE.md | ||
.vscode | ||
pkg/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: ["eslint:recommended", "plugin:svelte/recommended", "prettier"], | ||
parserOptions: { | ||
sourceType: "module", | ||
ecmaVersion: 2020, | ||
extraFileExtensions: [".svelte"] | ||
}, | ||
env: { | ||
browser: true, | ||
es2017: true, | ||
node: true | ||
} | ||
root: true, | ||
extends: ["@repo/config-eslint/index.js", "plugin:svelte/recommended"], | ||
parserOptions: { | ||
extraFileExtensions: [".svelte"], | ||
}, | ||
env: { | ||
browser: true, | ||
es2017: true, | ||
node: true, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,55 @@ | ||
{ | ||
"name": "cadmium-web", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev --host", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"test": "pnpm test:integration && pnpm test:unit", | ||
"lint": "prettier --check . && eslint .", | ||
"format": "prettier . --write .", | ||
"check": "svelte-check --tsconfig ./tsconfig.json", | ||
"test:integration": "playwright test", | ||
"test:unit": "vitest", | ||
"types:guard": "ts-auto-guard --export-all src/types.d.ts" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.44.1", | ||
"@sveltejs/vite-plugin-svelte": "^3.1.0", | ||
"@tsconfig/svelte": "^5.0.4", | ||
"autoprefixer": "^10.4.19", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-svelte": "^2.35.1", | ||
"phosphor-svelte": "^1.4.2", | ||
"postcss": "^8.4.38", | ||
"postcss-load-config": "^5.1.0", | ||
"prettier": "^3.2.5", | ||
"prettier-plugin-svelte": "^3.2.3", | ||
"svelte": "5.0.0-next.141", | ||
"svelte-check": "^3.7.1", | ||
"tailwindcss": "^3.4.3", | ||
"ts-auto-guard": "^4.2.0", | ||
"vite": "^5.2.11", | ||
"vitest": "^1.6.0", | ||
"vite-plugin-top-level-await": "^1.4.1", | ||
"vite-plugin-wasm": "^3.3.0" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@fontsource-variable/manrope": "^5.0.20", | ||
"@threlte/core": "8.0.0-next.4", | ||
"@threlte/extras": "9.0.0-next.5", | ||
"@types/three": "^0.164.1", | ||
"cadmium": "workspace:*", | ||
"camera-controls": "^2.8.3", | ||
"gsap": "^3.12.5", | ||
"js-file-download": "^0.4.12", | ||
"nurbs": "^1.1.1", | ||
"shared": "workspace:*", | ||
"three": "^0.164.1", | ||
"troika-three-text": "^0.49.1" | ||
} | ||
"name": "cadmium-web", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"test": "pnpm test:integration && pnpm test:unit", | ||
"lint": "prettier --check . && eslint \"src/**/*.ts\"", | ||
"format": "prettier . --write .", | ||
"check": "svelte-check --tsconfig ./tsconfig.json", | ||
"test:integration": "playwright test", | ||
"test:unit": "vitest", | ||
"types:guard": "ts-auto-guard --export-all src/types.d.ts" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.44.1", | ||
"@repo/config-typescript": "workspace:*", | ||
"@sveltejs/vite-plugin-svelte": "^3.1.0", | ||
"@tsconfig/svelte": "^5.0.4", | ||
"autoprefixer": "^10.4.19", | ||
"eslint": "^9.3.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-svelte": "^2.39.0", | ||
"phosphor-svelte": "^1.4.2", | ||
"postcss": "^8.4.38", | ||
"postcss-load-config": "^5.1.0", | ||
"prettier": "^3.2.5", | ||
"prettier-plugin-svelte": "^3.2.3", | ||
"svelte": "5.0.0-next.141", | ||
"svelte-check": "^3.7.1", | ||
"tailwindcss": "^3.4.3", | ||
"ts-auto-guard": "^4.2.0", | ||
"vite": "^5.2.11", | ||
"vitest": "^1.6.0", | ||
"vite-plugin-top-level-await": "^1.4.1", | ||
"vite-plugin-wasm": "^3.3.0" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@fontsource-variable/manrope": "^5.0.20", | ||
"@threlte/core": "8.0.0-next.4", | ||
"@threlte/extras": "9.0.0-next.5", | ||
"@types/three": "^0.164.1", | ||
"cadmium": "workspace:*", | ||
"camera-controls": "^2.8.3", | ||
"gsap": "^3.12.5", | ||
"js-file-download": "^0.4.12", | ||
"nurbs": "^1.1.1", | ||
"shared": "workspace:*", | ||
"three": "^0.164.1", | ||
"troika-three-text": "^0.49.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/** @type {import('@playwright/test').PlaywrightTestConfig} */ | ||
const config = { | ||
webServer: { | ||
command: "npm run build && npm run preview", | ||
port: 4173 | ||
}, | ||
testDir: "tests", | ||
testMatch: /(.+\.)?(test|spec)\.[jt]s/ | ||
webServer: { | ||
command: "npm run build && npm run preview", | ||
port: 4173, | ||
}, | ||
testDir: "tests", | ||
testMatch: /(.+\.)?(test|spec)\.[jt]s/, | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
<script lang="ts"> | ||
// import { browser } from "$app/environment" | ||
import { onMount } from "svelte" | ||
import { default as init, Project as WasmProject } from "cadmium" | ||
import AppBar from "./components/AppBar.svelte" | ||
import BottomBar from "./components/BottomBar.svelte" | ||
import MainDisplay from "./components/MainDisplay.svelte" | ||
import ToolBar from "./components/ToolBar.svelte" | ||
import { workbenchIsStale, wasmProject, project, projectIsStale, featureIndex } from "shared/stores" | ||
// import { browser } from "$app/environment" | ||
import {onMount} from "svelte" | ||
import {default as init, Project as WasmProject} from "cadmium" | ||
import AppBar from "./components/AppBar.svelte" | ||
import BottomBar from "./components/BottomBar.svelte" | ||
import MainDisplay from "./components/MainDisplay.svelte" | ||
import ToolBar from "./components/ToolBar.svelte" | ||
import {workbenchIsStale, wasmProject, project, projectIsStale, featureIndex} from "shared/stores" | ||
// prettier-ignore | ||
const log = (function () { const context = "[+page.svelte]"; const color="gray"; return Function.prototype.bind.call(console.log, console, `%c${context}`, `font-weight:bold;color:${color};`)})() | ||
// prettier-ignore | ||
const log = (function () { const context = "[+page.svelte]"; const color="gray"; return Function.prototype.bind.call(console.log, console, `%c${context}`, `font-weight:bold;color:${color};`)})() | ||
const userName = "mattferraro.dev" | ||
let newFileContent: string | null = null | ||
const userName = "mattferraro.dev" | ||
let newFileContent: string | null = null | ||
// if (browser) { | ||
onMount(() => { | ||
init().then(() => { | ||
wasmProject.set(new WasmProject("First Project")) | ||
// log('made a new project') | ||
projectIsStale.set(true) | ||
}) | ||
}) | ||
// } | ||
// if (browser) { | ||
onMount(() => { | ||
init().then(() => { | ||
wasmProject.set(new WasmProject("First Project")) | ||
// log('made a new project') | ||
projectIsStale.set(true) | ||
}) | ||
}) | ||
// } | ||
// $: $wasmProject, log("[$wasmProject]", $wasmProject) | ||
// $: $project, log("[$project]", $project) | ||
// $: $wasmProject, log("[$wasmProject]", $wasmProject) | ||
// $: $project, log("[$project]", $project) | ||
$: if (newFileContent) { | ||
log("[newFileContent] received new file", newFileContent) | ||
const newWasmProject = WasmProject.from_json(newFileContent) | ||
wasmProject.set(newWasmProject) | ||
projectIsStale.set(true) | ||
newFileContent = null | ||
} | ||
$: if (newFileContent) { | ||
log("[newFileContent] received new file", newFileContent) | ||
const newWasmProject = WasmProject.from_json(newFileContent) | ||
wasmProject.set(newWasmProject) | ||
projectIsStale.set(true) | ||
newFileContent = null | ||
} | ||
// log('featureIndex changed to', val) | ||
// refresh workbench when featureIndex mutates | ||
featureIndex.subscribe((val) => $wasmProject["get_workbench"] && workbenchIsStale.set(true)) | ||
// log('featureIndex changed to', val) | ||
// refresh workbench when featureIndex mutates | ||
featureIndex.subscribe(val => $wasmProject["get_workbench"] && workbenchIsStale.set(true)) | ||
</script> | ||
|
||
<div class="w-[100vw] h-[100vh] block" style="overflow: hidden;"> | ||
<AppBar {userName} project={$project} bind:newFileContent /> | ||
<ToolBar /> | ||
<div class="flex"> | ||
<MainDisplay /> | ||
</div> | ||
<BottomBar /> | ||
<AppBar {userName} project={$project} bind:newFileContent /> | ||
<ToolBar /> | ||
<div class="flex"> | ||
<MainDisplay /> | ||
</div> | ||
<BottomBar /> | ||
</div> |
Oops, something went wrong.