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.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -117
  3. data/docs/.nojekyll +0 -0
  4. data/docs/assets/playground-worker.js +373 -0
  5. data/docs/assets/playground.css +440 -0
  6. data/docs/assets/playground.js +652 -0
  7. data/docs/assets/site.css +744 -0
  8. data/docs/assets/vizcore-demo.gif +0 -0
  9. data/docs/assets/vizcore-poster.png +0 -0
  10. data/docs/assets/vj-tunnel.js +159 -0
  11. data/docs/index.html +225 -0
  12. data/docs/playground.html +81 -0
  13. data/docs/shape_dsl.md +269 -0
  14. data/examples/README.md +59 -0
  15. data/examples/assets/README.md +19 -0
  16. data/examples/audio_inspector.rb +34 -0
  17. data/examples/club_intro_drop.rb +78 -0
  18. data/examples/kansai_rubykaigi_visual.rb +70 -0
  19. data/examples/live_coding_minimal.rb +22 -0
  20. data/examples/midi_controller_show.rb +78 -0
  21. data/examples/midi_scene_switch.rb +3 -1
  22. data/examples/parser_visualizer.rb +48 -0
  23. data/examples/readme_demo.rb +17 -0
  24. data/examples/rhythm_geometry.rb +34 -0
  25. data/examples/ruby_crystal_show.rb +35 -0
  26. data/examples/shader_playground.rb +18 -0
  27. data/examples/unyo_liquid.rb +59 -0
  28. data/examples/vj_ambient_chill_room.rb +124 -0
  29. data/examples/vj_dnb_jungle.rb +170 -0
  30. data/examples/vj_festival_mainstage.rb +245 -0
  31. data/examples/vj_festival_mainstage.yml +17 -0
  32. data/examples/vj_glitch_industrial.rb +164 -0
  33. data/examples/vj_hiphop_cipher.rb +167 -0
  34. data/examples/vj_jpop_idol_live.rb +210 -0
  35. data/examples/vj_synthwave_retro.rb +173 -0
  36. data/examples/vj_techno_warehouse.rb +195 -0
  37. data/frontend/index.html +494 -2
  38. data/frontend/src/audio-inspector.js +40 -0
  39. data/frontend/src/custom-shape-param-controls.js +106 -0
  40. data/frontend/src/live-controls.js +131 -0
  41. data/frontend/src/main.js +1060 -16
  42. data/frontend/src/mapping-target-selector.js +109 -0
  43. data/frontend/src/midi-learn.js +194 -0
  44. data/frontend/src/performance-monitor.js +183 -0
  45. data/frontend/src/plugin-runtime.js +130 -0
  46. data/frontend/src/projector-mode.js +56 -0
  47. data/frontend/src/renderer/engine.js +157 -3
  48. data/frontend/src/renderer/layer-manager.js +442 -30
  49. data/frontend/src/renderer/shader-manager.js +26 -0
  50. data/frontend/src/runtime-control-preset.js +11 -0
  51. data/frontend/src/shader-error-overlay.js +29 -0
  52. data/frontend/src/shader-param-controls.js +93 -0
  53. data/frontend/src/shaders/builtins.js +380 -2
  54. data/frontend/src/shaders/post-effects.js +52 -0
  55. data/frontend/src/shape-editor-controls.js +157 -0
  56. data/frontend/src/visual-regression.js +67 -0
  57. data/frontend/src/visual-settings-preset.js +103 -0
  58. data/frontend/src/visuals/geometry.js +666 -0
  59. data/frontend/src/visuals/image-renderer.js +291 -0
  60. data/frontend/src/visuals/particle-system.js +56 -10
  61. data/frontend/src/visuals/shape-renderer.js +475 -0
  62. data/frontend/src/visuals/spectrogram-renderer.js +226 -0
  63. data/frontend/src/visuals/svg-arc.js +104 -0
  64. data/frontend/src/visuals/text-renderer.js +112 -11
  65. data/frontend/src/websocket-client.js +12 -1
  66. data/lib/vizcore/analysis/adaptive_normalizer.rb +70 -0
  67. data/lib/vizcore/analysis/beat_detector.rb +4 -2
  68. data/lib/vizcore/analysis/bpm_estimator.rb +8 -0
  69. data/lib/vizcore/analysis/feature_recorder.rb +159 -0
  70. data/lib/vizcore/analysis/feature_replay.rb +84 -0
  71. data/lib/vizcore/analysis/pipeline.rb +235 -11
  72. data/lib/vizcore/analysis/tap_tempo.rb +74 -0
  73. data/lib/vizcore/analysis.rb +4 -0
  74. data/lib/vizcore/audio/dummy_sine_input.rb +1 -1
  75. data/lib/vizcore/audio/fixture_input.rb +65 -0
  76. data/lib/vizcore/audio/input_manager.rb +4 -2
  77. data/lib/vizcore/audio/mic_input.rb +24 -8
  78. data/lib/vizcore/audio/portaudio_ffi.rb +106 -1
  79. data/lib/vizcore/audio.rb +1 -0
  80. data/lib/vizcore/cli/doctor.rb +159 -0
  81. data/lib/vizcore/cli/dsl_reference.rb +99 -0
  82. data/lib/vizcore/cli/layer_docs.rb +46 -0
  83. data/lib/vizcore/cli/scene_diagnostics.rb +23 -0
  84. data/lib/vizcore/cli/scene_inspector.rb +136 -0
  85. data/lib/vizcore/cli/scene_validator.rb +337 -0
  86. data/lib/vizcore/cli/shader_template.rb +68 -0
  87. data/lib/vizcore/cli/shader_uniform_docs.rb +54 -0
  88. data/lib/vizcore/cli.rb +689 -18
  89. data/lib/vizcore/config.rb +103 -2
  90. data/lib/vizcore/control_preset.rb +68 -0
  91. data/lib/vizcore/dsl/engine.rb +277 -5
  92. data/lib/vizcore/dsl/layer_builder.rb +1280 -23
  93. data/lib/vizcore/dsl/layer_group_builder.rb +112 -0
  94. data/lib/vizcore/dsl/mapping_resolver.rb +290 -7
  95. data/lib/vizcore/dsl/mapping_transform_builder.rb +71 -0
  96. data/lib/vizcore/dsl/reaction_builder.rb +44 -0
  97. data/lib/vizcore/dsl/scene_builder.rb +61 -5
  98. data/lib/vizcore/dsl/shader_source_resolver.rb +67 -6
  99. data/lib/vizcore/dsl/style_builder.rb +68 -0
  100. data/lib/vizcore/dsl/timeline_builder.rb +138 -0
  101. data/lib/vizcore/dsl/transition_controller.rb +77 -0
  102. data/lib/vizcore/dsl.rb +5 -1
  103. data/lib/vizcore/layer_catalog.rb +275 -0
  104. data/lib/vizcore/project_manifest.rb +152 -0
  105. data/lib/vizcore/renderer/png_writer.rb +57 -0
  106. data/lib/vizcore/renderer/render_sequence.rb +153 -0
  107. data/lib/vizcore/renderer/scene_frame_source.rb +132 -0
  108. data/lib/vizcore/renderer/scene_serializer.rb +36 -3
  109. data/lib/vizcore/renderer/snapshot.rb +38 -0
  110. data/lib/vizcore/renderer/snapshot_renderer.rb +938 -0
  111. data/lib/vizcore/renderer.rb +5 -0
  112. data/lib/vizcore/server/frame_broadcaster.rb +143 -8
  113. data/lib/vizcore/server/gallery_app.rb +155 -0
  114. data/lib/vizcore/server/gallery_page.rb +100 -0
  115. data/lib/vizcore/server/gallery_runner.rb +48 -0
  116. data/lib/vizcore/server/rack_app.rb +203 -4
  117. data/lib/vizcore/server/runner.rb +391 -22
  118. data/lib/vizcore/server/scene_dependency_watcher.rb +79 -0
  119. data/lib/vizcore/server/websocket_handler.rb +60 -10
  120. data/lib/vizcore/server.rb +4 -0
  121. data/lib/vizcore/shape.rb +719 -0
  122. data/lib/vizcore/sync/osc_message.rb +103 -0
  123. data/lib/vizcore/sync/osc_receiver.rb +68 -0
  124. data/lib/vizcore/sync.rb +4 -0
  125. data/lib/vizcore/templates/midi_control_scene.rb +3 -1
  126. data/lib/vizcore/templates/plugin_layer.rb +20 -0
  127. data/lib/vizcore/templates/plugin_readme.md +23 -0
  128. data/lib/vizcore/templates/plugin_renderer.js +43 -0
  129. data/lib/vizcore/templates/plugin_scene.rb +14 -0
  130. data/lib/vizcore/templates/project_readme.md +7 -23
  131. data/lib/vizcore/templates/rubykaigi_scene.rb +30 -0
  132. data/lib/vizcore/version.rb +1 -1
  133. data/lib/vizcore.rb +28 -0
  134. data/scripts/browser_capture.mjs +75 -0
  135. data/sig/vizcore.rbs +461 -0
  136. metadata +94 -3
  137. data/docs/GETTING_STARTED.md +0 -105
data/sig/vizcore.rbs ADDED
@@ -0,0 +1,461 @@
1
+ module Vizcore
2
+ VERSION: String
3
+
4
+ def self.root: () -> Pathname
5
+ def self.frontend_root: () -> Pathname
6
+ def self.templates_root: () -> Pathname
7
+ def self.define: () { () -> void } -> Hash[Symbol, untyped]
8
+ def self.plugin: (String | Symbol name) -> bool
9
+ def self.register_shape: (Symbol | String name, untyped renderer) -> Vizcore::Shape::Definition
10
+ | (Symbol | String name) { (Vizcore::Shape::DrawContext) -> untyped } -> Vizcore::Shape::Definition
11
+ def self.resolve_shape: (Symbol | String name) -> Vizcore::Shape::Definition?
12
+ def self.register_layer_capability: (
13
+ type: Symbol | String,
14
+ ?aliases: Array[Symbol | String] aliases,
15
+ ?params: Hash[Symbol | String, String] params,
16
+ ?mappable_params: Array[Symbol | String] mappable_params,
17
+ ?description: String? description
18
+ ) -> Vizcore::LayerCatalog::Capability
19
+ end
20
+
21
+ module Vizcore::Shape
22
+ SUPPORTED_PRIMITIVES: Array[Symbol]
23
+
24
+ def self.normalize_primitives: (untyped value, shape_name: untyped) -> Array[Hash[Symbol, untyped]]
25
+ def self.expand_custom_shape: (
26
+ untyped renderer,
27
+ params: Hash[Symbol | String, untyped],
28
+ ?shape_id: Symbol | String? shape_id,
29
+ ?layer_name: Symbol? layer_name,
30
+ ?palette: Array[untyped] palette,
31
+ ?audio: Hash[untyped, untyped] audio,
32
+ ?time: Numeric time,
33
+ ?frame: Integer frame,
34
+ ?resolution: Array[untyped] resolution,
35
+ ?globals: Hash[untyped, untyped] globals,
36
+ ?shape_name: untyped shape_name
37
+ ) -> Array[Hash[Symbol, untyped]]
38
+ def self.param_schema_for: (untyped renderer) -> Hash[Symbol, Hash[Symbol, untyped]]
39
+
40
+ class Definition < Struct[untyped]
41
+ attr_accessor name: Symbol?
42
+ attr_accessor renderer: untyped
43
+ end
44
+
45
+ module ClassMethods
46
+ def param: (
47
+ Symbol | String name,
48
+ ?default: untyped default,
49
+ ?range: Range[Numeric]? | [Numeric, Numeric]? range,
50
+ ?min: Numeric? min,
51
+ ?max: Numeric? max,
52
+ ?step: Numeric? step
53
+ ) -> Hash[Symbol, untyped]
54
+ def shape_param_schema: () -> Hash[Symbol, Hash[Symbol, untyped]]
55
+ end
56
+
57
+ class DrawContext
58
+ attr_reader params: Hash[Symbol, untyped]
59
+ attr_reader shape_id: Symbol?
60
+ attr_reader layer_name: Symbol?
61
+ attr_reader palette: Array[untyped]
62
+ attr_reader audio: AudioContext
63
+ attr_reader time: Float
64
+ attr_reader frame: Integer
65
+ attr_reader resolution: Array[untyped]
66
+ attr_reader globals: Hash[Symbol, untyped]
67
+
68
+ def initialize: (
69
+ params: Hash[Symbol | String, untyped],
70
+ ?param_schema: Hash[Symbol, Hash[Symbol, untyped]] param_schema,
71
+ ?shape_id: Symbol | String? shape_id,
72
+ ?layer_name: Symbol? layer_name,
73
+ ?palette: Array[untyped] palette,
74
+ ?audio: Hash[untyped, untyped] audio,
75
+ ?time: Numeric time,
76
+ ?frame: Integer frame,
77
+ ?resolution: Array[untyped] resolution,
78
+ ?globals: Hash[untyped, untyped] globals
79
+ ) -> void
80
+ def param: (Symbol | String name, ?untyped default) -> untyped
81
+ def width: () -> untyped
82
+ def height: () -> untyped
83
+ def draw: () { () -> void } -> Array[Hash[Symbol, untyped]]
84
+ def shapes: () -> Array[Hash[Symbol, untyped]]
85
+ end
86
+
87
+ class AudioContext
88
+ def amplitude: () -> Float
89
+ def bass: () -> Float
90
+ def mid: () -> Float
91
+ def high: () -> Float
92
+ def fft: () -> Array[untyped]
93
+ def beat?: () -> bool
94
+ def beat_pulse: () -> Float
95
+ def kick: () -> Float
96
+ def snare: () -> Float
97
+ def hihat: () -> Float
98
+ def bpm: () -> Float
99
+ end
100
+ end
101
+
102
+ module Vizcore::LayerCatalog
103
+ class Capability < Struct[untyped]
104
+ attr_accessor type: Symbol
105
+ attr_accessor aliases: Array[Symbol]
106
+ attr_accessor params: Hash[Symbol, String]
107
+ attr_accessor mappable_params: Array[Symbol]
108
+ attr_accessor description: String
109
+
110
+ def types: () -> Array[Symbol]
111
+ def supports?: (untyped value) -> bool
112
+ end
113
+
114
+ def self.capabilities: () -> Array[Capability]
115
+ def self.capability_for: (untyped type) -> Capability?
116
+ def self.supported_type?: (untyped type) -> bool
117
+ def self.supported_types: () -> Array[Symbol]
118
+ def self.params_for: (untyped type) -> Hash[Symbol, String]
119
+ def self.mappable_params_for: (untyped type) -> Array[Symbol]
120
+ def self.register_layer_capability: (
121
+ type: Symbol | String,
122
+ ?aliases: Array[Symbol | String] aliases,
123
+ ?params: Hash[Symbol | String, String] params,
124
+ ?mappable_params: Array[Symbol | String] mappable_params,
125
+ ?description: String? description
126
+ ) -> Capability
127
+ def self.reset_plugin_capabilities!: () -> Array[Capability]
128
+ def self.plugin_capabilities: () -> Array[Capability]
129
+ end
130
+
131
+ module Vizcore
132
+ class ControlPreset
133
+ def self.load: (String | Pathname path) -> Hash[String, untyped]
134
+ def self.write: (String | Pathname path, Hash[untyped, untyped] payload) -> Hash[String, untyped]
135
+ def initialize: (String | Pathname path) -> void
136
+ def load: () -> Hash[String, untyped]
137
+ def write: (Hash[untyped, untyped] payload) -> Hash[String, untyped]
138
+ end
139
+
140
+ class ProjectManifest
141
+ attr_reader path: Pathname
142
+ attr_reader root: Pathname
143
+
144
+ def self.load: (String | Pathname path) -> ProjectManifest
145
+ def initialize: (String | Pathname path) -> void
146
+ def config_defaults: (?profile: String? profile) -> Hash[Symbol, untyped]
147
+ def plugins: (?profile: String? profile) -> Array[String]
148
+ def plugin_assets: (?profile: String? profile) -> Array[Pathname]
149
+ def profile_names: () -> Array[String]
150
+ end
151
+ end
152
+
153
+ module Vizcore::CLISupport
154
+ class DslReference
155
+ def lines: () -> Array[String]
156
+ end
157
+ end
158
+
159
+ module Vizcore::Sync
160
+ class OscMessage
161
+ attr_reader address: String
162
+ attr_reader arguments: Array[untyped]
163
+
164
+ def self.parse: (String data) -> OscMessage?
165
+ def initialize: (address: String, ?arguments: Array[untyped] arguments) -> void
166
+ end
167
+
168
+ class OscReceiver
169
+ DEFAULT_HOST: String
170
+ MAX_PACKET_SIZE: Integer
171
+
172
+ def initialize: (
173
+ port: Integer port,
174
+ ?host: String host,
175
+ handler: untyped handler,
176
+ ?error_reporter: untyped? error_reporter
177
+ ) -> void
178
+ def start: () -> OscReceiver
179
+ def stop: () -> nil
180
+ end
181
+ end
182
+
183
+ module Vizcore::Analysis
184
+ class FeatureRecorder
185
+ VERSION: String
186
+ DEFAULT_FRAME_COUNT: Integer
187
+ DEFAULT_FRAME_RATE: Float
188
+
189
+ def initialize: (
190
+ audio_file: String | Pathname audio_file,
191
+ ?frames: Integer frames,
192
+ ?fps: Numeric fps,
193
+ ?noise_gate: Numeric noise_gate,
194
+ ?audio_normalize: Hash[Symbol, untyped]? audio_normalize,
195
+ ?bpm: Numeric? bpm,
196
+ ?bpm_lock: bool bpm_lock
197
+ ) -> void
198
+
199
+ def write: (out: String | Pathname) -> Hash[Symbol, untyped]
200
+ end
201
+
202
+ class FeatureReplay
203
+ attr_reader metadata: Hash[Symbol, untyped]
204
+
205
+ def initialize: (path: String | Pathname path) -> void
206
+ def call: (?Array[Float]? samples) -> Hash[Symbol, untyped]
207
+ def frame_count: () -> Integer
208
+ end
209
+ end
210
+
211
+ module Vizcore::DSL
212
+ type source = { kind: Symbol, ?band: Symbol }
213
+ type transform = {
214
+ ?gain: Float,
215
+ ?min: Float,
216
+ ?max: Float,
217
+ ?curve: Symbol,
218
+ ?deadzone: Float,
219
+ ?attack: Float,
220
+ ?release: Float
221
+ }
222
+ type mapping = { source: source, target: Symbol, ?transform: transform }
223
+ type param_schema_entry = {
224
+ name: Symbol,
225
+ ?default: Float,
226
+ ?min: Float,
227
+ ?max: Float,
228
+ ?step: Float
229
+ }
230
+ type layer = {
231
+ name: Symbol,
232
+ type: Symbol,
233
+ params: Hash[Symbol, untyped],
234
+ ?shader: Symbol,
235
+ ?glsl: String,
236
+ ?param_schema: Array[param_schema_entry],
237
+ ?mappings: Array[mapping]
238
+ }
239
+ type scene = { name: Symbol, layers: Array[layer], ?theme: Symbol }
240
+ type style = { name: Symbol, params: Hash[Symbol, untyped] }
241
+ type theme = { name: Symbol, params: Hash[Symbol, untyped] }
242
+ type timeline_entry = { at: Float, unit: Symbol, scene: Symbol }
243
+ type key_action = { type: Symbol, ?scene: String, ?control: Symbol }
244
+ type key_mapping = { key: String, action: key_action }
245
+
246
+ class Engine
247
+ def self.define: () { () -> void } -> Hash[Symbol, untyped]
248
+ def self.load_file: (String | Pathname path) -> Hash[Symbol, untyped]
249
+ def self.watch_file: (String | Pathname path, ?poll_interval: Float poll_interval, ?listener_factory: untyped listener_factory) { (Hash[Symbol, untyped], Pathname) -> void } -> FileWatcher
250
+
251
+ def audio: (Symbol | String name, **untyped options) -> Array[Hash[Symbol, untyped]]
252
+ def style: (Symbol | String name) { () -> void } -> void
253
+ def theme: (Symbol | String name) { () -> void } -> void
254
+ def midi: (Symbol | String name, **untyped options) -> Array[Hash[Symbol, untyped]]
255
+ def audio_normalize: (?mode: Symbol | String mode, **untyped options) -> Hash[Symbol, untyped]
256
+ def bpm: (Numeric value) -> Float
257
+ def bpm_lock: () -> bool
258
+ | (bool value) -> bool
259
+ def tap_tempo: (?key: Symbol | String key) -> Hash[Symbol, untyped]
260
+ def key: (Symbol | String value) { () -> void } -> void
261
+ def scene: (Symbol | String name, ?extends: Symbol | String? extends) { () -> void } -> void
262
+ def section: (Symbol | String name, bars: Integer bars, ?beats_per_bar: Integer beats_per_bar) { () -> void } -> void
263
+ def timeline: (?beats_per_bar: Integer beats_per_bar) { () -> void } -> void
264
+ def transition: (from: Symbol | String, to: Symbol | String) { () -> void } -> void
265
+ def midi_map: (?note: Integer? note, ?cc: Integer? cc, ?pc: Integer? pc) { (*untyped) -> void } -> void
266
+ def set: (Symbol | String key, untyped value) -> untyped
267
+ def to_h: () -> Hash[Symbol, untyped]
268
+ end
269
+
270
+ class TimelineBuilder
271
+ DEFAULT_BEATS_PER_BAR: Integer
272
+
273
+ class Point < Struct[untyped]
274
+ attr_accessor value: Float
275
+ attr_accessor unit: Symbol
276
+ end
277
+
278
+ def initialize: (?beats_per_bar: Integer beats_per_bar) -> void
279
+ def evaluate: () ?{ () -> void } -> TimelineBuilder
280
+ def at: (Numeric | Point position, scene: Symbol | String scene) -> timeline_entry
281
+ def seconds: (Numeric value) -> Point
282
+ def beats: (Numeric value) -> Point
283
+ def bars: (Numeric value, ?beats_per_bar: Integer? beats_per_bar) -> Point
284
+ def to_h: () -> Array[timeline_entry]
285
+ def transitions: () -> Array[Hash[Symbol, untyped]]
286
+ end
287
+
288
+ class Engine::TransitionBuilder
289
+ def initialize: () -> void
290
+ def effect: (Symbol | String name, **untyped options) -> void
291
+ def trigger: () { () -> bool } -> void
292
+ def on_beat: (Integer count) -> void
293
+ def on_bar: (Integer count, ?beats_per_bar: Integer beats_per_bar) -> void
294
+ def to_h: () -> Hash[Symbol, untyped]
295
+ end
296
+
297
+ class Engine::KeyBindingBuilder
298
+ def initialize: () -> void
299
+ def switch_scene: (Symbol | String name) -> void
300
+ def blackout: () -> void
301
+ def freeze: () -> void
302
+ def live_control: (Symbol | String control) -> void
303
+ def to_h: () -> Hash[Symbol, untyped]
304
+ end
305
+
306
+ class SceneBuilder
307
+ def initialize: (
308
+ name: Symbol | String name,
309
+ ?styles: Hash[Symbol, Hash[Symbol, untyped]] styles,
310
+ ?themes: Hash[Symbol, Hash[Symbol, untyped]] themes,
311
+ ?layers: Array[layer] layers
312
+ ) -> void
313
+ def evaluate: () ?{ () -> void } -> SceneBuilder
314
+ def layer: (Symbol | String name) ?{ () -> void } -> void
315
+ def group: (Symbol | String name) { () -> void } -> void
316
+ def use_theme: (Symbol | String name) -> Hash[Symbol, untyped]
317
+ def to_h: () -> scene
318
+ end
319
+
320
+ class LayerGroupBuilder
321
+ def initialize: (
322
+ name: Symbol | String name,
323
+ ?styles: Hash[Symbol, Hash[Symbol, untyped]] styles,
324
+ ?defaults: Hash[Symbol, untyped] defaults
325
+ ) -> void
326
+ def evaluate: () ?{ () -> void } -> LayerGroupBuilder
327
+ def layer: (Symbol | String name) ?{ () -> void } -> void
328
+ def blend: (Symbol | String value) -> Symbol
329
+ def opacity: (Numeric value) -> Float
330
+ def effect: (Symbol | String value) -> Symbol
331
+ def effect_intensity: (Numeric value) -> Float
332
+ def vj_effect: (Symbol | String value) -> Symbol
333
+ def geometry: (Symbol | String value) -> Symbol
334
+ def material: (Symbol | String value) -> Symbol
335
+ def scale: (Numeric value) -> Float
336
+ def deform: (Numeric value) -> Float
337
+ def color_shift: (Numeric value) -> Float
338
+ def palette: (*untyped colors) -> Array[String]
339
+ def use_style: (Symbol | String name) -> Hash[Symbol, untyped]
340
+ def to_a: () -> Array[layer]
341
+ end
342
+
343
+ class StyleBuilder
344
+ def initialize: (name: Symbol | String name, ?kind: String kind) -> void
345
+ def evaluate: () ?{ () -> void } -> StyleBuilder
346
+ def palette: (*untyped colors) -> Array[String]
347
+ def to_h: () -> style
348
+ end
349
+
350
+ class LayerBuilder
351
+ def initialize: (
352
+ name: Symbol | String name,
353
+ ?styles: Hash[Symbol, Hash[Symbol, untyped]] styles,
354
+ ?defaults: Hash[Symbol, untyped] defaults
355
+ ) -> void
356
+ def evaluate: () ?{ () -> void } -> LayerBuilder
357
+ def type: (Symbol | String value) -> Symbol
358
+ def shader: (Symbol | String value, ?reload: bool? reload) -> Symbol
359
+ def glsl: (String | Pathname path) -> String
360
+ def file: (String | Pathname path) -> String
361
+ def circle: (**untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
362
+ def line: (**untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
363
+ def rect: (*untyped args, **untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
364
+ def polygon: (*untyped args, **untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
365
+ def polyline: (*untyped args, **untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
366
+ def path: (*untyped args, **untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
367
+ def bezier: (*untyped args, **untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
368
+ def star: (*untyped args, **untyped options) ?{ () -> void } -> Hash[Symbol, untyped]
369
+ def custom_shape: (untyped renderer, **untyped options) ?{ () -> void } -> (Array[Hash[Symbol, untyped]] | Hash[Symbol, untyped])
370
+ def group: (*untyped args, **untyped attrs) { () -> void } -> Array[Hash[Symbol, untyped]]
371
+ def draw: () { () -> void } -> Array[Hash[Symbol, untyped]]
372
+ def source: (Symbol | String value, **untyped options) -> (Symbol | source)
373
+ def count: (Integer value) -> Integer
374
+ def content: (String value) -> String
375
+ def font_size: (Integer value) -> Integer
376
+ def letter_spacing: (Numeric value) -> Float
377
+ def align: (Symbol | String value) -> Symbol
378
+ def font: (String value) -> String
379
+ def fill: (String value) -> String
380
+ def stroke: (?untyped value, ?width: Numeric? width, ?color: String? color) -> Hash[Symbol, untyped]
381
+ def shadow: (?color: String? color, ?blur: Numeric? blur) -> Hash[Symbol, untyped]
382
+ def blend: (Symbol | String value) -> Symbol
383
+ def opacity: (Numeric value) -> Float
384
+ def effect: (Symbol | String value) -> Symbol
385
+ def effect_intensity: (Numeric value) -> Float
386
+ def vj_effect: (Symbol | String value) -> Symbol
387
+ def geometry: (Symbol | String value) -> Symbol
388
+ def material: (Symbol | String value) -> Symbol
389
+ def scale: (Numeric value) -> Float
390
+ def deform: (Numeric value) -> Float
391
+ def color_shift: (Numeric value) -> Float
392
+ def palette: (*untyped colors) -> Array[String]
393
+ def use_style: (Symbol | String name) -> Hash[Symbol, untyped]
394
+ def param: (
395
+ Symbol | String name,
396
+ ?default: Numeric? default,
397
+ ?range: Range[Numeric]? | [Numeric, Numeric]? range,
398
+ ?min: Numeric? min,
399
+ ?max: Numeric? max,
400
+ ?step: Numeric? step
401
+ ) -> Hash[Symbol, untyped]
402
+ def map: (?Hash[untyped, untyped] | Symbol | String definition, **untyped options) ?{ () -> void } -> void
403
+ def react_to: (Hash[Symbol, untyped] | Symbol | String source_value) { () -> void } -> void
404
+ def amplitude: () -> source
405
+ def frequency_band: (Symbol | String name) -> source
406
+ def sub: () -> source
407
+ def low: () -> source
408
+ def bass: () -> source
409
+ def mid: () -> source
410
+ def high: () -> source
411
+ def treble: () -> source
412
+ def fft_spectrum: () -> source
413
+ def onset: () -> source
414
+ | (Symbol | String band) -> source
415
+ def kick: () -> source
416
+ | (untyped value) -> untyped
417
+ def snare: () -> source
418
+ | (untyped value) -> untyped
419
+ def hihat: () -> source
420
+ | (untyped value) -> untyped
421
+ def beat?: () -> source
422
+ def beat: () -> source
423
+ def beat_confidence: () -> source
424
+ def beat_pulse: () -> source
425
+ def beat_count: () -> source
426
+ def bpm: () -> source
427
+ def to_h: () -> layer
428
+ end
429
+
430
+ class ReactionBuilder
431
+ def initialize: (mapping_factory: ^(Symbol | String, Hash[Symbol, untyped]) -> mapping mapping_factory) -> void
432
+ def evaluate: () { () -> void } -> Array[mapping]
433
+ def change: (Symbol | String target, **untyped options) -> mapping
434
+ def trigger: (Symbol | String target, **untyped options) -> mapping
435
+ end
436
+
437
+ class MappingTransformBuilder
438
+ def initialize: (?Hash[untyped, untyped] initial) -> void
439
+ def evaluate: () ?{ () -> void } -> MappingTransformBuilder
440
+ def gain: (Numeric value) -> Numeric
441
+ def range: (Range[Numeric] | [Numeric, Numeric] value) -> (Range[Numeric] | [Numeric, Numeric])
442
+ def min: (Numeric value) -> Numeric
443
+ def max: (Numeric value) -> Numeric
444
+ def curve: (Symbol | String value) -> (Symbol | String)
445
+ def deadzone: (Numeric value) -> Numeric
446
+ def smooth: (?attack: Numeric? attack, ?release: Numeric? release) -> Hash[Symbol, untyped]
447
+ def to_h: () -> Hash[Symbol, untyped]
448
+ end
449
+
450
+ class MappingResolver
451
+ def initialize: () -> void
452
+ def resolve_layers: (
453
+ scene_layers: Array[Hash[Symbol, untyped]],
454
+ audio: Hash[Symbol, untyped],
455
+ ?time: Numeric time,
456
+ ?frame: Integer frame,
457
+ ?resolution: Array[untyped] resolution,
458
+ ?globals: Hash[untyped, untyped] globals
459
+ ) -> Array[Hash[Symbol, untyped]]
460
+ end
461
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vizcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada
@@ -90,73 +90,164 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - LICENSE.txt
92
92
  - README.md
93
- - docs/GETTING_STARTED.md
93
+ - docs/.nojekyll
94
+ - docs/assets/playground-worker.js
95
+ - docs/assets/playground.css
96
+ - docs/assets/playground.js
97
+ - docs/assets/site.css
98
+ - docs/assets/vizcore-demo.gif
99
+ - docs/assets/vizcore-poster.png
100
+ - docs/assets/vj-tunnel.js
101
+ - docs/index.html
102
+ - docs/playground.html
103
+ - docs/shape_dsl.md
104
+ - examples/README.md
105
+ - examples/assets/README.md
94
106
  - examples/assets/complex_demo_loop.wav
107
+ - examples/audio_inspector.rb
95
108
  - examples/basic.rb
109
+ - examples/club_intro_drop.rb
96
110
  - examples/complex_audio_showcase.rb
97
111
  - examples/custom_shader.rb
98
112
  - examples/file_audio_demo.rb
99
113
  - examples/intro_drop.rb
114
+ - examples/kansai_rubykaigi_visual.rb
115
+ - examples/live_coding_minimal.rb
116
+ - examples/midi_controller_show.rb
100
117
  - examples/midi_scene_switch.rb
118
+ - examples/parser_visualizer.rb
119
+ - examples/readme_demo.rb
120
+ - examples/rhythm_geometry.rb
121
+ - examples/ruby_crystal_show.rb
122
+ - examples/shader_playground.rb
101
123
  - examples/shaders/custom_wave.frag
124
+ - examples/unyo_liquid.rb
125
+ - examples/vj_ambient_chill_room.rb
126
+ - examples/vj_dnb_jungle.rb
127
+ - examples/vj_festival_mainstage.rb
128
+ - examples/vj_festival_mainstage.yml
129
+ - examples/vj_glitch_industrial.rb
130
+ - examples/vj_hiphop_cipher.rb
131
+ - examples/vj_jpop_idol_live.rb
132
+ - examples/vj_synthwave_retro.rb
133
+ - examples/vj_techno_warehouse.rb
102
134
  - exe/vizcore
103
135
  - frontend/index.html
136
+ - frontend/src/audio-inspector.js
137
+ - frontend/src/custom-shape-param-controls.js
138
+ - frontend/src/live-controls.js
104
139
  - frontend/src/main.js
140
+ - frontend/src/mapping-target-selector.js
141
+ - frontend/src/midi-learn.js
142
+ - frontend/src/performance-monitor.js
143
+ - frontend/src/plugin-runtime.js
144
+ - frontend/src/projector-mode.js
105
145
  - frontend/src/renderer/engine.js
106
146
  - frontend/src/renderer/layer-manager.js
107
147
  - frontend/src/renderer/shader-manager.js
148
+ - frontend/src/runtime-control-preset.js
149
+ - frontend/src/shader-error-overlay.js
150
+ - frontend/src/shader-param-controls.js
108
151
  - frontend/src/shaders/builtins.js
109
152
  - frontend/src/shaders/post-effects.js
153
+ - frontend/src/shape-editor-controls.js
154
+ - frontend/src/visual-regression.js
155
+ - frontend/src/visual-settings-preset.js
110
156
  - frontend/src/visuals/geometry.js
157
+ - frontend/src/visuals/image-renderer.js
111
158
  - frontend/src/visuals/particle-system.js
159
+ - frontend/src/visuals/shape-renderer.js
160
+ - frontend/src/visuals/spectrogram-renderer.js
161
+ - frontend/src/visuals/svg-arc.js
112
162
  - frontend/src/visuals/text-renderer.js
113
163
  - frontend/src/visuals/vj-effects.js
114
164
  - frontend/src/websocket-client.js
115
165
  - lib/vizcore.rb
116
166
  - lib/vizcore/analysis.rb
167
+ - lib/vizcore/analysis/adaptive_normalizer.rb
117
168
  - lib/vizcore/analysis/band_splitter.rb
118
169
  - lib/vizcore/analysis/beat_detector.rb
119
170
  - lib/vizcore/analysis/bpm_estimator.rb
171
+ - lib/vizcore/analysis/feature_recorder.rb
172
+ - lib/vizcore/analysis/feature_replay.rb
120
173
  - lib/vizcore/analysis/fft_processor.rb
121
174
  - lib/vizcore/analysis/fftw_ffi.rb
122
175
  - lib/vizcore/analysis/pipeline.rb
123
176
  - lib/vizcore/analysis/smoother.rb
177
+ - lib/vizcore/analysis/tap_tempo.rb
124
178
  - lib/vizcore/audio.rb
125
179
  - lib/vizcore/audio/base_input.rb
126
180
  - lib/vizcore/audio/dummy_sine_input.rb
127
181
  - lib/vizcore/audio/file_input.rb
182
+ - lib/vizcore/audio/fixture_input.rb
128
183
  - lib/vizcore/audio/input_manager.rb
129
184
  - lib/vizcore/audio/mic_input.rb
130
185
  - lib/vizcore/audio/midi_input.rb
131
186
  - lib/vizcore/audio/portaudio_ffi.rb
132
187
  - lib/vizcore/audio/ring_buffer.rb
133
188
  - lib/vizcore/cli.rb
189
+ - lib/vizcore/cli/doctor.rb
190
+ - lib/vizcore/cli/dsl_reference.rb
191
+ - lib/vizcore/cli/layer_docs.rb
192
+ - lib/vizcore/cli/scene_diagnostics.rb
193
+ - lib/vizcore/cli/scene_inspector.rb
194
+ - lib/vizcore/cli/scene_validator.rb
195
+ - lib/vizcore/cli/shader_template.rb
196
+ - lib/vizcore/cli/shader_uniform_docs.rb
134
197
  - lib/vizcore/config.rb
198
+ - lib/vizcore/control_preset.rb
135
199
  - lib/vizcore/dsl.rb
136
200
  - lib/vizcore/dsl/engine.rb
137
201
  - lib/vizcore/dsl/file_watcher.rb
138
202
  - lib/vizcore/dsl/layer_builder.rb
203
+ - lib/vizcore/dsl/layer_group_builder.rb
139
204
  - lib/vizcore/dsl/mapping_resolver.rb
205
+ - lib/vizcore/dsl/mapping_transform_builder.rb
140
206
  - lib/vizcore/dsl/midi_map_executor.rb
207
+ - lib/vizcore/dsl/reaction_builder.rb
141
208
  - lib/vizcore/dsl/scene_builder.rb
142
209
  - lib/vizcore/dsl/shader_source_resolver.rb
210
+ - lib/vizcore/dsl/style_builder.rb
211
+ - lib/vizcore/dsl/timeline_builder.rb
143
212
  - lib/vizcore/dsl/transition_controller.rb
144
213
  - lib/vizcore/errors.rb
214
+ - lib/vizcore/layer_catalog.rb
215
+ - lib/vizcore/project_manifest.rb
145
216
  - lib/vizcore/renderer.rb
146
217
  - lib/vizcore/renderer/frame_scheduler.rb
218
+ - lib/vizcore/renderer/png_writer.rb
219
+ - lib/vizcore/renderer/render_sequence.rb
220
+ - lib/vizcore/renderer/scene_frame_source.rb
147
221
  - lib/vizcore/renderer/scene_serializer.rb
222
+ - lib/vizcore/renderer/snapshot.rb
223
+ - lib/vizcore/renderer/snapshot_renderer.rb
148
224
  - lib/vizcore/server.rb
149
225
  - lib/vizcore/server/frame_broadcaster.rb
226
+ - lib/vizcore/server/gallery_app.rb
227
+ - lib/vizcore/server/gallery_page.rb
228
+ - lib/vizcore/server/gallery_runner.rb
150
229
  - lib/vizcore/server/rack_app.rb
151
230
  - lib/vizcore/server/runner.rb
231
+ - lib/vizcore/server/scene_dependency_watcher.rb
152
232
  - lib/vizcore/server/websocket_handler.rb
233
+ - lib/vizcore/shape.rb
234
+ - lib/vizcore/sync.rb
235
+ - lib/vizcore/sync/osc_message.rb
236
+ - lib/vizcore/sync/osc_receiver.rb
153
237
  - lib/vizcore/templates/basic_scene.rb
154
238
  - lib/vizcore/templates/custom_shader_scene.rb
155
239
  - lib/vizcore/templates/custom_wave.frag
156
240
  - lib/vizcore/templates/intro_drop_scene.rb
157
241
  - lib/vizcore/templates/midi_control_scene.rb
242
+ - lib/vizcore/templates/plugin_layer.rb
243
+ - lib/vizcore/templates/plugin_readme.md
244
+ - lib/vizcore/templates/plugin_renderer.js
245
+ - lib/vizcore/templates/plugin_scene.rb
158
246
  - lib/vizcore/templates/project_readme.md
247
+ - lib/vizcore/templates/rubykaigi_scene.rb
159
248
  - lib/vizcore/version.rb
249
+ - scripts/browser_capture.mjs
250
+ - sig/vizcore.rbs
160
251
  homepage: https://github.com/ydah/vizcore
161
252
  licenses:
162
253
  - MIT
@@ -164,7 +255,7 @@ metadata:
164
255
  homepage_uri: https://github.com/ydah/vizcore
165
256
  source_code_uri: https://github.com/ydah/vizcore
166
257
  changelog_uri: https://github.com/ydah/vizcore/blob/main/CHANGELOG.md
167
- documentation_uri: https://github.com/ydah/vizcore/blob/main/docs/GETTING_STARTED.md
258
+ documentation_uri: https://ydah.github.io/vizcore/
168
259
  rubygems_mfa_required: 'true'
169
260
  rdoc_options: []
170
261
  require_paths: