Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
df52333
feat: new math Vec2 and Mat2x3 from ArrayBuffer
SonyStone Apr 8, 2025
eb9fcf9
feat: add more mat2x3 svg demos
SonyStone Apr 21, 2025
a6c8a49
feat: update math examples and add CSS gradient border animation
SonyStone Jun 2, 2025
d965e3f
feat: add UI components for tool settings, selection, layers, color w…
SonyStone Jun 2, 2025
b524498
Working on svg editor
SonyStone Jun 3, 2025
df9286b
feat: implement SVG editor utilities and components with virtual tree…
SonyStone Jun 16, 2025
ab887d6
feat: enhance SVG editor with path input component and debounce state…
SonyStone Jun 16, 2025
69930dd
feat: update SVG editor with new SVGCodePreview component and enhance…
SonyStone Jun 17, 2025
7d3deeb
Refactor SVG Editor: Implement SVG Parsing Logic
SonyStone Jun 18, 2025
ad5c6f6
feat: add tm and tm-textarea dependencies; integrate TmTextarea in SV…
SonyStone Jun 23, 2025
5e17d19
feat: implement SVG editor components including EditView, LayersView,…
SonyStone Jul 3, 2025
a89094a
feat: add virtual scroll example and create virtual list utility; int…
SonyStone Jul 6, 2025
806d33e
feat: add nested virtual scroll example with dynamic item rendering; …
SonyStone Jul 12, 2025
4056e46
feat: add docking example component and update routes; remove error b…
SonyStone Jul 26, 2025
ece99ff
feat: add timeline example with SVG icons and dockview components
SonyStone Aug 10, 2025
c692d5d
Add examples for ParticleContainer and RenderLayers in PixiJS
SonyStone Aug 14, 2025
071dfea
Refactor PixiJS examples and add easing functions
SonyStone Aug 17, 2025
7e6940f
feat: Add Solid Three integration with hooks, renderer, and canvas co…
SonyStone Aug 20, 2025
fce04aa
feat: Implement excaliburjs's Flappy Bird with game mechanics and assets
SonyStone Aug 20, 2025
fd1cfe2
feat: Add new examples for graphics, shaders, and particle systems
SonyStone Aug 23, 2025
a0785c2
feat: Update examples to use dynamic window size for positioning and …
SonyStone Aug 23, 2025
26e3486
feat: Integrate dynamic window size for rendering in AdvancedScratchC…
SonyStone Aug 23, 2025
16506d3
Refactor imports and improve virtual scroll examples
SonyStone Sep 1, 2025
bbdeed8
feat: Add PaintPage component with navigation and requirements list
SonyStone Oct 25, 2025
2793ab9
feat: Add Bitecs ECS and Rapier 2D Physics Engine examples with routi…
SonyStone Oct 25, 2025
d2c0094
refactor: Simplify application cleanup and enhance component props ty…
SonyStone Oct 25, 2025
6da2408
feat: Limit displayed children in LayersView and update ListItem rend…
SonyStone Oct 25, 2025
096aa2e
feat: Implement virtual scroll with nested items and dynamic height h…
SonyStone Oct 25, 2025
e224a01
feat: Integrate Rapier 2D physics engine and create Collider, RigidBo…
SonyStone Oct 25, 2025
5070bbf
Add WASM Game of Life implementation and refactor routing
SonyStone Oct 25, 2025
8e55127
fix: Update import path for wasmRustRoutes to use the correct package
SonyStone Oct 25, 2025
7b7adb7
feat: rename ecsy-examples to ecsy-pages
SonyStone Oct 25, 2025
bf6d960
fix: update import paths to use relative paths instead of package ref…
SonyStone Oct 25, 2025
7da19b1
feat: refactor routes and add new examples for bookmarks, film annota…
SonyStone Oct 25, 2025
afe62b1
feat(bookmarks-explorer): add tree schema with Zod validation for boo…
SonyStone Oct 26, 2025
f9f5169
fix: update import paths to use relative paths for components in vari…
SonyStone Oct 26, 2025
fa53532
feat: Enhance drag-and-drop functionality in bookmarks explorer
SonyStone Oct 26, 2025
1b65439
feat(tree-struct): implement tree structure examples and components w…
SonyStone Nov 2, 2025
fe69081
feat(bookmarks-explorer): introduce AnyTreeView type and refactor rel…
SonyStone Nov 7, 2025
3609cc8
feat(webgpu-examples): add TypeGPU example with context provider and …
SonyStone Nov 7, 2025
7563ae1
feat(webgpu-examples): add TypeGPU caustics and hello triangle exampl…
SonyStone Nov 8, 2025
5c24dbb
feat: Add new image onload test route and improve image caching
SonyStone Dec 6, 2025
8d2b220
feat(typegpu-examples): add rotating cube example and caustics demo
SonyStone Dec 22, 2025
18aa21c
feat(draw-on-canvas): implement camera transform and refactor renderi…
SonyStone Dec 27, 2025
a567789
Add WebGPU examples for loading images into textures and multisampling
SonyStone Jan 17, 2026
72c75cc
feat: add TypeGPU draw application and rotating cube example
SonyStone Jan 23, 2026
06c6552
feat: Add drawing app components and state management
SonyStone Jan 23, 2026
4f43a5e
feat: Update dependencies and add new PixiJS examples for blend modes…
SonyStone Jan 30, 2026
0811c6a
feat: Refactor math primitive imports and update flowmap handling
SonyStone Jan 30, 2026
9168cd2
Add WebAssembly bindings and example for WebGL application
SonyStone Jan 30, 2026
f3c5ef2
fix: Correct import case for Tile class in GLTileCanvas
SonyStone Jan 30, 2026
1e87005
fix: Unpremultiply source color using vec4f in createFragmentShader
SonyStone Jan 30, 2026
bfa8524
feat: Enhance touch gesture handling in useCanvasTransform and preven…
SonyStone Jan 30, 2026
576cbff
fix: Clarify touch gesture handling in useCanvasTransform documentati…
SonyStone Jan 30, 2026
84abb07
feat: Refactor touch gesture handling to use pointer events for impro…
SonyStone Jan 30, 2026
6b39b31
refactor: remove SimpleDrawApp preset and related files
SonyStone Jan 31, 2026
ae613d3
feat: Refactor UI components to use UnoCSS utility classes and remove…
SonyStone Feb 3, 2026
a05d06f
feat: Update PointerDebugOverlay to use event listener primitives and…
SonyStone Feb 3, 2026
7471564
feat: Enhance PointerDebugOverlay with reactive state management and …
SonyStone Feb 3, 2026
52cf4b3
feat: Refactor PointerDebugOverlay to use memoization and modularize …
SonyStone Feb 3, 2026
2cb815d
feat: Implement Catmull-Rom spline smoothing for stroke points in use…
SonyStone Feb 3, 2026
d769fd7
refactor: Simplify debug logging for point buffer in usePointerInput
SonyStone Feb 3, 2026
9d15971
feat: Add force pan mode to enhance pointer input and canvas transfor…
SonyStone Feb 3, 2026
94d2375
feat: Integrate getCenter function for pointer calculations and enhan…
SonyStone Feb 3, 2026
3b8cef6
Merge branch 'feature/new-math-primitives' of https://github.com/Sony…
SonyStone Feb 3, 2026
f818480
feat: Add brush shaders and refactor drawing app structure
SonyStone Feb 3, 2026
8a045e0
feat: Update styles for multitouch component to improve responsivenes…
SonyStone Feb 3, 2026
c994752
Merge branch 'feature/new-math-primitives' of https://github.com/Sony…
SonyStone Feb 3, 2026
0273c6b
feat: Add Input Visualizer and Shortcut Settings components with routing
SonyStone Feb 3, 2026
d38e92c
feat: add keyboard display component and shortcut settings integration
SonyStone Feb 3, 2026
6352e92
feat: Implement Cloud Storage Tree component with file and folder man…
SonyStone Feb 6, 2026
13ff0bf
feat: Enhance Cloud Storage Tree with long press support and mobile s…
SonyStone Feb 6, 2026
083b818
feat: Add file upload and download functionality with context menu su…
SonyStone Feb 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
41 changes: 41 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Dependencies (will be installed fresh in container)
node_modules

# Build outputs
dist
html
*.tsbuildinfo

# Rust/WASM build artifacts (these are HUGE - 7GB+)
target
**/target
rsw-hello/target
pkg
**/pkg
packages/wasm-rust-pages/wasm-bindgen
packages/wasm-rust-pages/wasm-game-of-life
**/wasm-bindgen
**/wasm-game-of-life

# Git
.git
.gitignore

# IDE
.vscode
.idea
*.swp
*.swo

# Logs
*.log
npm-debug.log*

# OS files
.DS_Store
Thumbs.db

# Docker files (don't need to copy themselves)
Dockerfile*
docker-compose*.yml
.dockerignore
259 changes: 259 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
# Project Coding Guidelines

## Styling

**Use UnoCSS utility classes instead of inline styles.**

- ❌ Don't use `style={{ display: 'flex', gap: '8px' }}`
- ✅ Use `class="flex gap-2"`

### UnoCSS Configuration

This project uses UnoCSS with the following presets:

- `@unocss/preset-wind4` - Tailwind CSS compatible utilities
- `unocss-preset-animations` - Animation utilities

### Common Patterns

```tsx
// Layout
class="flex items-center gap-2"
class="flex flex-col"
class="flex justify-between items-center"

// Spacing
class="p-2 px-4 py-1"
class="m-2 mt-4"
class="gap-2 gap-4"

// Colors (using neutral palette for dark UI)
class="bg-neutral-800 text-neutral-400"
class="border border-neutral-700"
class="text-red-400 text-green-500 text-yellow-400"

// Typography
class="text-xs text-sm text-base"
class="font-mono font-bold"

// Sizing
class="w-20 h-8 min-w-50 max-h-100"

// Positioning
class="absolute top-2 left-2 z-1000"
class="fixed inset-0"

// Interactivity
class="cursor-pointer touch-none pointer-events-none"

// Conditional classes (SolidJS)
class={`base-class ${condition() ? 'active-class' : 'inactive-class'}`}
```

### When to Use Inline Styles

Use inline `style` only for:

- Dynamic values from props/state (e.g., `style={{ width: \`${size()}px\` }}`)
- Calculated positions (e.g., `style={{ left: \`${x}px\`, top: \`${y}px\` }}`)
- CSS custom properties

## Framework

- **UI Framework**: SolidJS
- **Build Tool**: Vite
- **Language**: TypeScript

## Event Listeners

**Use `@solid-primitives/event-listener` instead of manual `addEventListener`/`removeEventListener`.**

This provides automatic cleanup when the component unmounts, preventing memory leaks.

```tsx
// ❌ Don't - manual cleanup required
onMount(() => {
const handler = (e: PointerEvent) => { ... };
window.addEventListener('pointermove', handler);
onCleanup(() => window.removeEventListener('pointermove', handler));
});

// ✅ Do - automatic cleanup
import { makeEventListener } from '@solid-primitives/event-listener';

onMount(() => {
makeEventListener(window, 'pointermove', (e) => { ... });
});

// ✅ Or use createEventListener for reactive targets
import { createEventListener } from '@solid-primitives/event-listener';

createEventListener(
() => containerRef,
'click',
(e) => { ... }
);
```

## Pointer Events

**Use `PointerEvent` instead of `MouseEvent` or `TouchEvent`.**

Pointer Events provide a unified API for mouse, touch, and pen input. Use `pointerType` to differentiate input types when needed.

```tsx
// ❌ Don't - separate mouse and touch handling
const isTouch = 'ontouchstart' in window;
const handleClick = (e: MouseEvent) => {
if (isTouch) { /* touch behavior */ }
else { /* mouse behavior */ }
};

// ❌ Don't - use MouseEvent or TouchEvent
const handleMouseDown = (e: MouseEvent) => { ... };
const handleTouchStart = (e: TouchEvent) => { ... };

// ✅ Do - use PointerEvent with pointerType
let lastPointerType: string = 'mouse';

const handlePointerDown = (e: PointerEvent) => {
lastPointerType = e.pointerType; // 'mouse' | 'touch' | 'pen'
};

const handleClick = (e: PointerEvent) => {
if (lastPointerType === 'touch') {
// Touch-specific behavior (e.g., single tap to navigate)
} else {
// Mouse/pen behavior (e.g., click to select)
}
};
```

### PointerEvent Types

- `e.pointerType === 'mouse'` - Mouse input
- `e.pointerType === 'touch'` - Touch input (finger)
- `e.pointerType === 'pen'` - Stylus/pen input

### Common Pointer Event Handlers

```tsx
onPointerDown = { handlePointerDown };
onPointerUp = { handlePointerUp };
onPointerMove = { handlePointerMove };
onPointerEnter = { handlePointerEnter };
onPointerLeave = { handlePointerLeave };
onPointerCancel = { handlePointerCancel };
```

## TypeScript Conventions

**Use `type` instead of `interface` for type definitions.**

- ❌ Don't use `interface Props { ... }`
- ✅ Use `type Props = { ... }`

```tsx
// ❌ Don't
interface UserData {
name: string;
age: number;
}

// ✅ Do
type UserData = {
name: string;
age: number;
};
```

## Component Patterns

### Props Types

**For internal/private components, define props inline in the function signature:**

```tsx
// ✅ Inline props for internal components
function PointerCircle(props: { pointer: PointerDebugInfo }): JSX.Element {
return <circle cx={props.pointer.x} cy={props.pointer.y} r="8" />;
}

function UserAvatar(props: { name: string; size?: number }): JSX.Element {
return <img src={`/avatar/${props.name}`} class="rounded-full" />;
}
```

**For exported/public components, define props type separately:**

```tsx
// ✅ Separate type for exported components
export type ComponentProps = {
value: Accessor<string>;
setValue: Setter<string>;
class?: string;
};

export function Component(props: ComponentProps): JSX.Element {
return <div class={`flex items-center gap-2 ${props.class ?? ''}`}>{/* content */}</div>;
}
```

### Component Structure

**Refactor large components into smaller, focused sub-components.**

Keep components small and single-purpose. Extract repeated patterns and complex JSX into separate components within the same file.

### File Organization (Newspaper Style)

**Organize files top-to-bottom by importance, like a newspaper article.**

The most important content (main exports) should be at the top, with supporting details (sub-components, helpers) at the bottom. Readers should understand the file's purpose without scrolling.

```tsx
// ============================================================================
// MARK: Types (exported types first)
// ============================================================================

export type MyComponentProps = { ... };

// ============================================================================
// MARK: Main Component (the primary export)
// ============================================================================

export function MyComponent(props: MyComponentProps): JSX.Element {
// Main component uses sub-components defined below
return (
<div>
<Header />
<Content />
<Footer />
</div>
);
}

// ============================================================================
// MARK: Sub-Components (internal, used by main component)
// ============================================================================

function Header(): JSX.Element { ... }
function Content(): JSX.Element { ... }
function Footer(): JSX.Element { ... }

// ============================================================================
// MARK: Helper Functions (utilities at the bottom)
// ============================================================================

function formatDate(date: Date): string { ... }
function calculateTotal(items: Item[]): number { ... }
```

**Section order:**

1. **Types** - Exported types and interfaces
2. **Main Component(s)** - Primary exported components
3. **Sub-Components** - Internal components used by main
4. **Helper Functions** - Utility functions

This allows readers to quickly understand the file's API and main functionality before diving into implementation details.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target/
*.exrc
website/public

.DS_store

# Added by cargo

Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"vitest.commandLine": "npx vitest",
"testing.automaticallyOpenPeekView": "never",
"github.copilot.chat.codeGeneration.instructions": [
{ "file": ".github/copilot-instructions.md" }
],
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#93e6fc",
"activityBar.background": "#93e6fc",
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:22

WORKDIR /app

# Enable corepack for better package manager support
RUN corepack enable

# Copy package files first (for better caching)
COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 3200

CMD ["npm", "run", "dev"]
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
dev:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- type: bind
source: .
target: /app
consistency: cached
- /app/node_modules
ports:
- '3200:3200'
environment:
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
4 changes: 3 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, {
/*... */
rules: {
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }]
}
});
Loading