Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
ed2b14ee
Commit
ed2b14ee
authored
Sep 17, 2013
by
Dave Cooper
Browse files
added bus demo
parent
81d7ffa8
Changes
3
Show whitespace changes
Inline
Side-by-side
demos/4bar/source/bus.gdl
0 → 100644
View file @
ed2b14ee
(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)
demos/bus/source/assembly.lisp
View file @
ed2b14ee
...
...
@@ -21,6 +21,7 @@
(
in-package
:genworks.demos.bus
)
(
define-object
assembly
(
node-mixin
)
:input-slots
...
...
demos/bus/source/chassis.lisp
View file @
ed2b14ee
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment