aboutsummaryrefslogtreecommitdiff
path: root/entity.scm
diff options
context:
space:
mode:
authorGene Pasquet <dev@etenil.net>2026-04-10 17:28:23 +0100
committerGene Pasquet <dev@etenil.net>2026-04-10 17:28:23 +0100
commit9ffd919e293324332acd87cd129c8d73ea27035a (patch)
treebe443b7ac6d4a2c33c823435e3f87d9269ff90b2 /entity.scm
parent6734511622f6cc9c625bec6a2ee55413f0689946 (diff)
Rework animations and entities - somewhat
Diffstat (limited to 'entity.scm')
-rw-r--r--entity.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/entity.scm b/entity.scm
index dab2e83..16d28c4 100644
--- a/entity.scm
+++ b/entity.scm
@@ -27,8 +27,14 @@
(loop (cddr lst) (cons v (cons k acc)))))))))
(cons key (cons val cleaned))))
- (define (entity-update entity key proc #!optional default)
- (entity-set entity key (proc (entity-ref entity key default))))
+(define (entity-set-many entity pairs)
+ (fold (lambda (pair working-ent)
+ (entity-set working-ent (car pair) (cdr pair)))
+ entity
+ pairs))
+
+(define (entity-update entity key proc #!optional default)
+ (entity-set entity key (proc (entity-ref entity key default))))
;; #:skip-pipelines — list of symbols naming frame pipeline steps to skip for this
;; entity. Physics documents the built-in step names (see docs/physics.org). Other