Editor: animacoes M3, compartilhar/receber blocos por QR e ver codigo-fonte
- Animacoes (curvas do M3): blocos criados por codigo surgem em cascata, apagados saem de cena (fantasma que encolhe), os de baixo deslizam ao mudar de lugar na pilha; rolagem e zoom suaves. TINYBLOCKS_REDUCE_MOTION=1 desliga (o harness usa). Texto respeita a opacidade no backend SDL2. - Botao direito: "Ver codigo-fonte" (funcao C do bloco na aba de codigo), "Compartilhar pilha/blueprint (QR)" (scratchblocks em partes de 220 bytes, "TB1|id|parte|total|", em loop de 1 s) e "Receber blocos (QR)" (camera, partes em qualquer ordem, importa onde clicou). - tinyblocks-qr: qrcodegen (MIT) + quirc (ISC) e camera em cinza: V4L2 no Linux, Camera2 do NDK no Android (sem Java), nada no Windows. - Captura de desenvolvimento: TINYBLOCKS_SHOT_COUNT/STEP salvam sequencias. - Testes: test-qr (ida e volta) e harness cenario 35. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
70c819393c
commit
4f6a68c22c
31 files changed
+5789
-49
No files matched your search
@@ -46,6 +46,7 @@ SD_DIR := $(LIBDIR)/tinyblocks-sdl2
|
||||
PY_DIR := $(LIBDIR)/tinyblocks-python
|
||||
MC_DIR := $(LIBDIR)/tinyblocks-mcp
|
||||
A11Y_DIR := $(LIBDIR)/tinyblocks-a11y
|
||||
QR_DIR := $(LIBDIR)/tinyblocks-qr
|
||||
MCPS_DIR := $(LIBDIR)/tinyblocks-mcp-server
|
||||
|
||||
GFX_INC := $(GX_DIR)/include
|
||||
@@ -103,6 +104,7 @@ LIBM_A := $(LIBM_DIR)/build/libtinyblocks-libman.a
|
||||
SYN_A := $(SYN_DIR)/build/libtinyblocks-syntax.a
|
||||
SB_A := $(SB_DIR)/build/libtinyblocks-scratchblocks.a
|
||||
A11Y_A := $(A11Y_DIR)/build/libtinyblocks-a11y.a
|
||||
QR_A := $(QR_DIR)/build/libtinyblocks-qr.a
|
||||
MCPS_A := $(MCPS_DIR)/build/libtinyblocks-mcp-server.a
|
||||
LIB_LDFLAGS := -L$(ED_DIR)/build -L$(GX_DIR)/build -L$(SD_DIR)/build \
|
||||
$(foreach l,$(CAT_LIBS),-L$(LIBDIR)/tinyblocks-$(l)/build) -L$(BUILD)
|
||||
@@ -110,7 +112,7 @@ LIB_LDFLAGS := -L$(ED_DIR)/build -L$(GX_DIR)/build -L$(SD_DIR)/build \
|
||||
.PHONY: all help debug release static shared example sdl2 clean run python-lib mcp-lib json \
|
||||
editor run-editor run-sdl2 mylib vector customappearance graphics sdl2-backend test-editor \
|
||||
appdir appimage run-appimage icon \
|
||||
test-toml test-plugin test-blueprint test-a11y test-mcp test-mcp-server test-base64 test-curves test-meta test-ppm test-bmp test-png test-image test-vg test-svg test-jpg \
|
||||
test-toml test-plugin test-blueprint test-qr test-a11y test-mcp test-mcp-server test-base64 test-curves test-meta test-ppm test-bmp test-png test-image test-vg test-svg test-jpg \
|
||||
test-tensor test-ai test-http test-archive test-plot test-3d test-syntax test-os test-value test-vars test-scratchblocks test-input test-stdlib test-regex test-markdown test-opentype \
|
||||
category-libs category-sos libs app-libs \
|
||||
lib-events lib-control lib-errors lib-input lib-operators lib-number lib-string lib-variables lib-vector lib-appearance lib-pen lib-fs lib-os \
|
||||
@@ -177,12 +179,15 @@ $(foreach l,$(APP_LIBS),$(eval $(call CAT_LIB_TARGET,$(l))))
|
||||
|
||||
app-libs: $(foreach l,$(APP_LIBS),lib-$(l)) ## Compila tensor e as outras libraries do app (.a/.so)
|
||||
|
||||
lib-editor: lib-a11y lib-mcp-server
|
||||
lib-editor: lib-a11y lib-mcp-server lib-qr
|
||||
$(MAKE) -C $(ED_DIR)
|
||||
|
||||
lib-a11y:
|
||||
$(MAKE) -C $(A11Y_DIR)
|
||||
|
||||
lib-qr:
|
||||
$(MAKE) -C $(QR_DIR)
|
||||
|
||||
lib-mcp-server:
|
||||
$(MAKE) -C $(MCPS_DIR)
|
||||
|
||||
@@ -308,7 +313,7 @@ $(BUILD)/editor: examples/editor/main.c static libs
|
||||
-I$(JSON_DIR)/include -I$(XML_DIR)/include -I$(CSV_DIR)/include -I$(BP_DIR)/include \
|
||||
-I$(API_DIR)/include -I$(LIBM_DIR)/include -I$(SYN_DIR)/include -I$(A11Y_DIR)/include -I$(MCPS_DIR)/include \
|
||||
$< -o $@ \
|
||||
-Wl,--start-group $(ED_A) $(A11Y_A) $(MCPS_A) $(GX_A) $(SD_A) $(TOML_A) $(JSON_A) $(XML_A) $(CSV_A) $(BP_A) $(SB_A) $(API_A) $(LIBM_A) $(SYN_A) $(CAT_A) $(APP_A) $(LIB_A) -Wl,--end-group \
|
||||
-Wl,--start-group $(ED_A) $(A11Y_A) $(QR_A) $(MCPS_A) $(GX_A) $(SD_A) $(TOML_A) $(JSON_A) $(XML_A) $(CSV_A) $(BP_A) $(SB_A) $(API_A) $(LIBM_A) $(SYN_A) $(CAT_A) $(APP_A) $(LIB_A) -Wl,--end-group \
|
||||
$(SDL2_LIBS) $(SDL2TTF_LIBS) $(APP_LDLIBS) -ldl -lm -rdynamic \
|
||||
'-Wl,-rpath,$$ORIGIN'
|
||||
|
||||
@@ -465,10 +470,10 @@ $(BUILD)/editor_harness: tests/editor_harness.c $(SRCS) \
|
||||
$(EFILES_DIR)/include/tb_editor_files.h \
|
||||
$(GX_DIR)/src/tb_graphics.c $(A11Y_DIR)/src/tb_a11y.c $(A11Y_DIR)/include/tb_a11y.h \
|
||||
$(EDITOR_SRC)/tb_editor_mcp.c $(EDITOR_SRC)/tb_editor_jit.c $(MCPS_DIR)/src/tb_mcp_server.c $(MCPS_DIR)/src/tb_mcp_http.c \
|
||||
lib-blueprint ed-modules
|
||||
lib-blueprint ed-modules lib-qr
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS_DBG) \
|
||||
-I$(ED_DIR)/include -I$(A11Y_DIR)/include -I$(MCPS_DIR)/include -DTB_EDITOR_PRIVATE_API -DTB_MCP_SERVER_PRIVATE_API -I$(EW_DIR)/include -I$(EIMG_DIR)/include -I$(EFILES_DIR)/include -I$(GFX_INC) $(CAT_INCS) -I$(BP_DIR)/include \
|
||||
-I$(ED_DIR)/include -I$(A11Y_DIR)/include -I$(QR_DIR)/include -I$(MCPS_DIR)/include -DTB_EDITOR_PRIVATE_API -DTB_MCP_SERVER_PRIVATE_API -I$(EW_DIR)/include -I$(EIMG_DIR)/include -I$(EFILES_DIR)/include -I$(GFX_INC) $(CAT_INCS) -I$(BP_DIR)/include \
|
||||
-I$(API_DIR)/include -I$(LIBM_DIR)/include -I$(EN_DIR)/include -I$(TOML_DIR)/include -I$(CV_DIR)/include -I$(B64_DIR)/include -I$(PPM_DIR)/include -I$(SYN_DIR)/include -I$(SB_DIR)/include \
|
||||
$(SRCS) \
|
||||
$(EDITOR_SRC)/tb_editor.c $(EDITOR_SRC)/tb_stage_widget.c \
|
||||
@@ -479,7 +484,7 @@ $(BUILD)/editor_harness: tests/editor_harness.c $(SRCS) \
|
||||
$(API_DIR)/src/tb_api.c $(LIBM_DIR)/src/tb_libman.c \
|
||||
$(TOML_LIB_SRCS) $(TOML_DIR)/src/tb_toml.c \
|
||||
$(foreach l,$(CAT_LIBS),$(LIBDIR)/tinyblocks-$(l)/src/tb_$(l).c) \
|
||||
$(CV_DIR)/src/tb_curves.c $(B64_DIR)/src/tb_base64.c $(PPM_DIR)/src/tb_ppm.c $(SYN_DIR)/src/tb_syntax.c $(SB_DIR)/src/tb_scratchblocks.c tests/editor_harness.c -o $@ -ldl -lm -rdynamic
|
||||
$(CV_DIR)/src/tb_curves.c $(B64_DIR)/src/tb_base64.c $(PPM_DIR)/src/tb_ppm.c $(SYN_DIR)/src/tb_syntax.c $(SB_DIR)/src/tb_scratchblocks.c tests/editor_harness.c $(QR_A) -o $@ -ldl -lm -rdynamic
|
||||
|
||||
$(BUILD)/vm_bench: tests/vm_bench.c $(IMG_DIR)/src/tb_imglib.c $(SRCS) \
|
||||
$(EDITOR_SRC)/tb_editor.c $(EDITOR_SRC)/tb_stage_widget.c \
|
||||
@@ -489,10 +494,10 @@ $(BUILD)/vm_bench: tests/vm_bench.c $(IMG_DIR)/src/tb_imglib.c $(SRCS) \
|
||||
$(EFILES_DIR)/include/tb_editor_files.h \
|
||||
$(GX_DIR)/src/tb_graphics.c $(A11Y_DIR)/src/tb_a11y.c $(A11Y_DIR)/include/tb_a11y.h \
|
||||
$(EDITOR_SRC)/tb_editor_mcp.c $(EDITOR_SRC)/tb_editor_jit.c $(MCPS_DIR)/src/tb_mcp_server.c $(MCPS_DIR)/src/tb_mcp_http.c \
|
||||
lib-blueprint ed-modules
|
||||
lib-blueprint ed-modules lib-qr
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS_REL) -g -I$(IMG_DIR)/include \
|
||||
-I$(ED_DIR)/include -I$(A11Y_DIR)/include -I$(MCPS_DIR)/include -DTB_EDITOR_PRIVATE_API -DTB_MCP_SERVER_PRIVATE_API -I$(EW_DIR)/include -I$(EIMG_DIR)/include -I$(EFILES_DIR)/include -I$(GFX_INC) $(CAT_INCS) -I$(BP_DIR)/include \
|
||||
-I$(ED_DIR)/include -I$(A11Y_DIR)/include -I$(QR_DIR)/include -I$(MCPS_DIR)/include -DTB_EDITOR_PRIVATE_API -DTB_MCP_SERVER_PRIVATE_API -I$(EW_DIR)/include -I$(EIMG_DIR)/include -I$(EFILES_DIR)/include -I$(GFX_INC) $(CAT_INCS) -I$(BP_DIR)/include \
|
||||
-I$(API_DIR)/include -I$(LIBM_DIR)/include -I$(EN_DIR)/include -I$(TOML_DIR)/include -I$(CV_DIR)/include -I$(B64_DIR)/include -I$(PPM_DIR)/include -I$(SYN_DIR)/include -I$(SB_DIR)/include \
|
||||
$(SRCS) \
|
||||
$(EDITOR_SRC)/tb_editor.c $(EDITOR_SRC)/tb_stage_widget.c \
|
||||
@@ -503,7 +508,7 @@ $(BUILD)/vm_bench: tests/vm_bench.c $(IMG_DIR)/src/tb_imglib.c $(SRCS) \
|
||||
$(API_DIR)/src/tb_api.c $(LIBM_DIR)/src/tb_libman.c \
|
||||
$(TOML_LIB_SRCS) $(TOML_DIR)/src/tb_toml.c \
|
||||
$(foreach l,$(CAT_LIBS),$(LIBDIR)/tinyblocks-$(l)/src/tb_$(l).c) \
|
||||
$(CV_DIR)/src/tb_curves.c $(B64_DIR)/src/tb_base64.c $(PPM_DIR)/src/tb_ppm.c $(SYN_DIR)/src/tb_syntax.c $(SB_DIR)/src/tb_scratchblocks.c $(IMG_DIR)/src/tb_imglib.c tests/vm_bench.c -o $@ -ldl -lm -rdynamic
|
||||
$(CV_DIR)/src/tb_curves.c $(B64_DIR)/src/tb_base64.c $(PPM_DIR)/src/tb_ppm.c $(SYN_DIR)/src/tb_syntax.c $(SB_DIR)/src/tb_scratchblocks.c $(IMG_DIR)/src/tb_imglib.c tests/vm_bench.c $(QR_A) -o $@ -ldl -lm -rdynamic
|
||||
|
||||
bench-vm: $(BUILD)/vm_bench ## Mede a VM do editor num projeto (BENCH=projeto.json)
|
||||
./$(BUILD)/vm_bench $(BENCH) 10
|
||||
@@ -583,6 +588,14 @@ $(BUILD)/mcp_server_test: tests/mcp_server_test.c $(MCPS_DIR)/src/tb_mcp_server.
|
||||
test-mcp-server: $(BUILD)/mcp_server_test ## Roda o teste do servidor MCP (ASan/UBSan)
|
||||
./$(BUILD)/mcp_server_test
|
||||
|
||||
# -- Teste da library qr (gerar e ler QR code) ---
|
||||
$(BUILD)/qr_test: tests/qr_test.c lib-qr
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS_DBG) -I$(QR_DIR)/include tests/qr_test.c $(QR_A) -o $@ -lm
|
||||
|
||||
test-qr: $(BUILD)/qr_test ## Roda o teste do QR code (gerar e ler)
|
||||
./$(BUILD)/qr_test
|
||||
|
||||
# -- Teste da library a11y (arvore acessivel) ---
|
||||
$(BUILD)/a11y_test: tests/a11y_test.c $(A11Y_DIR)/src/tb_a11y.c $(A11Y_DIR)/include/tb_a11y.h static
|
||||
@mkdir -p $(BUILD)
|
||||
|
||||
Reference in new issue
Block a user