Commit ed2b14ee authored by Dave Cooper's avatar Dave Cooper
Browse files

added bus demo

parent 81d7ffa8
(gwl:define-package :4-bar (:export #:assembly #:dd))
(in-package :4-bar)
(define-object bus (base-ajax-sheet base-object)
:computed-slots ((use-raphael? t)
(main-sheet-body (with-cl-who-string ()
(str (the development-links))
(str (the main-area main-div))
(str (the drop-coord-section main-div))))
(dropped-x-y (defaulting (the main-area dropped-x-y))))
:objects ((assembly :type 'bus:assembly
:turn-angle (if (the dropped-x-y)
(angle-between-vectors-d (the (face-normal-vector :right))
(subtract-vectors
(the dropped-x-y)
(the assembly chassis
(knuckles 1) center))
(the (face-normal-vector :top)))
0)))
:hidden-objects ((drop-coord-section :type 'sheet-section
:js-to-eval :parse
:inner-html (with-cl-who-string ()
(str (defaulting (the main-area dropped-x-y)))
(str (the assembly turn-angle))))
(main-area :type 'base-ajax-graphics-sheet
:respondent self
:vector-graphics-onclick? nil
:length 500 :width 500
;;:projection-vector (getf *standard-views* :top)
:display-list-object-roots (list (the assembly chassis)))))
(publish-gwl-app "/bus" '4-bar::bus)
......@@ -21,6 +21,7 @@
(in-package :genworks.demos.bus)
(define-object assembly (node-mixin)
:input-slots
......
......@@ -219,7 +219,9 @@
:length 9
:radius 19
:inner-radius 7
:display-controls (list :color "#333333" :shininess 0.6 :specular-color "#999999")
:display-controls (list :color "#333333" :shininess 0.6 :specular-color "#999999"
:drag-controls :drag-and-drop
)
)
(wheels-rear :type 'wheel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment