Skip to content

Commit

Permalink
Add scaled-entity helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Mar 21, 2019
1 parent 0b94f1f commit a37d5a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions helpers.lisp
Expand Up @@ -51,6 +51,14 @@
(translate (pivot obj))
(call-next-method)))

(defclass scaled-entity (entity)
((scaling :initarg :scaling :initform (vec 1 1 1) :accessor scaling)))

(defmethod paint :around ((obj scaled-entity) target)
(with-pushed-matrix ()
(scale (scaling obj))
(call-next-method)))

(define-subject clocked-subject (clock)
())

Expand Down

0 comments on commit a37d5a5

Please sign in to comment.