graphlinefunction.vwf.yaml 666 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. extends: http://vwf.example.com/node3.vwf
  3. properties:
  4. lineFunction: undefined
  5. startValue: undefined
  6. endValue: undefined
  7. pointCount: undefined
  8. color: undefined
  9. opacity: undefined
  10. lineThickness: undefined
  11. renderTop: undefined
  12. methods:
  13. evaluateLineAtPoint:
  14. parameters:
  15. - point
  16. body: |
  17. var x = point[0];
  18. var y = point[1];
  19. var z = point[2];
  20. try {
  21. eval( this.lineFunction );
  22. } catch ( error ) {
  23. this.logger.errorx( "evaluateLineAtPoint", error.stack );
  24. return [ 0, 0, 0 ];
  25. }
  26. point[ 0 ] = x || 0;
  27. point[ 1 ] = y || 0;
  28. point[ 2 ] = z || 0;
  29. return point;