vizcore 0.1.0 → 1.1.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.
- checksums.yaml +4 -4
- data/README.md +70 -117
- data/docs/.nojekyll +0 -0
- data/docs/assets/playground-worker.js +373 -0
- data/docs/assets/playground.css +440 -0
- data/docs/assets/playground.js +652 -0
- data/docs/assets/site.css +744 -0
- data/docs/assets/vizcore-demo.gif +0 -0
- data/docs/assets/vizcore-poster.png +0 -0
- data/docs/assets/vj-tunnel.js +159 -0
- data/docs/index.html +225 -0
- data/docs/playground.html +81 -0
- data/docs/shape_dsl.md +269 -0
- data/examples/README.md +59 -0
- data/examples/assets/README.md +19 -0
- data/examples/audio_inspector.rb +34 -0
- data/examples/club_intro_drop.rb +78 -0
- data/examples/kansai_rubykaigi_visual.rb +70 -0
- data/examples/live_coding_minimal.rb +22 -0
- data/examples/midi_controller_show.rb +78 -0
- data/examples/midi_scene_switch.rb +3 -1
- data/examples/parser_visualizer.rb +48 -0
- data/examples/readme_demo.rb +17 -0
- data/examples/rhythm_geometry.rb +34 -0
- data/examples/ruby_crystal_show.rb +35 -0
- data/examples/shader_playground.rb +18 -0
- data/examples/unyo_liquid.rb +59 -0
- data/examples/vj_ambient_chill_room.rb +124 -0
- data/examples/vj_dnb_jungle.rb +170 -0
- data/examples/vj_festival_mainstage.rb +245 -0
- data/examples/vj_festival_mainstage.yml +17 -0
- data/examples/vj_glitch_industrial.rb +164 -0
- data/examples/vj_hiphop_cipher.rb +167 -0
- data/examples/vj_jpop_idol_live.rb +210 -0
- data/examples/vj_synthwave_retro.rb +173 -0
- data/examples/vj_techno_warehouse.rb +195 -0
- data/frontend/index.html +494 -2
- data/frontend/src/audio-inspector.js +40 -0
- data/frontend/src/custom-shape-param-controls.js +106 -0
- data/frontend/src/live-controls.js +131 -0
- data/frontend/src/main.js +1060 -16
- data/frontend/src/mapping-target-selector.js +109 -0
- data/frontend/src/midi-learn.js +194 -0
- data/frontend/src/performance-monitor.js +183 -0
- data/frontend/src/plugin-runtime.js +130 -0
- data/frontend/src/projector-mode.js +56 -0
- data/frontend/src/renderer/engine.js +157 -3
- data/frontend/src/renderer/layer-manager.js +442 -30
- data/frontend/src/renderer/shader-manager.js +26 -0
- data/frontend/src/runtime-control-preset.js +11 -0
- data/frontend/src/shader-error-overlay.js +29 -0
- data/frontend/src/shader-param-controls.js +93 -0
- data/frontend/src/shaders/builtins.js +380 -2
- data/frontend/src/shaders/post-effects.js +52 -0
- data/frontend/src/shape-editor-controls.js +157 -0
- data/frontend/src/visual-regression.js +67 -0
- data/frontend/src/visual-settings-preset.js +103 -0
- data/frontend/src/visuals/geometry.js +666 -0
- data/frontend/src/visuals/image-renderer.js +291 -0
- data/frontend/src/visuals/particle-system.js +56 -10
- data/frontend/src/visuals/shape-renderer.js +475 -0
- data/frontend/src/visuals/spectrogram-renderer.js +226 -0
- data/frontend/src/visuals/svg-arc.js +104 -0
- data/frontend/src/visuals/text-renderer.js +112 -11
- data/frontend/src/websocket-client.js +12 -1
- data/lib/vizcore/analysis/adaptive_normalizer.rb +70 -0
- data/lib/vizcore/analysis/beat_detector.rb +4 -2
- data/lib/vizcore/analysis/bpm_estimator.rb +8 -0
- data/lib/vizcore/analysis/feature_recorder.rb +159 -0
- data/lib/vizcore/analysis/feature_replay.rb +84 -0
- data/lib/vizcore/analysis/pipeline.rb +235 -11
- data/lib/vizcore/analysis/tap_tempo.rb +74 -0
- data/lib/vizcore/analysis.rb +4 -0
- data/lib/vizcore/audio/dummy_sine_input.rb +1 -1
- data/lib/vizcore/audio/fixture_input.rb +65 -0
- data/lib/vizcore/audio/input_manager.rb +4 -2
- data/lib/vizcore/audio/mic_input.rb +24 -8
- data/lib/vizcore/audio/portaudio_ffi.rb +106 -1
- data/lib/vizcore/audio.rb +1 -0
- data/lib/vizcore/cli/doctor.rb +159 -0
- data/lib/vizcore/cli/dsl_reference.rb +99 -0
- data/lib/vizcore/cli/layer_docs.rb +46 -0
- data/lib/vizcore/cli/scene_diagnostics.rb +23 -0
- data/lib/vizcore/cli/scene_inspector.rb +136 -0
- data/lib/vizcore/cli/scene_validator.rb +337 -0
- data/lib/vizcore/cli/shader_template.rb +68 -0
- data/lib/vizcore/cli/shader_uniform_docs.rb +54 -0
- data/lib/vizcore/cli.rb +689 -18
- data/lib/vizcore/config.rb +103 -2
- data/lib/vizcore/control_preset.rb +68 -0
- data/lib/vizcore/dsl/engine.rb +277 -5
- data/lib/vizcore/dsl/layer_builder.rb +1280 -23
- data/lib/vizcore/dsl/layer_group_builder.rb +112 -0
- data/lib/vizcore/dsl/mapping_resolver.rb +290 -7
- data/lib/vizcore/dsl/mapping_transform_builder.rb +71 -0
- data/lib/vizcore/dsl/reaction_builder.rb +44 -0
- data/lib/vizcore/dsl/scene_builder.rb +61 -5
- data/lib/vizcore/dsl/shader_source_resolver.rb +67 -6
- data/lib/vizcore/dsl/style_builder.rb +68 -0
- data/lib/vizcore/dsl/timeline_builder.rb +138 -0
- data/lib/vizcore/dsl/transition_controller.rb +77 -0
- data/lib/vizcore/dsl.rb +5 -1
- data/lib/vizcore/layer_catalog.rb +275 -0
- data/lib/vizcore/project_manifest.rb +152 -0
- data/lib/vizcore/renderer/png_writer.rb +57 -0
- data/lib/vizcore/renderer/render_sequence.rb +153 -0
- data/lib/vizcore/renderer/scene_frame_source.rb +132 -0
- data/lib/vizcore/renderer/scene_serializer.rb +36 -3
- data/lib/vizcore/renderer/snapshot.rb +38 -0
- data/lib/vizcore/renderer/snapshot_renderer.rb +938 -0
- data/lib/vizcore/renderer.rb +5 -0
- data/lib/vizcore/server/frame_broadcaster.rb +143 -8
- data/lib/vizcore/server/gallery_app.rb +155 -0
- data/lib/vizcore/server/gallery_page.rb +100 -0
- data/lib/vizcore/server/gallery_runner.rb +48 -0
- data/lib/vizcore/server/rack_app.rb +203 -4
- data/lib/vizcore/server/runner.rb +391 -22
- data/lib/vizcore/server/scene_dependency_watcher.rb +79 -0
- data/lib/vizcore/server/websocket_handler.rb +60 -10
- data/lib/vizcore/server.rb +4 -0
- data/lib/vizcore/shape.rb +719 -0
- data/lib/vizcore/sync/osc_message.rb +103 -0
- data/lib/vizcore/sync/osc_receiver.rb +68 -0
- data/lib/vizcore/sync.rb +4 -0
- data/lib/vizcore/templates/midi_control_scene.rb +3 -1
- data/lib/vizcore/templates/plugin_layer.rb +20 -0
- data/lib/vizcore/templates/plugin_readme.md +23 -0
- data/lib/vizcore/templates/plugin_renderer.js +43 -0
- data/lib/vizcore/templates/plugin_scene.rb +14 -0
- data/lib/vizcore/templates/project_readme.md +7 -23
- data/lib/vizcore/templates/rubykaigi_scene.rb +30 -0
- data/lib/vizcore/version.rb +1 -1
- data/lib/vizcore.rb +28 -0
- data/scripts/browser_capture.mjs +75 -0
- data/sig/vizcore.rbs +461 -0
- metadata +94 -3
- data/docs/GETTING_STARTED.md +0 -105
data/docs/GETTING_STARTED.md
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Getting Started
|
|
2
|
-
|
|
3
|
-
This guide covers local setup and first-run commands for `vizcore`.
|
|
4
|
-
|
|
5
|
-
## 1. Prerequisites
|
|
6
|
-
|
|
7
|
-
### macOS (Homebrew)
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
brew install portaudio ffmpeg
|
|
11
|
-
# optional (recommended for faster FFT): brew install fftw
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### Ubuntu/Debian
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
sudo apt update
|
|
18
|
-
sudo apt install -y libportaudio2 libportaudio-dev ffmpeg
|
|
19
|
-
# optional (recommended for faster FFT): sudo apt install -y libfftw3-dev
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Ruby
|
|
23
|
-
|
|
24
|
-
- Ruby `3.2+`
|
|
25
|
-
- Bundler
|
|
26
|
-
|
|
27
|
-
## 2. Install and Boot
|
|
28
|
-
|
|
29
|
-
### Run from this repository
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
bundle install
|
|
33
|
-
bundle exec ruby -Ilib exe/vizcore start examples/basic.rb
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Open `http://127.0.0.1:4567`.
|
|
37
|
-
|
|
38
|
-
### Project scaffold
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
bundle exec ruby -Ilib exe/vizcore new my_show
|
|
42
|
-
cd my_show
|
|
43
|
-
vizcore start scenes/basic.rb
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## 3. Audio Source Selection
|
|
47
|
-
|
|
48
|
-
### Microphone input
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
vizcore start examples/basic.rb --audio-source mic
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### File input (WAV)
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
vizcore start examples/basic.rb --audio-source file --audio-file spec/fixtures/audio/kick_120bpm.wav
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### File input (MP3/FLAC via ffmpeg)
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
vizcore start examples/basic.rb --audio-source file --audio-file path/to/set.mp3
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Dummy source fallback
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
vizcore start examples/basic.rb --audio-source dummy
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## 4. Device Discovery
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
vizcore devices audio
|
|
76
|
-
vizcore devices midi
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## 5. Useful Example Scenes
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
vizcore start examples/complex_audio_showcase.rb --audio-source file --audio-file examples/assets/complex_demo_loop.wav
|
|
83
|
-
vizcore start examples/file_audio_demo.rb --audio-source file --audio-file spec/fixtures/audio/kick_120bpm.wav
|
|
84
|
-
vizcore start examples/intro_drop.rb --audio-source dummy
|
|
85
|
-
vizcore start examples/midi_scene_switch.rb --audio-source dummy
|
|
86
|
-
vizcore start examples/custom_shader.rb --audio-source dummy
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
`intro_drop` falls back to a time-based transition after about 6 seconds when beats are not detected. For beat-synced scene changes, use rhythmic file input:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
vizcore start examples/intro_drop.rb --audio-source file --audio-file spec/fixtures/audio/kick_120bpm.wav
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
File source mode exposes `Play Audio` / `Pause Audio` in the HUD and streams the same file to the browser (`/audio-file`). If autoplay is blocked, click `Play Audio` once.
|
|
96
|
-
`examples/complex_audio_showcase.rb` uses the bundled `examples/assets/complex_demo_loop.wav` loop for a denser audio-reactive demo.
|
|
97
|
-
|
|
98
|
-
The HUD displays `BPM`, `Beat`, and `Beat Count`, which helps confirm synchronization while pausing or seeking playback.
|
|
99
|
-
|
|
100
|
-
## 6. Troubleshooting
|
|
101
|
-
|
|
102
|
-
- `Audio file not found`: check `--audio-file` path.
|
|
103
|
-
- `.mp3` / `.flac` fails: confirm `ffmpeg -version` works.
|
|
104
|
-
- No mic signal on macOS: allow microphone permission for the Ruby process/terminal app.
|
|
105
|
-
- Web page does not update: check terminal logs and browser devtools console.
|