Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side preview visualizer renders shaders directly to threejs surfaces #345

Draft
wants to merge 1,340 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1340 commits
Select commit Hold shift + click to select a range
1567853
Bump up compiler memory limit.
xian Sep 22, 2020
4dc8683
Start using baaahs.show.live.View expect/actual classes for rendering…
xian Sep 22, 2020
dae399c
Shorter lifespan for MutableShow: ControlDisplay doesn't peremptorily…
xian Sep 22, 2020
2890b52
Re-package some UI stuff.
xian Sep 23, 2020
9e8ebc5
Move material-ui icons into an Icons object.
xian Sep 25, 2020
aa31ed9
Overhaul editing dialog in design mode.
xian Sep 26, 2020
9c60968
Re-implemented adding button to button group using EditableManager.
xian Sep 30, 2020
b8e2093
Fix excess pubsub updates when a show is edited.
xian Oct 1, 2020
a42c1be
Merge pull request #295 from baaahs/more-buttons
xian Oct 1, 2020
9f03694
More EditableManager fixes.
xian Oct 3, 2020
dfb78ee
More EditableManager fixes.
xian Oct 3, 2020
752314e
Merge pull request #296 from baaahs/more-buttons
xian Oct 3, 2020
caaae49
Remove old UvTranslator stuff.
xian Oct 3, 2020
1c574f1
Merge pull request #297 from baaahs/cleanup
xian Oct 4, 2020
a66fae7
Move Model out of SheepModel.kt.
xian Oct 3, 2020
a2443b8
Prepare for moving heads to be handled by ModelRenderer.
xian Oct 3, 2020
7cbed14
Move Fixture and FixtureManager to baaahs.fixtures.
xian Oct 3, 2020
7ecd861
Refactor ModelRenderer to allow result buffers other than RGBA bytes.
xian Oct 4, 2020
5074837
Implement projection shader preview.
xian Oct 4, 2020
c25a61b
Merge pull request #298 from baaahs/projection-shader-preview
xian Oct 6, 2020
5a55a43
Fix shader links editor.
xian Oct 10, 2020
40554df
Fix PreviewShaderBuilder gadget creation.
xian Oct 10, 2020
00bba86
Some design mode fixes.
xian Oct 11, 2020
e36123d
Merge pull request #300 from baaahs/edit-links
xian Oct 11, 2020
65d99d7
Refactor GLSL generation spec.
xian Oct 11, 2020
f756a98
Fix crash when a shader instance has mappings for unknown ports (mayb…
xian Oct 11, 2020
98aa072
Merge pull request #301 from baaahs/patch-fixes
xian Oct 11, 2020
db41c34
Nicer GLSL code display in simulator.
xian Oct 11, 2020
2f187ce
Merge pull request #302 from baaahs/nicer-glsl-in-simulator
xian Oct 11, 2020
af74d50
In design mode, sections have an add (+) button for creating new butt…
xian Oct 12, 2020
2ea2421
Buttons can be toggle or momentary.
xian Oct 12, 2020
89cf7d7
Extract KeyboardShortcutHandler from AppIndex.
xian Oct 12, 2020
c26d667
EditabeManager cleanup.
xian Oct 12, 2020
36988a4
Fix serialization spec.
xian Oct 12, 2020
1f22b58
Merge pull request #303 from baaahs/editor-properties
xian Oct 12, 2020
fc22f8d
Refactor to make EditingShader more easily testable.
xian Oct 13, 2020
5bf9496
Create spec for EditingShader.
xian Oct 13, 2020
642cd56
Show model points projected outside the uv [0..1) space as red dots a…
xian Oct 13, 2020
e04c1d7
Merge pull request #304 from baaahs/show-projection-overflows
merge-when-green[bot] Oct 13, 2020
ad8ed04
Move Logger to baaahs.util.
xian Oct 13, 2020
f545aa9
Shader instance editor fixes.
xian Oct 14, 2020
6845342
Fix sizing for icons.
xian Oct 14, 2020
edb2211
Shader instance editor fixes.
xian Oct 14, 2020
692123d
Merge pull request #305 from baaahs/shader-editing-fixes
merge-when-green[bot] Oct 14, 2020
716d2e0
Merge branch 'main' into section-add-button
xian Oct 14, 2020
96ff7b7
Merge pull request #306 from baaahs/section-add-button
xian Oct 14, 2020
464121b
Add "Download Show" action from app drawer.
xian Oct 14, 2020
a529a88
Merge pull request #307 from baaahs/download-show
merge-when-green[bot] Oct 14, 2020
64db300
Fix glsl error annotations in shader editor.
xian Oct 14, 2020
db76cfc
Fix spurious GLSL error marker at line 0 whenever there was any error.
xian Oct 14, 2020
c51c777
Merge pull request #308 from baaahs/fix-glsl-error-markers
merge-when-green[bot] Oct 14, 2020
54efc3e
Add more explicit specs for ShaderToy shader handling.
xian Oct 15, 2020
74db22c
Move describe<Class> from StageManagerSpec to TestUtil.
xian Oct 15, 2020
509b6b2
Fix empty glsl error warning on line 0.
xian Oct 18, 2020
14250b0
Fix editor crash when we can't determine what kind of shader we're an…
xian Oct 18, 2020
8898d7b
Move link suggestion code from views into EditingShader/AutoWirer.
xian Oct 18, 2020
c162408
Merge pull request #309 from baaahs/fix-shadertoy-parsing
xian Oct 19, 2020
abcd051
Link editor cleanup.
xian Oct 20, 2020
4c9ec99
Merge pull request #310 from baaahs/link-suggestions-overhaul
merge-when-green[bot] Oct 20, 2020
9c8b0a2
Log shader prepare times.
xian Oct 20, 2020
3a74bd5
Merge pull request #311 from baaahs/log-shader-prepare-times
merge-when-green[bot] Oct 20, 2020
317c112
Update README a bit.
xian Oct 20, 2020
486c650
Add Chrome debug console formatters for Kotlin maps, sets, and lists.
xian Oct 20, 2020
bc1210f
Add spec of GLSL generation for multi-channel shader patches.
xian Oct 20, 2020
ce537f0
ConsoleFormatters cleanup.
xian Oct 20, 2020
6a3c569
Merge pull request #312 from baaahs/fix-glsl-undeclared-identifier
merge-when-green[bot] Oct 20, 2020
c555c3a
Move MutableControls out of MutableShow.
xian Oct 20, 2020
4578e32
Add visualizer control.
xian Oct 21, 2020
15c05f5
Add model surfaces to visualizer.
xian Oct 21, 2020
f96c054
Merge pull request #314 from baaahs/more-ui-controls
merge-when-green[bot] Oct 21, 2020
3a5dc67
Shader editor fixes.
xian Oct 21, 2020
5e77cea
Merge pull request #315 from baaahs/fix-extract-port-refactor
merge-when-green[bot] Oct 21, 2020
13ade67
Declare BAAAHS' eyes in SheepModel, not ObjModel.
xian Oct 3, 2020
c26368b
GlslAnalyzer now has a deeper understanding of structs.
xian Oct 7, 2020
673f2e3
Rename "ModelRenderer" to more the magnificently imposing "RenderEngi…
xian Oct 7, 2020
7a4e076
Pull Brain management out of Pinky into BrainManager.
xian Oct 10, 2020
c200f39
Fix import.
xian Oct 21, 2020
9ef7749
Merge pull request #316 from baaahs/moving-heads-prep
merge-when-green[bot] Oct 21, 2020
23533fc
Fix kotlin collectin console formatters.
xian Oct 22, 2020
38ac333
Collapse empty sections in layout.
xian Oct 22, 2020
7d4c63b
Always use ShaderInstanceOptions for AutoWirer.
xian Oct 22, 2020
f43e782
Use multiplatform-safe Renderer for locating control views; kill Cont…
xian Oct 23, 2020
50afaed
Fix Gadgets tab in shader editor.
xian Oct 24, 2020
765683f
Merge pull request #317 from baaahs/fix-gadgets-preview
merge-when-green[bot] Oct 24, 2020
7a46cd2
Add aliases for `kotlin.browser.document` and `.window` until import …
xian Oct 24, 2020
1f85b64
Merge pull request #318 from baaahs/kill-warnings
merge-when-green[bot] Oct 24, 2020
195d2c7
Fix guru meditation error fail.
xian Oct 24, 2020
dd744a6
Merge pull request #319 from baaahs/kill-warnings
merge-when-green[bot] Oct 24, 2020
71e21d0
Design mode UI tightening/cleanup.
xian Oct 25, 2020
f665a5a
Make Redo button visible in patch editor.
xian Oct 25, 2020
5a46018
Fix source port display update in shader editor.
xian Oct 25, 2020
2c20798
Push to undo stack when creating new shader in patch editor.
xian Oct 25, 2020
3c68668
Fix GLSL macro expansion.
xian Oct 25, 2020
e5d914f
Merge pull request #320 from baaahs/fixes-20201024
merge-when-green[bot] Oct 25, 2020
a7d073d
Hint parsing fails shouldn't kill the shader editor.
xian Oct 26, 2020
3c1aafa
Merge pull request #321 from baaahs/fixes-20201024
merge-when-green[bot] Oct 26, 2020
fae9a76
Refactor so fixture pixel positions are always fully determined befor…
xian Oct 28, 2020
fb56792
RenderEngineTest works again!
xian Oct 28, 2020
22809e2
Fix ProjectionPreview.
xian Oct 28, 2020
0fd7a2b
Enable GL tracing with createContext(trace = true).
xian Oct 28, 2020
bd819ea
Cleave GlContext's framebuffer and renderbuffer management in twain.
xian Oct 28, 2020
df6be94
Refactor RenderEngine to take a DeviceType, which configures result s…
xian Oct 28, 2020
19da775
Add support for float..vec4 device results.
xian Oct 29, 2020
09a632a
Clean up some class names.
xian Oct 29, 2020
45cf27e
Unceremoniously wedge DeviceType-mediated uniform and per-pixel param…
xian Oct 31, 2020
bef7856
GlslAnalyzer directly generates GlslStatement subclasses.
xian Nov 2, 2020
f2a951c
Parse GLSL function parameters in GlslAnalyzer.
xian Nov 3, 2020
34c77c6
Simplify component dependency resolution in LinkedPatch..
xian Nov 4, 2020
cf49401
Start hooking up moving heads.
xian Nov 6, 2020
73688c5
Introduce RenderManager for handing RenderEngines for various DeviceT…
xian Nov 6, 2020
1ca9e55
Make GlslProgram's Resolver a SAM.
xian Nov 7, 2020
3ed07c5
Prep for enabling moving head devices.
xian Nov 7, 2020
c1eb04a
Fix compiler warning in JVM GlContext.
xian Nov 7, 2020
b56dee1
Disinvolve Fixture from some places it needn't be involved.
xian Nov 7, 2020
e34a6e7
Fixture has no equality semantics apart from identity.
xian Nov 7, 2020
aefd5cc
Fixtures now hold their own Transport. Killed FixtureReceivers and Br…
xian Nov 9, 2020
5647da2
Rename FixtureRenderPlan to RenderTarget.
xian Nov 9, 2020
88c1abd
Fix broken shader previews.
xian Nov 9, 2020
bd3bd48
Fixtures refer to any model entity, not just surfaces.
xian Nov 10, 2020
847fb65
Rename Resolver to FeedResolver.
xian Nov 10, 2020
9ac2536
Move DataFeed (now Feed) and Binding from GlslProgram to baaahs.gl.data.
xian Nov 10, 2020
0501679
Rework DeviceType to provide DataSources instead of Params.
xian Nov 12, 2020
a651d87
Merge remote-tracking branch 'origin/main' into moving-heads
xian Nov 12, 2020
68a4c2a
Moving head visualization is back up.
xian Nov 13, 2020
2a42273
Hacky but working control of moving heads from shaders.
xian Nov 13, 2020
08e97fc
Merge pull request #299 from baaahs/moving-heads
xian Nov 13, 2020
fff80ff
Fairly working support for moving head control.
xian Nov 14, 2020
d97cc88
Merge pull request #322 from baaahs/moving-heads
merge-when-green[bot] Nov 14, 2020
88f2b74
Move BeatLink stuff to baaahs.plugins.beatlink.
xian Nov 14, 2020
aedc68e
Clock injection cleanup.
xian Nov 14, 2020
326db88
Refactor to rely on plugins for more functionality.
xian Nov 14, 2020
ee7e0ea
DataSource serializers are now provided by plugins.
xian Nov 14, 2020
33946e8
BeatLinkPlugin provides a custom plugin allowing it to inject stuff o…
xian Nov 14, 2020
bf4b6f8
Implement trivial BeatLink control.
xian Nov 15, 2020
018bdc0
Remove noisy log message.
xian Nov 15, 2020
8d13b64
Fix (and test) double -> float precision loss for time and beat link.
xian Nov 15, 2020
c8e2e21
Merge pull request #323 from baaahs/beatlink-control
xian Nov 18, 2020
653d30e
Bump dependency versions.
xian Nov 18, 2020
517546c
Fix tests.
xian Nov 19, 2020
edda0b7
Switch from kotlin.test.expect to the Atrium assertion library.
xian Nov 20, 2020
57ab67a
Add --stacktrace to build. Quiet some warnings.
xian Nov 20, 2020
708118b
Merge pull request #324 from baaahs/bump-dep-vers
xian Nov 20, 2020
b4f2817
Convert PubSubTest to PubSubSpec.
xian Nov 20, 2020
9c01dd1
Refactor GLSL program generation.
xian Nov 20, 2020
35d0845
GLSL palette should update when the render plan changes.
xian Nov 21, 2020
8ab7613
ProgramLinker builds LinkedPatch.
xian Nov 21, 2020
bcc1d5a
Move data source suggestion code from CorePlugin to Plugins.
xian Nov 22, 2020
e81a43e
Instances of Plugin provide a list of content types, with suggestion …
xian Nov 22, 2020
41835fe
Don't pre-open device type feeds, handle them like any other feed.
xian Nov 23, 2020
4d85fb3
AutoWirer now suggests device type-specific data sources.
xian Nov 23, 2020
f4c1674
Make PreviewRenderEngine.render() public so QuadPreview can call it.
xian Nov 23, 2020
e698d9a
Merge pull request #327 from baaahs/refactor-linked-patch
xian Nov 23, 2020
2456245
Fix broken shader previews.
xian Nov 28, 2020
d1f1665
Merge pull request #329 from baaahs/fix-shader-previews
xian Nov 28, 2020
7583172
Keep ShaderEditorStyles around for reuse.
xian Nov 28, 2020
bf0fa3a
Comments on lines preceding a GLSL function are associated with that …
xian Nov 29, 2020
74cc6dc
Patch data source wiring is via shader channels.
xian Nov 29, 2020
0dccb45
Rename PatchLayeringSpec to PatchResolverSpec.
xian Nov 30, 2020
9e00640
Data sources may be filtered/modified by shaders.
xian Dec 2, 2020
105522b
Merge pull request #331 from baaahs/datasources-have-channels
xian Dec 2, 2020
1e52e9a
Quiet some compiler warnings.
xian Nov 20, 2020
3eb34e4
Brevity.
xian Nov 24, 2020
3f1eb49
Rename GlslVar#displayName() to #title.
xian Nov 24, 2020
e39aaa6
GlslVar and GlslParam both implement GlslArgSite.
xian Nov 24, 2020
960735c
Extract paint shaders to files.
xian Nov 24, 2020
0fb716f
GenericPaintShader allows input ports to be specified as params on th…
xian Nov 24, 2020
4dd2d75
Refactoring toward more generalized handling of shader types.
xian Nov 27, 2020
8241677
Fix issues.
xian Dec 2, 2020
b8cb166
DistortionShaders may declare input ports from entry point params.
xian Nov 27, 2020
923694b
DataSource serializers are specified by DataSourceBuilders, not direc…
xian Nov 27, 2020
fecff17
Field rename to fix js compile problem.
xian Nov 27, 2020
d31b62d
Fix build.
xian Dec 2, 2020
4ef9258
If a show has problems, display an icon in the toolbar which displays…
xian Dec 3, 2020
9172f7e
Refactor how shaders are analyzed and stored, and how programs are ge…
xian Dec 7, 2020
1feb349
Show error indicators on patch holders in design mode.
xian Dec 8, 2020
fcebfa8
Disentangle raster xy -> pixel xyz lookup from projection shader.
xian Dec 12, 2020
cf8c9a2
It's valid for ShaderBuilder to have a Success state with no program.
xian Dec 12, 2020
56adf11
Fix RenderEngineTest.
xian Dec 13, 2020
2ae8743
Remove 'stream' content type variants; no longer needed or helpful.
xian Dec 13, 2020
d0cc61d
Decrease our reliance on ShaderType's defaultUpstreams by always incl…
xian Dec 14, 2020
61739a1
Split AutoWirer spec up by port.
xian Dec 14, 2020
a6cd248
GLSL globals variables and function params and return values fo struc…
xian Dec 16, 2020
b07384d
Turns out we don't seem to need explicit links to other shaders, whoops!
xian Dec 17, 2020
78bfc0b
Eliminate some mutable/live analysis cycles in ShaderInstanceOptions …
xian Dec 17, 2020
028fe84
Determine which content types default to the Main channel for auto-wi…
xian Dec 19, 2020
3376790
Split out an "Analyzing" state in a ShaderBuilder, distinct from "Lin…
xian Dec 22, 2020
5c0ed54
Imagine there're no shader types.
xian Dec 23, 2020
20d94bc
Merge pull request #332 from baaahs/generic-shaders
xian Dec 25, 2020
bdf829b
Rename ShaderPrototype to ShaderDialect.
xian Dec 25, 2020
6909719
Somewhat better line number calculation.
xian Dec 26, 2020
af15f69
Display error status more prominently in UI, and not just in design m…
xian Dec 27, 2020
d67fe1f
Rename GlslAnalyzer.validate() to analyze().
xian Dec 27, 2020
4906fe1
Improvements to error reporting.
xian Dec 27, 2020
931deac
Fix tests.
xian Dec 27, 2020
3e8bf22
Merge pull request #333 from baaahs/shader-refactor-cleanup
xian Dec 27, 2020
4094ab5
Repackage some shader stuff.
xian Dec 28, 2020
98cf867
Fix PaintShader title/icon.
xian Dec 29, 2020
bcc019d
For ports that explicitly specify a plugin data source, adopt its con…
xian Dec 30, 2020
ec6c894
Merge pull request #335 from baaahs/shader-refactor-cleanup
merge-when-green[bot] Dec 30, 2020
c3af5ef
Fix some issues in sample show.
xian Dec 31, 2020
20ffae8
Merge pull request #336 from baaahs/shader-refactor-cleanup
merge-when-green[bot] Dec 31, 2020
b6ea918
Pull VizMovingHead out of Visualizer.
xian Dec 31, 2020
cfa8e51
Refactor VizMovingHead to have a separate object representing the lig…
xian Dec 31, 2020
3d9a47a
Refactor where various MovingHead/Buffer data bits live.
xian Dec 31, 2020
5a45e85
Move three extensions to three_ext.
xian Dec 31, 2020
6d836ef
Import three declarations from https://github.com/liorgonnen/kotlin-t…
xian Dec 31, 2020
e3199be
Upgrade to three.js 1.120.
xian Jan 1, 2021
655acc2
Simulate moving head color wheel.
xian Jan 2, 2021
070a465
Move VizMovingHead to its own package.
xian Jan 2, 2021
d37ce93
Pull Beam and Cone out of VizMovingHead.
xian Jan 2, 2021
83a291a
Add beginnings of motor speed modeling for moving heads.
xian Jan 2, 2021
19ac908
Move some mover visualization into common for easier testing.
xian Jan 2, 2021
d2671fe
Add a test for VizMovingHead movement.
xian Jan 2, 2021
4a68d3a
Moving head visualizer now models movement speed.
xian Jan 2, 2021
7e2f8dc
Merge pull request #337 from baaahs/moving-heads-viz
merge-when-green[bot] Jan 2, 2021
96e6dd9
Better support for shader-local structs.
xian Jan 3, 2021
7c579e6
Pull ShaderComponent and DataSourceComponent out to files.
xian Jan 3, 2021
672a687
Rename/generalize MovingHeadInfo to FixtureInfo.
xian Jan 3, 2021
d533c72
Rename PanAndTilt to MovingHeadParams.
xian Jan 3, 2021
b827fbd
Moving head params are now managed in GLSL as a struct.
xian Jan 4, 2021
4a78a5c
Merge pull request #338 from baaahs/better-struct-support
merge-when-green[bot] Jan 4, 2021
3658ae4
Add shutter to moving head DMX params (but not visible to shaders yet).
xian Jan 4, 2021
3f60a65
Show with moving head shaders.
xian Jan 4, 2021
d21a722
Hide AutoWirer and GlslAnalyzer behind new Toolchain.
xian Jan 5, 2021
0631879
Slim down the Toolchain interface a bit.
xian Jan 5, 2021
fce60b4
Toolchain refactoring.
xian Jan 5, 2021
08e4012
Create CachingToolchain and misc cleanup.
xian Jan 5, 2021
7b2d835
Kill old PatchHolderEditor.kt.
xian Jan 5, 2021
4e7d47c
Pass EditableManager to EditorPanel instances at construction, not ge…
xian Jan 5, 2021
598948d
Display shader analysis data/problems in patch editor.
xian Jan 5, 2021
0c9d400
JS Logger now checks for level level in baaahs.util.LogLevels before …
xian Jan 5, 2021
7bd3cc8
Merge pull request #339 from baaahs/open-shader-cache
merge-when-green[bot] Jan 5, 2021
4da9526
Handle block comments in GLSL.
xian Jan 6, 2021
9f3c500
Fix compilation of mover shaders in shader editor. Minor logging fixes.
xian Jan 6, 2021
bf558ec
Fix warning in shader editor from shader channel select while shader …
xian Jan 7, 2021
0d3821f
Merge pull request #340 from baaahs/fix-editor-bugs
merge-when-green[bot] Jan 7, 2021
944befc
Shader editor now shows a refactoring affordance with popup menu for …
xian Jan 7, 2021
03102b9
Fix bug causing refactoring menu to appear only in first shader editor.
xian Jan 8, 2021
bd2f525
Merge pull request #341 from baaahs/editor-improvements
merge-when-green[bot] Jan 8, 2021
5a31fba
Fix dom attr warning in shader editor.
xian Jan 8, 2021
4291b22
Fix bug switching shader preview types when component is reused.
xian Jan 8, 2021
f645609
Clean up creation and wiring of ShaderPreview instance from ShaderType.
xian Jan 8, 2021
424d633
Move ShaderPreview classes to baaahs.gl.preview.
xian Jan 8, 2021
d7cb0f1
Simple preview for moving head params.
xian Jan 9, 2021
3b22d55
Merge pull request #342 from baaahs/editor-improvements
merge-when-green[bot] Jan 9, 2021
eebc9f1
Patch overview sorts shaders by type, and shows type icon.
xian Jan 15, 2021
688b648
Merge pull request #344 from baaahs/misc-cleanup
merge-when-green[bot] Jan 15, 2021
cdf6529
Rename RenderTarget to FixtureRenderTarget and extract superclass.
xian Jan 28, 2021
3d9d5b5
Refactor PatchResolver to take datasources map later.
xian Jan 28, 2021
9e5147e
WIP: Render shaders direct to threejs preview.
xian Jan 29, 2021
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
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"react-hot-loader/babel",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties"
]
}
76 changes: 76 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
version: 2
jobs:
build:
branches:
ignore: gh-pages

docker:
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/openjdk:11-jdk-node-browsers

working_directory: ~/repo

environment:
NO_GPU: true

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle.kts" }}
- v1-dependencies-

- run:
name: Prefetch Dependencies
command: |
./gradlew model

- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle.kts" }}

- run:
name: Build
command: |
./gradlew build dokka -x jsBrowserTest --stacktrace

- add_ssh_keys:
fingerprints:
- "e6:55:46:24:0b:66:40:62:f9:72:10:00:de:41:37:e6"

- store_test_results:
path: build/reports/tests

- store_artifacts:
path: build/processedResources/js/main

- store_artifacts:
path: build/reports

- run:
name: Deploy to gh-pages
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
mkdir -p build/gh-pages/.circleci
cp .circleci/gh-pages-config.yml build/gh-pages/.circleci/config.yml

cp -r build/distributions/* build/gh-pages

mkdir -p build/gh-pages/doc
cp -r build/javadoc/* build/gh-pages/doc/.

# don't ignore files starting with _
touch build/gh-pages/.nojekyll

date > build/gh-pages/BUILT.txt

git config --global user.email "ci-build@baaahs.org"
git config --global user.name "CI Builder"

mkdir -p deploy/node_modules
npm install --prefix deploy --silent gh-pages@3.0
`npm bin --prefix deploy`/gh-pages --dotfiles --message "Auto deploy" --dist build/gh-pages
fi
5 changes: 5 additions & 0 deletions .circleci/gh-pages-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 2
jobs:
build:
branches:
ignore: gh-pages # prevent gh-pages from triggering circleci
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build
.idea
.gradle
node_modules
.DS_Store
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"parser": "babel",
"printWidth": 80,
"proseWrap": "preserve",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
}
306 changes: 306 additions & 0 deletions CMakeLists.txt

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# BAAAHS Code of Conduct

## 1. Purpose

A primary goal of BAAAHS (Big-Ass Amazingly Awesome Homosexual Sheep) is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of age, gender, sexual orientation, sexual position (top, bottom, versatile), ability, ethnicity, socioeconomic status, technical ability, fashion-sense, and religion (or lack thereof).

This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.

We invite all those who participate in BAAAHS to help us create safe and positive experiences for everyone.

## 2. Open Culture Citizenship

A supplemental goal of this Code of Conduct is to increase open culture citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.

Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.

If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.

## 3. Expected Behavior

The following behaviors are expected and requested of all community members:

* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.

## 4. Unacceptable Behavior

The following behaviors are considered harassment and are unacceptable within our community:

* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying violent material.
* Posting or threatening to post other people's personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, sexual position, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someone's consent before touching them.
* Unwelcome sexual attention. This includes, inappropriate touching, groping, and unwelcomed sexual advances without consent.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks, presentations, and parties.

## 5. Weapons Policy

No weapons will be allowed at BAAAHS events, community spaces, or in other spaces covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives, and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter.

## 6. Consequences of Unacceptable Behavior

Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.

Anyone asked to stop unacceptable behavior is expected to comply immediately.

If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).

## 7. Reporting Guidelines

If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. Use our email: info@baaahs.org

Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.

## 8. Addressing Grievances

If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify info@baaahs.org with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.


## 9. Scope

We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business.

This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.

## 10. Contact info

info@baaahs.org

## 11. License and attribution

The BAAAHS Code of Conduct is a fork of the Citizen Code of Conduct. The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).

Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).

_Revision 2.3. Posted 6 March 2017._

_Revision 2.2. Posted 4 February 2016._

_Revision 2.1. Posted 23 June 2014._

_Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2013-2019 BAAAHS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
111 changes: 108 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,111 @@
# BAAAHS Simulator 2
# Sparkle Motion

[![CircleCI:main](https://circleci.com/gh/baaahs/sparklemotion.svg?style=svg)](https://circleci.com/gh/baaahs/sparklemotion)

Sparkle Motion is the system used to control the lights on [BAAAHS](http://baaahs.org), but it's
designed so it could be applied to pretty much any lighting project. It includes a browser-based
light show designer and performance interface, 3D light mapping, IP-based control protocol, and
custom LED control hardware and firmware. We designed it all pretty much from scratch, because
we're nerds. We hope you'll have some fun with it and maybe find it useful.

| | |
| --- | --- |
| <img src="/demo.gif" alt="Simulator image" width="400"> <br/> The Sparkle Motion [Simulator](https://baaahs.github.io/sparklemotion) | <img src="/brc-2019.gif" alt="BAAAHS at BRC 2019" width="400"> <br/> BAAAHS at Black Rock City, 2019|


> **tl;dr:**
>
> Shows are built out of small scripts called shaders, which are written in
> [GLSL](https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)). Lots of [awesome](http://glslsandbox.com/)
> [free](https://www.shadertoy.com/) shaders and [dev](https://github.com/radixzz/awesome-glsl)
> [tools](https://shaderfrog.com/) already exist on the internet. In the show designer, you can create or
> import shaders, and attach them to buttons or sliders in a customizable performance UI. Shaders can be
> combined in interesting ways to create new effects. You can make shows reactive to the environment by
> connecting external sensor data—like a beat detector, midi controller, sound spectral analysis, or a
> webcam—to shader variables.
>
> Sparkle Motion can currently control LED strips using a custom IP protocol, and Sharpy-style moving heads
> over DMX, but it could be extended to control pretty much any kind of device. Lights can be mapped to a
> 3D model using computer vision. Individual lighting fixtures, or groups of fixtures, can be controlled
> separately. All types of lights are controlled using the same language and idioms.
>
> On the hardware side, Sparkle Motion includes specs for an ESP32-based controller which you could build
> (or [buy from us](mailto:info@baaahs.org)!) managing WS2812-family LEDs, which is controlled over
> Ethernet or WiFi.

----

## Show Designer

A _show_ is a collection of shaders, attached to UI elements, which can be arbitrarily combined and made reactive to the
environment using sensors,

(more TK)

## Mapper

Sparkle Morton's mapper lets you detect arbitrarily-placed lights on a 2D or 3D model using just a camera
connected to a laptop.

(more TK)

## Hardware

(more TK)

[More here](brain/sw/README.md).

## Simulator

The entire system can be run within a web browser in simulation mode. Every component is modeled in software
so you can see how it will behave in the real world.


-->

## Old Documentation
* [Show API](show_api.md) (outdated)
* [API docs](https://baaahs.github.io/sparklemotion/doc/sparklemotion/) (outdated)

## Prerequisites

1. Install [Java](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)
1. Open as a gradle project with [IntelliJ](https://www.jetbrains.com/idea/download/)

## Running from source

* Open as a gradle project with [IntelliJ](https://www.jetbrains.com/idea/download/)
* Open `src/jsMain/resources/index.html` using "Open in Browser -> Chrome" from IntelliJ context menu
### Simulator Mode

In simulator mode, most of Sparkle Motion runs within a web browser.

Run this in a shell window; a browser window will open with the simulator:

./gradlew --continuous jsRun

### Production Mode

In production mode, Sparkle Motion runs in a JVM process and talks to real hardware.

To start it, run:

./gradlew runPinkyJvm

If you don't have a Brain running locally, do this too:

./gradlew runBrainJvm

When running in this mode you should be able to access the UI at http://localhost:8004

### Builds the production (minified) js package

To build the production minified js package run:

```
./gradlew jsBrowserWebpack
```

## CI & Deployment

Continuous build here: https://circleci.com/gh/baaahs/sparklemotion

Passing builds are automatically deployed here: https://baaahs.github.io/sparklemotion
Loading