Repository navigation
[DONE] Pattern Lab 에서 글자를 글꼴 없이 도는 코드로 복사하고, 기기 헤더가 미리보기와 같은 그림을 낸다 - #186
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp7di6rhh5oFHoBU2khajT
…xt stack needs no model Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp7di6rhh5oFHoBU2khajT
… test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp7di6rhh5oFHoBU2khajT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp7di6rhh5oFHoBU2khajT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp7di6rhh5oFHoBU2khajT
patternflow-bot
marked this pull request as ready for review
October 23, 2026 21:44
This was referenced Oct 23, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 25, 2026
Patternflow-lab#183 Patternflow-lab#184 Patternflow-lab#186 Patternflow-lab#187 Patternflow-lab#189 Patternflow-lab#191 Patternflow-lab#192 Patternflow-lab#193 Patternflow-lab#194 Patternflow-lab#196 Patternflow-lab#197 Patternflow-lab#198 Patternflow-lab#199 Patternflow-lab#200 Patternflow-lab#202 Patternflow-lab#203 Patternflow-lab#204 Patternflow-lab#205 Patternflow-lab#206 Patternflow-lab#208 Patternflow-lab#209 Patternflow-lab#210 Patternflow-lab#214 Patternflow-lab#217 Patternflow-lab#218 Patternflow-lab#221 Patternflow-lab#222 Patternflow-lab#223 Patternflow-lab#227 Patternflow-lab#237 Patternflow-lab#238 Patternflow-lab#239 Patternflow-lab#240
10 tasks done
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
studio / https://claude.ai/code/session_01Fp7di6rhh5oFHoBU2khajT
창작자 지시 3 「텍스트를 코드로」예요. Text 패널에 「Copy as code」가 생겨서, 그린 글자를 글꼴 없이 도는 패턴 코드로 복사해 AI 에게 흐르기나 반짝임을 붙여 달라고 할 수 있어요. 기기로 가는 C++ 헤더를 g++ 로 실제로 컴파일해 미리보기와 같은 픽셀인지 재는 시험도 붙였고, 글자만 있는 판이면 To hardware 가 모델 없이 끝난 헤더라고 말해요.
좋아지는 것: 글자를 글꼴 없는 코드로 복사한다 — AI 에게 흐르기·반짝임을 시켜 판에 올린다
체크리스트
src/lib/lab/textExport.test.ts, 헤더는 호스트 g++ 로 컴파일)4bce0f2그대로)한 일
#184 가 텍스트 레이어를 비트맵으로 두 내보내기에 실었지만, 기기로 가는 헤더가 미리보기와 같은 그림을 내는지 재는 곳이 없었어요.
textExport.test.ts는 To hardware 가 만드는 헤더를 그 자리에서 g++ 로 컴파일해서 돌리고, 나온 프레임을 Lab 미리보기와 바이트로 맞대요. firmware 의core_math·core_color·core_noise·core_mem·core_tables·core_params는 진짜 파일을 그대로 쓰고, 패널 · 엔코더 ·Arduino.h만 대역이에요. 판은 75개예요. 이름 붙인 넷(128×64 한 장, 부드러운 가장자리와 반투명 램프, 텍스트 마스크 아래 손으로 옮긴 코드 레이어, 뒤집은 마스크), 시드로 만든 텍스트 · 픽셀 네 장짜리 70판, 그리고 아래의 반 단계 한 픽셀이에요. 프레임 크기 64×32 · 32×16 · 24×12 는setFrame길을 지나요.처음 돌렸을 때 Random15 의 (23, 2) 파랑이 미리보기 27, 헤더 28 이었어요. 그 자리는 픽셀 (131, 7, 75) 알파 187 이 50% add 로 얹힌 곳이라 75 × 187/255 × 0.5 = 27.5, 정확히 반이에요. 브라우저의 double 과 S3 의 float 가 187/255 를 서로 반대쪽으로 조금씩 틀려서 반올림이 갈려요. 그래서 시험을 둘로 나눴어요. 불투명도가 100 · 80 · 60 · 20% 면 분모가 홀수라 반이 나올 수 없고, 24판이 바이트까지 같아야 해요. 50% · 25% 가 섞인 50판은 다른 채널마다 분수(BigInt)로 셈을 다시 해서, 정확히 n + 1/2 인 곳에서만 한 단계 차이를 받아요. 시드 11~60 에선 한 채널(Halves22)이에요.
Text 패널의 「Copy as code」는 Pixel 패널의 것과 같은
pixelToCode.ts를 써요. 그려 둔 글자를 잘라 RLE 로 넣고, 머리 주석에 글 · 글꼴 · 크기를 적어요. 코드에는 효과를 얹을 자리가 둘 있어요.DISTORT HERE는 좌표를 휘는 칸이고 예로 흐르기(왼쪽으로 가서 오른쪽에서 다시 들어옴) · 물결 · 위아래 흔들기를 적었어요. 새로 생긴LIGHT HERE는 샘플 뒤 r · g · b · a 를 바꾸는 칸이고 예로 반짝임 · 켜졌다 꺼지기를 적었어요. 시험이 흐르기 예를 그대로 넣어 1초에 정확히 20픽셀 왼쪽으로 가는지 봐요. 글을 바꾸면 다음 복사가 새 글자를 실어요(TextPanel 시험이ab→abcd로 SPRITE_W 4 → 8 을 봐요). 판에 글자가 하나도 없으면 단추가 「No letters on the frame」, 클립보드가 막히면 「Copy failed」예요.To hardware 창은 코드 레이어가 없는 판에도 「0 layers to translate — 0 done」과 「Translating it is a model's job」을 보였어요. 텍스트 · 픽셀 레이어는 헤더에 픽셀로 들어가서 그 판의 헤더는 이미 끝난 것이라, 그때는 「Nothing here needs a model. Text and pixel layers go into the header as the pixels they show, so it is finished as it is. The board needs no font for the letters.」라고 말해요(마지막 문장은 텍스트 레이어가 있을 때만).
증거
web/에서, 이 브랜치 머리로:GitHub 검사(머리
b838211):시험이 진짜로 잡는지
hExport.ts를 잠깐 망가뜨려 봤어요(되돌림, 커밋 안 함):빌드한 사이트(
next start)와next dev(To hardware 단추는NEXT_PUBLIC_BUILD_ENABLED빌드에만 있어서)를 Playwright 로 연 결과예요. 글꼴 파일을 넣은 뒤 글을 고치고 Copy as code · To hardware 를 누르는 동안 나간 바깥 요청은 0, 쪽 오류도 0이에요.클립보드에 들어간 코드를 Node 에서 글꼴 없이 돌린 결과예요(앞 다섯 줄만,
#가 켜진 LED):같은 창의 「Copy .h」로 받은 헤더를
g++ -std=c++17 -O2 -Wall -Werror로 컴파일해 돌리면 복사한 JS 와 같아요:실행법
가정
.pfm이 같은 그림」을 말하고, 창작자 말은 「그 폰트로 만든 텍스트를 … 코드형태로 옮기는 기능 … 픽셀아트레이어랑 마찬가지로 그걸 이후에 패턴화해서 어떤 효과를 줄 수 있을」이에요. 두 내보내기는 [DONE] Pattern Lab 에 텍스트 레이어가 생겨 내 기기의 글꼴로 글을 넣고 끌어 옮긴다 #184 가 이미 비트맵으로 실었으니 시험으로 확인만 했고, 창작자 말의 「픽셀아트레이어랑 마찬가지로」는 Pixel 패널의 「Copy as code」로 읽어 텍스트에도 같은 단추를 뒀어요.DISTORT HERE·LIGHT HERE두 칸이에요. 두 내보내기(flatten.ts·hExport.ts)에 매 프레임 효과를 돌릴 빈 자리를 미리 만들지는 않았어요. 아무것도 하지 않는 코드를 기기 헤더에 싣게 되고, 지시 4 가 효과 셋을 정할 때 그 꼴로 짓는 게 맞다고 봤어요.LIGHT HERE칸은 Pixel 패널의 「Copy as code」에도 생겨요. 같은 파일이고, 그리는 픽셀은 그대로예요(check:pixelcode통과)..pfm을 기기에서 돌려 보진 못했어요. 이 컨테이너엔 보드가 없어요..pfm은 To hardware 헤더를 Xtensa 로 구운 것이라 이번 증거는 그 헤더를 호스트 g++ 로 돌린 데까지예요. Xtensa 빌드는 곱하기와 더하기를 하나로 합칠 수 있어서(FMA) 반에 아주 가까운 값은 기기에서 한 단계 다를 수 있어요.child_process로 C++ 컴파일러를 불러요. 컴파일러가 없는 책상에선 헤더 절이 건너뛰고,CI가 켜진 곳(GitHub 러너)에선 없으면 실패해요.firmware/는 읽기만 해요(-I로 include).next dev로 찍었어요.next dev가web/AGENTS.md에 블록을 다시 써서git checkout으로 되돌렸어요(커밋에 안 들어감).Changelog
Web
경험
언제: 바퀴에서 Pattern Lab 의 To hardware 창을 사진으로 찍을 때
교훈:
next start빌드엔 To hardware 단추가 없으니(NEXT_PUBLIC_BUILD_ENABLED없음)next dev로 찍고, 찍은 뒤next dev가 다시 쓴web/AGENTS.md를git checkout으로 되돌린다근거: #186 에서
next start -p 3100로 띄운 Lab 머리줄엔 To hardware 가 없었고(lib/community/apiBase.ts의buildsConfigured),next dev -p 3200으로 찍은 뒤git status에M web/AGENTS.md가 떠 되돌렸어요바퀴
바퀴 63 · 지시 3 「텍스트를 코드로」
다음 바퀴
textExport.test.ts의 컴파일 틀로 같은 픽셀을 볼 수 있어요.🤖 Generated with Claude Code
https://claude.ai/code/session_01Fp7di6rhh5oFHoBU2khajT