lego-boost.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. The MIT License (MIT)
  3. Copyright (c) 2014-2020 Nikolai Suslov and the Krestianstvo.org project contributors. (https://github.com/NikolaySuslov/livecodingspace/blob/master/LICENSE.md)
  4. */
  5. import { Fabric } from '/core/vwf/fabric.js';
  6. class LegoBoostModel extends Fabric {
  7. constructor(module) {
  8. console.log("LegoBoostModel constructor");
  9. super(module, "Model");
  10. }
  11. factory() {
  12. let _self_ = this;
  13. return this.load( this.module,
  14. {
  15. // == Module Definition ====================================================================
  16. // -- pipeline -----------------------------------------------------------------------------
  17. // pipeline: [ log ], // vwf <=> log <=> scene
  18. // -- initialize ---------------------------------------------------------------------------
  19. initialize: function() {
  20. this.objects = {}; // maps id => { property: value, ... }
  21. },
  22. // == Model API ============================================================================
  23. // -- creatingNode -------------------------------------------------------------------------
  24. creatingNode: function( nodeID, childID, childExtendsID, childImplementsIDs,
  25. childSource, childType, childURI, childName, callback /* ( ready ) */ ) {
  26. },
  27. // -- deletingNode -------------------------------------------------------------------------
  28. deletingNode: function( nodeID ) {
  29. },
  30. // -- addingChild --------------------------------------------------------------------------
  31. addingChild: function( nodeID, childID, childName ) {
  32. },
  33. // -- removingChild ------------------------------------------------------------------------
  34. removingChild: function( nodeID, childID ) {
  35. },
  36. // -- parenting ----------------------------------------------------------------------------
  37. parenting: function( nodeID ) {
  38. },
  39. // -- childrening --------------------------------------------------------------------------
  40. childrening: function( nodeID ) {
  41. },
  42. // -- naming -------------------------------------------------------------------------------
  43. naming: function( nodeID ) {
  44. },
  45. // -- creatingProperty ---------------------------------------------------------------------
  46. creatingProperty: function( nodeID, propertyName, propertyValue ) {
  47. // var object = this.objects[nodeID] || ( this.objects[nodeID] = {} );
  48. // return object[propertyName] = propertyValue;
  49. },
  50. // -- initializingProperty -----------------------------------------------------------------
  51. initializingProperty: function( nodeID, propertyName, propertyValue ) {
  52. // var object = this.objects[nodeID] || ( this.objects[nodeID] = {} );
  53. // return object[propertyName] = propertyValue;
  54. },
  55. // TODO: deletingProperty
  56. // -- settingProperty ----------------------------------------------------------------------
  57. settingProperty: function( nodeID, propertyName, propertyValue ) {
  58. // var object = this.objects[nodeID] || ( this.objects[nodeID] = {} );
  59. // return object[propertyName] = propertyValue;
  60. },
  61. // -- gettingProperty ----------------------------------------------------------------------
  62. gettingProperty: function( nodeID, propertyName, propertyValue ) {
  63. // var object = this.objects[nodeID];
  64. // return object && object[propertyName];
  65. },
  66. // -- creatingMethod -----------------------------------------------------------------------
  67. creatingMethod: function( nodeID, methodName, methodParameters, methodBody ) {
  68. },
  69. // TODO: deletingMethod
  70. // -- callingMethod ------------------------------------------------------------------------
  71. callingMethod: function( nodeID, methodName, methodParameters ) {
  72. },
  73. // -- creatingEvent ------------------------------------------------------------------------
  74. creatingEvent: function( nodeID, eventName, eventParameters ) {
  75. },
  76. // TODO: deletingEvent
  77. // -- firingEvent --------------------------------------------------------------------------
  78. firingEvent: function( nodeID, eventName, eventParameters ) {
  79. },
  80. // -- executing ----------------------------------------------------------------------------
  81. executing: function( nodeID, scriptText, scriptType ) {
  82. }
  83. } );
  84. }
  85. }
  86. export {
  87. LegoBoostModel as default
  88. }