Skip to content

Commit

Permalink
work in progress on aout
Browse files Browse the repository at this point in the history
  • Loading branch information
dktr0 committed Nov 18, 2024
1 parent 252269c commit 87ddf62
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 115 deletions.
228 changes: 114 additions & 114 deletions punctual.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Output.purs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Data.Show.Generic (genericShow)

data Output =
Audio |
AOut Int Int | -- first argument is number of channels, second argument is channel offset
Blend |
RGBA |
Add |
Expand Down
1 change: 1 addition & 0 deletions src/Parser.purs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ parseReserved p "bpf" = lift $ signalSignalSignalSignal p $ BPF Combinatorial
parseReserved p "bpfp" = lift $ signalSignalSignalSignal p $ BPF Pairwise
parseReserved p "delay" = lift $ numberSignalSignalSignal p Delay
parseReserved p "audio" = pure $ ValueOutput p Output.Audio
parseReserved p "aout" = pure $ abc p Output.AOut
parseReserved p "blend" = pure $ ValuePolymorphic p (ValueOutput p Output.Blend : signalSignal p Blend : Nil)
parseReserved p "rgba" = pure $ ValueOutput p Output.RGBA -- TODO: rework FragmentShader.purs with support for RGBA as a Signal that accesses previous output
parseReserved p "add" = pure $ ValuePolymorphic p (ValueOutput p Output.Add : signalSignal p Add : Nil)
Expand Down
2 changes: 1 addition & 1 deletion src/TokenParser.purs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ functionsWithArgumentsDef = [
otherReservedNamesDef :: Array String
otherReservedNamesDef = [
"if","then","else",
"audio","blend","rgba","add","mul","rgb"
"audio","aout","blend","rgba","add","mul","rgb"
]

reservedNamesDef :: Array String
Expand Down

0 comments on commit 87ddf62

Please sign in to comment.