diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:40 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:40 -0800 |
commit | 4684239efa63dc1b2c1cbe37ef7d3062029f5532 (patch) | |
tree | 606a687e9279e9bf6048925878968df9875a4973 /solid.scm | |
parent | 64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (diff) | |
download | slib-4684239efa63dc1b2c1cbe37ef7d3062029f5532.tar.gz slib-4684239efa63dc1b2c1cbe37ef7d3062029f5532.zip |
Import Upstream version 3b1upstream/3b1
Diffstat (limited to 'solid.scm')
-rw-r--r-- | solid.scm | 37 |
1 files changed, 25 insertions, 12 deletions
@@ -487,15 +487,25 @@ (define nargs (length args)) (let ((color (and (>= nargs 1) (color->vrml-field (car args)))) (intensity (and (>= nargs 2) (cadr args))) - (attenuation (and (>= nargs 3) (cadr (caddr args)))) - (radius (and (>= nargs 3) (caddr (caddr args))))) + (beamwidth (and (>= nargs 3) (car (caddr args)))) + (cutoffangle (and (>= nargs 3) (cadr (caddr args)))) + (attenuation (and (>= nargs 3) (caddr (caddr args)))) + (radius (and (>= nargs 3) (cadddr (caddr args))))) (replicate-for-strength (or intensity 1) (lambda (inten) (sprintf #f - "PointLight {location %s color %s intensity %g attenuation %s radius %g}\\n" + "PointLight {location %s color %s intensity %g%s}\\n" (coordinates3string location) - color intensity attenuation radius))))) + color + inten + (if attenuation + (sprintf #f + "\\n + attenuation %s radius %g" + attenuation + radius) + "")))))) ;;@args location direction color intensity beam ;;@args location direction color intensity @@ -535,17 +545,20 @@ (or intensity 1) (lambda (inten) (sprintf #f - "SpotLight {\\n - location %s direction %s beamWidth %g cutOffAngle %g\\n - color %s intensity %s attenuation %s radius %g}\\n" + "SpotLight {location %s direction %s color %s intensity %g%s}\\n" (coordinates3string location) direction color - intensity - (and beamwidth (* pi/180 beamwidth)) - (and cutoffangle (* pi/180 cutoffangle)) - attenuation - radius))))) + inten + (if beamwidth + (sprintf #f + "\\n + beamWidth %g cutOffAngle %g attenuation %s radius %g" + (* pi/180 beamwidth) + (* pi/180 cutoffangle) + attenuation + radius) + "")))))) ;;@subheading Object Primitives |