Types
gs-store-image-packet: structuresource
Functions
gs-set-default-store-image(packet: gs-store-image-packet, src-fbp: int, src-w: int, src-psm: int, ssax: int, ssay: int, rrw: int, rrh: int) => intsource
Set up a gs-store-image-packet for storing
store-image(oddeven: int) => intsource
Store an image to image.raw
Types
Types
smush-control: structuresource
Fields
start-time: time-frame
period: float
duration: float
amp: float
damp-amp: float
damp-period: float
ticks: float
Methods
set-zero!(obj: smush-control) => _type_source
update!(obj: smush-control) => floatsource
Run the smush control and return the result. Updates the internal state.
get-no-update(obj: smush-control) => floatsource
Get the value, but don't update internal state
activate!(obj: smush-control, arg0: float, arg1: int, arg2: int, arg3: float, arg4: float) => _type_source
Activate the smush! This only activates if the ongoing smush is mostly done.
nonzero-amplitude?(obj: smush-control) => symbolsource
Return #t if amp is not zero, #f otherwise
die-on-next-update!(obj: smush-control) => _type_source
On the next call to update!, zero everything.
Calls to get-no-update will still work.
Calls to get-no-update will still work.
Types
bouncing-float: structuresource
Fields
osc: oscillating-float
max-value: float
min-value: float
elasticity: float
state: int32
Methods
set-params!(obj: bouncing-float, init-val: float, max-val: float, min-val: float, elast: float, accel: float, max-vel: float, damping: float) => floatsource
Float that bounces. It's an oscillating float, but you can add a floor/ceiling that has an
elastic collision.
init-val: intial value and target.
max-val: ceiling to bounce off of
min-val: floor to bounce off of
elast: elasticity
accel: gain
max-vel: maximum velocity, not in elastic part.
damping: damping for the non-elastic part.
elastic collision.
init-val: intial value and target.
max-val: ceiling to bounce off of
min-val: floor to bounce off of
elast: elasticity
accel: gain
max-vel: maximum velocity, not in elastic part.
damping: damping for the non-elastic part.
update!(obj: bouncing-float, arg0: float) => floatsource
at-min?(obj: bouncing-float) => symbolsource
Did the last update it the minimum value?
at-max?(obj: bouncing-float) => symbolsource
Did the last update hit the maximum value?
delayed-rand-float: structuresource
Fields
min-time: int32
max-time: int32
max-val: float
timer: int32
start-time: time-frame
value: float
Methods
set-params!(obj: delayed-rand-float, min-tim: int, max-time: int, max-times-two: float) => floatsource
Float that changes randomly:
min-time: minimum time between changes
max-time: maximum time between changes
max-times-two: maximum range. result is centered around zero.
min-time: minimum time between changes
max-time: maximum time between changes
max-times-two: maximum range. result is centered around zero.
update!(obj: delayed-rand-float) => floatsource
Get the value.
delayed-rand-vector: structuresource
Fields
min-time: int32
max-time: int32
xz-max: float
y-max: float
timer: int32
start-time: time-frame
value: vector
Methods
set-params!(obj: delayed-rand-vector, min-time: int, max-time: int, xz-range: float, y-range: float) => vectorsource
Set up a delayed-rand-vector. This vector randomly changes at random times.
min-time: minimum time between changes
max-time: maximum time between changes
xz-range: xz results in (-range/2, range/2)
y-range: y results in (-range/2, range/2)
min-time: minimum time between changes
max-time: maximum time between changes
xz-range: xz results in (-range/2, range/2)
y-range: y results in (-range/2, range/2)
update-now!(obj: delayed-rand-vector) => vectorsource
update to a random value now
update-with-delay!(obj: delayed-rand-vector) => vectorsource
Update, if enough time has passed
update-with-delay-or-reset!(obj: delayed-rand-vector) => vectorsource
Update, if enough time has passed. Otherwise reset to zero.
oscillating-float: structuresource
Fields
value: float
target: float
vel: float
max-vel: float
damping: float
accel: float
Methods
set-params!(obj: oscillating-float, init-val: float, accel: float, max-vel: float, damping: float) => floatsource
Setup an oscillating-float. It will head toward the target, but will overshoot and oscillate before
eventually reaching the target.
init-val: the initial value and target
max-vel: velocity limit
damping: this is 1 - damping really. 0 means don't move, 1 means oscillate forever.
accel: gain.
eventually reaching the target.
init-val: the initial value and target
max-vel: velocity limit
damping: this is 1 - damping really. 0 means don't move, 1 means oscillate forever.
accel: gain.
update!(obj: oscillating-float, target-offset: float) => floatsource
oscillating-vector: structuresource
Fields
value: vector
target: vector
vel: vector
max-vel: float
damping: float
accel: float
Methods
set-params!(obj: oscillating-vector, init-val: vector, accel: float, max-vel: float, damping: float) => vectorsource
Works just like oscillating-float, but does a whole vector.
init-val can be #f to reset to 0.
init-val can be #f to reset to 0.
update!(obj: oscillating-vector, target-offset: vector) => vectorsource
target-offset can be #f, acts like 0
sync-info: structuresource
Fields
offset: float
period: uint32
Methods
get-current-value(obj: sync-info, max-val: float) => floatsource
This is just get-current-phase multiplied by max-val
get-current-phase-no-mod(obj: sync-info) => floatsource
Based on the current frame, get the current phase. Does not apply any modifications
like pauses or eases.
like pauses or eases.
get-current-phase(obj: sync-info) => floatsource
Get the current phase.
get-current-value-with-mirror(obj: sync-info, max-out-val: float) => floatsource
Get the phase that goes from 0 to max-out-val to 0 in each period.
get-current-phase-with-mirror(obj: sync-info) => floatsource
Gets the phase that goes from 0 to 1 back to 0 every period.
setup-params!(obj: sync-info, period: uint, phase: float, arg2: float, arg3: float) => nonesource
Setup a sync-info.
period is the duration of the pattern.
phase is the offset relative to the global clock, specified as a fraction of period.
period is the duration of the pattern.
phase is the offset relative to the global clock, specified as a fraction of period.
load-params!(obj: sync-info, proc: process, default-period: uint, default-phase: float, default-out: float, default-in: float) => symbolsource
Load params from the res of a process, and set them up. If the res lookup fails, returns #f and uses
the specified defaults.
the specified defaults.
sync-now!(obj: sync-info, user-phase-offset: float) => floatsource
Adjusts our offset so we are at phase user-phase-offset now
get-phase-offset(obj: sync-info) => floatsource
Get the offset, as a fraction of period