@onerjs/smart-filters 8.25.2 → 8.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/IDisposable.d.ts +10 -0
  2. package/dist/IDisposable.d.ts.map +1 -0
  3. package/dist/IDisposable.js +2 -0
  4. package/dist/IDisposable.js.map +1 -0
  5. package/dist/blockFoundation/aggregateBlock.d.ts +56 -0
  6. package/dist/blockFoundation/aggregateBlock.d.ts.map +1 -0
  7. package/dist/blockFoundation/aggregateBlock.js +130 -0
  8. package/dist/blockFoundation/aggregateBlock.js.map +1 -0
  9. package/dist/blockFoundation/baseBlock.d.ts +176 -0
  10. package/dist/blockFoundation/baseBlock.d.ts.map +1 -0
  11. package/dist/blockFoundation/baseBlock.js +276 -0
  12. package/dist/blockFoundation/baseBlock.js.map +1 -0
  13. package/dist/blockFoundation/customAggregateBlock.d.ts +38 -0
  14. package/dist/blockFoundation/customAggregateBlock.d.ts.map +1 -0
  15. package/dist/blockFoundation/customAggregateBlock.js +63 -0
  16. package/dist/blockFoundation/customAggregateBlock.js.map +1 -0
  17. package/dist/blockFoundation/customShaderBlock.d.ts +73 -0
  18. package/dist/blockFoundation/customShaderBlock.d.ts.map +1 -0
  19. package/dist/blockFoundation/customShaderBlock.js +232 -0
  20. package/dist/blockFoundation/customShaderBlock.js.map +1 -0
  21. package/dist/blockFoundation/disableableShaderBlock.d.ts +56 -0
  22. package/dist/blockFoundation/disableableShaderBlock.d.ts.map +1 -0
  23. package/dist/blockFoundation/disableableShaderBlock.js +68 -0
  24. package/dist/blockFoundation/disableableShaderBlock.js.map +1 -0
  25. package/dist/blockFoundation/index.d.ts +10 -0
  26. package/dist/blockFoundation/index.d.ts.map +1 -0
  27. package/dist/blockFoundation/index.js +8 -0
  28. package/dist/blockFoundation/index.js.map +1 -0
  29. package/dist/blockFoundation/inputBlock.d.ts +127 -0
  30. package/dist/blockFoundation/inputBlock.d.ts.map +1 -0
  31. package/dist/blockFoundation/inputBlock.deserializer.d.ts +12 -0
  32. package/dist/blockFoundation/inputBlock.deserializer.d.ts.map +1 -0
  33. package/dist/blockFoundation/inputBlock.deserializer.js +65 -0
  34. package/dist/blockFoundation/inputBlock.deserializer.js.map +1 -0
  35. package/dist/blockFoundation/inputBlock.js +89 -0
  36. package/dist/blockFoundation/inputBlock.js.map +1 -0
  37. package/dist/blockFoundation/inputBlock.serialization.types.d.ts +105 -0
  38. package/dist/blockFoundation/inputBlock.serialization.types.d.ts.map +1 -0
  39. package/dist/blockFoundation/inputBlock.serialization.types.js +2 -0
  40. package/dist/blockFoundation/inputBlock.serialization.types.js.map +1 -0
  41. package/dist/blockFoundation/inputBlock.serializer.d.ts +6 -0
  42. package/dist/blockFoundation/inputBlock.serializer.d.ts.map +1 -0
  43. package/dist/blockFoundation/inputBlock.serializer.js +130 -0
  44. package/dist/blockFoundation/inputBlock.serializer.js.map +1 -0
  45. package/dist/blockFoundation/outputBlock.d.ts +47 -0
  46. package/dist/blockFoundation/outputBlock.d.ts.map +1 -0
  47. package/dist/blockFoundation/outputBlock.js +123 -0
  48. package/dist/blockFoundation/outputBlock.js.map +1 -0
  49. package/dist/blockFoundation/shaderBlock.d.ts +64 -0
  50. package/dist/blockFoundation/shaderBlock.d.ts.map +1 -0
  51. package/dist/blockFoundation/shaderBlock.js +125 -0
  52. package/dist/blockFoundation/shaderBlock.js.map +1 -0
  53. package/dist/blockFoundation/textureOptions.d.ts +47 -0
  54. package/dist/blockFoundation/textureOptions.d.ts.map +1 -0
  55. package/dist/blockFoundation/textureOptions.js +37 -0
  56. package/dist/blockFoundation/textureOptions.js.map +1 -0
  57. package/dist/command/command.d.ts +48 -0
  58. package/dist/command/command.d.ts.map +1 -0
  59. package/dist/command/command.js +15 -0
  60. package/dist/command/command.js.map +1 -0
  61. package/dist/command/commandBuffer.d.ts +40 -0
  62. package/dist/command/commandBuffer.d.ts.map +1 -0
  63. package/dist/command/commandBuffer.js +58 -0
  64. package/dist/command/commandBuffer.js.map +1 -0
  65. package/dist/command/commandBufferDebugger.d.ts +7 -0
  66. package/dist/command/commandBufferDebugger.d.ts.map +1 -0
  67. package/dist/command/commandBufferDebugger.js +13 -0
  68. package/dist/command/commandBufferDebugger.js.map +1 -0
  69. package/dist/command/index.d.ts +6 -0
  70. package/dist/command/index.d.ts.map +1 -0
  71. package/dist/command/index.js +8 -0
  72. package/dist/command/index.js.map +1 -0
  73. package/dist/connection/connectionPoint.d.ts +110 -0
  74. package/dist/connection/connectionPoint.d.ts.map +1 -0
  75. package/dist/connection/connectionPoint.js +154 -0
  76. package/dist/connection/connectionPoint.js.map +1 -0
  77. package/dist/connection/connectionPointCompatibilityState.d.ts +20 -0
  78. package/dist/connection/connectionPointCompatibilityState.d.ts.map +1 -0
  79. package/dist/connection/connectionPointCompatibilityState.js +32 -0
  80. package/dist/connection/connectionPointCompatibilityState.js.map +1 -0
  81. package/dist/connection/connectionPointDirection.d.ts +10 -0
  82. package/dist/connection/connectionPointDirection.d.ts.map +1 -0
  83. package/dist/connection/connectionPointDirection.js +11 -0
  84. package/dist/connection/connectionPointDirection.js.map +1 -0
  85. package/dist/connection/connectionPointType.d.ts +29 -0
  86. package/dist/connection/connectionPointType.d.ts.map +1 -0
  87. package/dist/connection/connectionPointType.js +19 -0
  88. package/dist/connection/connectionPointType.js.map +1 -0
  89. package/dist/connection/connectionPointWithDefault.d.ts +23 -0
  90. package/dist/connection/connectionPointWithDefault.d.ts.map +1 -0
  91. package/dist/connection/connectionPointWithDefault.js +19 -0
  92. package/dist/connection/connectionPointWithDefault.js.map +1 -0
  93. package/dist/connection/index.d.ts +8 -0
  94. package/dist/connection/index.d.ts.map +1 -0
  95. package/dist/connection/index.js +7 -0
  96. package/dist/connection/index.js.map +1 -0
  97. package/dist/editorUtils/editableInPropertyPage.d.ts +80 -0
  98. package/dist/editorUtils/editableInPropertyPage.d.ts.map +1 -0
  99. package/dist/editorUtils/editableInPropertyPage.js +42 -0
  100. package/dist/editorUtils/editableInPropertyPage.js.map +1 -0
  101. package/dist/editorUtils/index.d.ts +3 -0
  102. package/dist/editorUtils/index.d.ts.map +1 -0
  103. package/dist/editorUtils/index.js +4 -0
  104. package/dist/editorUtils/index.js.map +1 -0
  105. package/dist/index.d.ts +13 -0
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.js +14 -0
  108. package/dist/index.js.map +1 -0
  109. package/dist/optimization/dependencyGraph.d.ts +31 -0
  110. package/dist/optimization/dependencyGraph.d.ts.map +1 -0
  111. package/dist/optimization/dependencyGraph.js +78 -0
  112. package/dist/optimization/dependencyGraph.js.map +1 -0
  113. package/dist/optimization/index.d.ts +2 -0
  114. package/dist/optimization/index.d.ts.map +1 -0
  115. package/dist/optimization/index.js +2 -0
  116. package/dist/optimization/index.js.map +1 -0
  117. package/dist/optimization/optimizedShaderBlock.d.ts +75 -0
  118. package/dist/optimization/optimizedShaderBlock.d.ts.map +1 -0
  119. package/dist/optimization/optimizedShaderBlock.js +105 -0
  120. package/dist/optimization/optimizedShaderBlock.js.map +1 -0
  121. package/dist/optimization/smartFilterOptimizer.d.ts +126 -0
  122. package/dist/optimization/smartFilterOptimizer.d.ts.map +1 -0
  123. package/dist/optimization/smartFilterOptimizer.js +666 -0
  124. package/dist/optimization/smartFilterOptimizer.js.map +1 -0
  125. package/dist/runtime/index.d.ts +8 -0
  126. package/dist/runtime/index.d.ts.map +1 -0
  127. package/dist/runtime/index.js +7 -0
  128. package/dist/runtime/index.js.map +1 -0
  129. package/dist/runtime/renderTargetGenerator.d.ts +43 -0
  130. package/dist/runtime/renderTargetGenerator.d.ts.map +1 -0
  131. package/dist/runtime/renderTargetGenerator.js +169 -0
  132. package/dist/runtime/renderTargetGenerator.js.map +1 -0
  133. package/dist/runtime/shaderRuntime.d.ts +103 -0
  134. package/dist/runtime/shaderRuntime.d.ts.map +1 -0
  135. package/dist/runtime/shaderRuntime.js +132 -0
  136. package/dist/runtime/shaderRuntime.js.map +1 -0
  137. package/dist/runtime/smartFilterRuntime.d.ts +69 -0
  138. package/dist/runtime/smartFilterRuntime.d.ts.map +1 -0
  139. package/dist/runtime/smartFilterRuntime.js +63 -0
  140. package/dist/runtime/smartFilterRuntime.js.map +1 -0
  141. package/dist/runtime/strongRef.d.ts +16 -0
  142. package/dist/runtime/strongRef.d.ts.map +1 -0
  143. package/dist/runtime/strongRef.js +9 -0
  144. package/dist/runtime/strongRef.js.map +1 -0
  145. package/dist/serialization/importCustomBlockDefinition.d.ts +15 -0
  146. package/dist/serialization/importCustomBlockDefinition.d.ts.map +1 -0
  147. package/dist/serialization/importCustomBlockDefinition.js +76 -0
  148. package/dist/serialization/importCustomBlockDefinition.js.map +1 -0
  149. package/dist/serialization/index.d.ts +9 -0
  150. package/dist/serialization/index.d.ts.map +1 -0
  151. package/dist/serialization/index.js +11 -0
  152. package/dist/serialization/index.js.map +1 -0
  153. package/dist/serialization/serializedBlockDefinition.d.ts +12 -0
  154. package/dist/serialization/serializedBlockDefinition.d.ts.map +1 -0
  155. package/dist/serialization/serializedBlockDefinition.js +2 -0
  156. package/dist/serialization/serializedBlockDefinition.js.map +1 -0
  157. package/dist/serialization/serializedShaderBlockDefinition.d.ts +7 -0
  158. package/dist/serialization/serializedShaderBlockDefinition.d.ts.map +1 -0
  159. package/dist/serialization/serializedShaderBlockDefinition.js +2 -0
  160. package/dist/serialization/serializedShaderBlockDefinition.js.map +1 -0
  161. package/dist/serialization/serializedSmartFilter.d.ts +6 -0
  162. package/dist/serialization/serializedSmartFilter.d.ts.map +1 -0
  163. package/dist/serialization/serializedSmartFilter.js +2 -0
  164. package/dist/serialization/serializedSmartFilter.js.map +1 -0
  165. package/dist/serialization/smartFilterDeserializer.d.ts +34 -0
  166. package/dist/serialization/smartFilterDeserializer.d.ts.map +1 -0
  167. package/dist/serialization/smartFilterDeserializer.js +141 -0
  168. package/dist/serialization/smartFilterDeserializer.js.map +1 -0
  169. package/dist/serialization/smartFilterSerializer.d.ts +23 -0
  170. package/dist/serialization/smartFilterSerializer.d.ts.map +1 -0
  171. package/dist/serialization/smartFilterSerializer.js +95 -0
  172. package/dist/serialization/smartFilterSerializer.js.map +1 -0
  173. package/dist/serialization/v1/defaultBlockSerializer.d.ts +9 -0
  174. package/dist/serialization/v1/defaultBlockSerializer.d.ts.map +1 -0
  175. package/dist/serialization/v1/defaultBlockSerializer.js +19 -0
  176. package/dist/serialization/v1/defaultBlockSerializer.js.map +1 -0
  177. package/dist/serialization/v1/index.d.ts +4 -0
  178. package/dist/serialization/v1/index.d.ts.map +1 -0
  179. package/dist/serialization/v1/index.js +5 -0
  180. package/dist/serialization/v1/index.js.map +1 -0
  181. package/dist/serialization/v1/shaderBlockSerialization.types.d.ts +73 -0
  182. package/dist/serialization/v1/shaderBlockSerialization.types.d.ts.map +1 -0
  183. package/dist/serialization/v1/shaderBlockSerialization.types.js +7 -0
  184. package/dist/serialization/v1/shaderBlockSerialization.types.js.map +1 -0
  185. package/dist/serialization/v1/smartFilterSerialization.types.d.ts +98 -0
  186. package/dist/serialization/v1/smartFilterSerialization.types.d.ts.map +1 -0
  187. package/dist/serialization/v1/smartFilterSerialization.types.js +2 -0
  188. package/dist/serialization/v1/smartFilterSerialization.types.js.map +1 -0
  189. package/dist/smartFilter.d.ts +118 -0
  190. package/dist/smartFilter.d.ts.map +1 -0
  191. package/dist/smartFilter.js +169 -0
  192. package/dist/smartFilter.js.map +1 -0
  193. package/dist/utils/buildTools/buildShaders.d.ts +9 -0
  194. package/dist/utils/buildTools/buildShaders.d.ts.map +1 -0
  195. package/dist/utils/buildTools/buildShaders.js +13 -0
  196. package/dist/utils/buildTools/buildShaders.js.map +1 -0
  197. package/dist/utils/buildTools/convertGlslIntoBlock.d.ts +9 -0
  198. package/dist/utils/buildTools/convertGlslIntoBlock.d.ts.map +1 -0
  199. package/dist/utils/buildTools/convertGlslIntoBlock.js +346 -0
  200. package/dist/utils/buildTools/convertGlslIntoBlock.js.map +1 -0
  201. package/dist/utils/buildTools/convertGlslIntoShaderProgram.d.ts +26 -0
  202. package/dist/utils/buildTools/convertGlslIntoShaderProgram.d.ts.map +1 -0
  203. package/dist/utils/buildTools/convertGlslIntoShaderProgram.js +141 -0
  204. package/dist/utils/buildTools/convertGlslIntoShaderProgram.js.map +1 -0
  205. package/dist/utils/buildTools/convertShaders.d.ts +16 -0
  206. package/dist/utils/buildTools/convertShaders.d.ts.map +1 -0
  207. package/dist/utils/buildTools/convertShaders.js +62 -0
  208. package/dist/utils/buildTools/convertShaders.js.map +1 -0
  209. package/dist/utils/buildTools/shaderCode.types.d.ts +51 -0
  210. package/dist/utils/buildTools/shaderCode.types.d.ts.map +1 -0
  211. package/dist/utils/buildTools/shaderCode.types.js +2 -0
  212. package/dist/utils/buildTools/shaderCode.types.js.map +1 -0
  213. package/dist/utils/buildTools/shaderConverter.d.ts +77 -0
  214. package/dist/utils/buildTools/shaderConverter.d.ts.map +1 -0
  215. package/dist/utils/buildTools/shaderConverter.js +297 -0
  216. package/dist/utils/buildTools/shaderConverter.js.map +1 -0
  217. package/dist/utils/buildTools/watchShaders.d.ts +9 -0
  218. package/dist/utils/buildTools/watchShaders.d.ts.map +1 -0
  219. package/dist/utils/buildTools/watchShaders.js +39 -0
  220. package/dist/utils/buildTools/watchShaders.js.map +1 -0
  221. package/dist/utils/index.d.ts +4 -0
  222. package/dist/utils/index.d.ts.map +1 -0
  223. package/dist/utils/index.js +4 -0
  224. package/dist/utils/index.js.map +1 -0
  225. package/dist/utils/renderTargetUtils.d.ts +14 -0
  226. package/dist/utils/renderTargetUtils.d.ts.map +1 -0
  227. package/dist/utils/renderTargetUtils.js +23 -0
  228. package/dist/utils/renderTargetUtils.js.map +1 -0
  229. package/dist/utils/shaderCodeUtils.d.ts +91 -0
  230. package/dist/utils/shaderCodeUtils.d.ts.map +1 -0
  231. package/dist/utils/shaderCodeUtils.js +111 -0
  232. package/dist/utils/shaderCodeUtils.js.map +1 -0
  233. package/dist/utils/textureLoaders.d.ts +16 -0
  234. package/dist/utils/textureLoaders.d.ts.map +1 -0
  235. package/dist/utils/textureLoaders.js +22 -0
  236. package/dist/utils/textureLoaders.js.map +1 -0
  237. package/dist/utils/textureUtils.d.ts +13 -0
  238. package/dist/utils/textureUtils.d.ts.map +1 -0
  239. package/dist/utils/textureUtils.js +25 -0
  240. package/dist/utils/textureUtils.js.map +1 -0
  241. package/dist/utils/uniqueIdGenerator.d.ts +19 -0
  242. package/dist/utils/uniqueIdGenerator.d.ts.map +1 -0
  243. package/dist/utils/uniqueIdGenerator.js +27 -0
  244. package/dist/utils/uniqueIdGenerator.js.map +1 -0
  245. package/dist/version.d.ts +5 -0
  246. package/dist/version.d.ts.map +1 -0
  247. package/dist/version.js +5 -0
  248. package/dist/version.js.map +1 -0
  249. package/package.json +1 -1
  250. package/src/optimization/smartFilterOptimizer.ts +305 -158
  251. package/src/version.ts +1 -1
@@ -0,0 +1,154 @@
1
+ import { ConnectionPointCompatibilityState, GetCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
2
+ import { ConnectionPointDirection } from "./connectionPointDirection.js";
3
+ /**
4
+ * This defines a connection point.
5
+ *
6
+ * A connection point is any input/output of a block.
7
+ * It can be linked to another connection point following some rules:
8
+ * - The type of the connection point must be compatible with the other one.
9
+ * - The direction of the connection point must be different from the other one.
10
+ * - The connection cannot create a cycle in the list of blocks.
11
+ * The relationship is always 1:N for input:output
12
+ */
13
+ export class ConnectionPoint {
14
+ /**
15
+ * Create a new connection point.
16
+ * @param name - The name the connection point has in the block
17
+ * @param ownerBlock - The block the connection point belongs to
18
+ * @param type - The type of the connection point
19
+ * @param direction - The direction of the connection point
20
+ * @param defaultRuntimeData - The default runtime data to use when no connection is made to the connection point
21
+ */
22
+ constructor(name, ownerBlock, type, direction, defaultRuntimeData = null) {
23
+ /**
24
+ * User provided name for the connection point.
25
+ */
26
+ this.displayName = null;
27
+ /**
28
+ * The @see RunTimeData used during the init phase to reference the result of the previous block.
29
+ * Those are only used for input connection points.
30
+ * The previous block are "pushing" this in during the init stage.
31
+ */
32
+ this.runtimeData = null;
33
+ /**
34
+ * The default runtimeData used when no connection is made to the connection point.
35
+ */
36
+ this.defaultRuntimeData = null;
37
+ this._connectedTo = null;
38
+ this._endpoints = [];
39
+ this.name = name;
40
+ this.ownerBlock = ownerBlock;
41
+ this.type = type;
42
+ this.direction = direction;
43
+ this.defaultRuntimeData = defaultRuntimeData;
44
+ this.runtimeData = defaultRuntimeData;
45
+ }
46
+ /**
47
+ * @returns The connection point this connection point is connected to.
48
+ * (the one on the other side of the connection)
49
+ * Only input connection points have a connected point which they received their value from.
50
+ * (Relation is always 1:N for input:output)
51
+ */
52
+ get connectedTo() {
53
+ return this._connectedTo;
54
+ }
55
+ /**
56
+ * @returns The connection points this output connection point is connected to.
57
+ * (the ones on the other side of the connection)
58
+ * Only output connection points have a list of endpoints which they provide their value to.
59
+ * (Relation is always 1:N for input:output)
60
+ */
61
+ get endpoints() {
62
+ return this._endpoints;
63
+ }
64
+ /**
65
+ * Gets a state indicating if the current point can be connected to another point
66
+ * @param other - defines the other connection point
67
+ * @returns the compatibility state
68
+ */
69
+ checkCompatibilityState(other) {
70
+ // Only connects output to input
71
+ if (this.direction === ConnectionPointDirection.Input) {
72
+ return other.checkCompatibilityState(this);
73
+ }
74
+ // Check types
75
+ if (this.type !== other.type) {
76
+ return ConnectionPointCompatibilityState.TypeIncompatible;
77
+ }
78
+ // Check directions
79
+ if (this.direction === other.direction) {
80
+ return ConnectionPointCompatibilityState.DirectionIncompatible;
81
+ }
82
+ // Check hierarchy
83
+ if (other.ownerBlock.isAnAncestorOf(this.ownerBlock)) {
84
+ return ConnectionPointCompatibilityState.HierarchyIssue;
85
+ }
86
+ return ConnectionPointCompatibilityState.Compatible;
87
+ }
88
+ /**
89
+ * Checks if the connection point can be connected to another one.
90
+ * @param connectionPoint - The other connection point to check compatibility with
91
+ * @returns true if the connection point can be connected to the other one
92
+ */
93
+ canConnectTo(connectionPoint) {
94
+ return this.checkCompatibilityState(connectionPoint) === ConnectionPointCompatibilityState.Compatible;
95
+ }
96
+ /**
97
+ * Connect this connection point to another one.
98
+ * @param other - The other connection point to connect to
99
+ * @throws if the connection point cannot be connected to the other one
100
+ */
101
+ connectTo(other) {
102
+ // Only connects output to input
103
+ if (this.direction === ConnectionPointDirection.Input) {
104
+ other.connectTo(this);
105
+ return;
106
+ }
107
+ // Check compatibility
108
+ const compatibility = this.checkCompatibilityState(other);
109
+ if (compatibility !== ConnectionPointCompatibilityState.Compatible) {
110
+ throw GetCompatibilityIssueMessage(compatibility);
111
+ }
112
+ // Adds the connection point to the list of endpoints
113
+ this._endpoints.push(other);
114
+ // Fill at the same time the connectedTo property of the other connection point
115
+ other._connectedTo = this;
116
+ }
117
+ /**
118
+ * Disconnects this point from one of his endpoint
119
+ * @param endpoint - defines the other connection point
120
+ */
121
+ disconnectFrom(endpoint) {
122
+ const index = this._endpoints.indexOf(endpoint);
123
+ if (index === -1) {
124
+ return;
125
+ }
126
+ // Remove the connection point from the list of endpoints
127
+ this._endpoints.splice(index, 1);
128
+ // Connections are double-linked - remove the reference back to this connection point from the one we just disconnected from
129
+ endpoint._connectedTo = null;
130
+ endpoint.runtimeData = endpoint.defaultRuntimeData;
131
+ }
132
+ /**
133
+ * Disconnects this point from all its endpoints.
134
+ */
135
+ disconnectAllEndpoints() {
136
+ // Detach outputs
137
+ let endpoint;
138
+ while ((endpoint = this._endpoints[0])) {
139
+ this.disconnectFrom(endpoint);
140
+ }
141
+ }
142
+ /**
143
+ * Propagates the current runtime data to all endpoints.
144
+ */
145
+ propagateRuntimeData() {
146
+ if (!this.runtimeData) {
147
+ this.runtimeData = {};
148
+ }
149
+ for (const endpoint of this.endpoints) {
150
+ endpoint.runtimeData = this.runtimeData;
151
+ }
152
+ }
153
+ }
154
+ //# sourceMappingURL=connectionPoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPoint.js","sourceRoot":"","sources":["../../src/connection/connectionPoint.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Defines how compatible connection points are.
3
+ */
4
+ export declare enum ConnectionPointCompatibilityState {
5
+ /** Points are compatibles */
6
+ Compatible = 0,
7
+ /** Points are incompatible because of their types */
8
+ TypeIncompatible = 1,
9
+ /** Points are incompatible because of their directions */
10
+ DirectionIncompatible = 2,
11
+ /** Points are incompatible because they are in the same hierarchy **/
12
+ HierarchyIssue = 3
13
+ }
14
+ /**
15
+ * Gets a user friendly message for the given compatibility state.
16
+ * @param state - Defines the compatibility state
17
+ * @returns the message associated with a compatibility state.
18
+ */
19
+ export declare function GetCompatibilityIssueMessage(state: ConnectionPointCompatibilityState): string;
20
+ //# sourceMappingURL=connectionPointCompatibilityState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointCompatibilityState.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointCompatibilityState.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,iCAAiC;IACzC,6BAA6B;IAC7B,UAAU,IAAA;IACV,qDAAqD;IACrD,gBAAgB,IAAA;IAChB,0DAA0D;IAC1D,qBAAqB,IAAA;IACrB,sEAAsE;IACtE,cAAc,IAAA;CACjB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,iCAAiC,GAAG,MAAM,CAW7F"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Defines how compatible connection points are.
3
+ */
4
+ export var ConnectionPointCompatibilityState;
5
+ (function (ConnectionPointCompatibilityState) {
6
+ /** Points are compatibles */
7
+ ConnectionPointCompatibilityState[ConnectionPointCompatibilityState["Compatible"] = 0] = "Compatible";
8
+ /** Points are incompatible because of their types */
9
+ ConnectionPointCompatibilityState[ConnectionPointCompatibilityState["TypeIncompatible"] = 1] = "TypeIncompatible";
10
+ /** Points are incompatible because of their directions */
11
+ ConnectionPointCompatibilityState[ConnectionPointCompatibilityState["DirectionIncompatible"] = 2] = "DirectionIncompatible";
12
+ /** Points are incompatible because they are in the same hierarchy **/
13
+ ConnectionPointCompatibilityState[ConnectionPointCompatibilityState["HierarchyIssue"] = 3] = "HierarchyIssue";
14
+ })(ConnectionPointCompatibilityState || (ConnectionPointCompatibilityState = {}));
15
+ /**
16
+ * Gets a user friendly message for the given compatibility state.
17
+ * @param state - Defines the compatibility state
18
+ * @returns the message associated with a compatibility state.
19
+ */
20
+ export function GetCompatibilityIssueMessage(state) {
21
+ switch (state) {
22
+ case ConnectionPointCompatibilityState.TypeIncompatible:
23
+ return "Cannot connect two different connection types";
24
+ case ConnectionPointCompatibilityState.DirectionIncompatible:
25
+ return "Cannot connect with the same direction";
26
+ case ConnectionPointCompatibilityState.HierarchyIssue:
27
+ return "Source block cannot be connected with one of its ancestors";
28
+ default:
29
+ return "";
30
+ }
31
+ }
32
+ //# sourceMappingURL=connectionPointCompatibilityState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointCompatibilityState.js","sourceRoot":"","sources":["../../src/connection/connectionPointCompatibilityState.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,iCASX;AATD,WAAY,iCAAiC;IACzC,6BAA6B;IAC7B,qGAAU,CAAA;IACV,qDAAqD;IACrD,iHAAgB,CAAA;IAChB,0DAA0D;IAC1D,2HAAqB,CAAA;IACrB,sEAAsE;IACtE,6GAAc,CAAA;AAClB,CAAC,EATW,iCAAiC,KAAjC,iCAAiC,QAS5C;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,KAAwC;IACjF,QAAQ,KAAK,EAAE,CAAC;QACZ,KAAK,iCAAiC,CAAC,gBAAgB;YACnD,OAAO,+CAA+C,CAAC;QAC3D,KAAK,iCAAiC,CAAC,qBAAqB;YACxD,OAAO,wCAAwC,CAAC;QACpD,KAAK,iCAAiC,CAAC,cAAc;YACjD,OAAO,4DAA4D,CAAC;QACxE;YACI,OAAO,EAAE,CAAC;IAClB,CAAC;AACL,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Defines the direction of a connection point.
3
+ */
4
+ export declare enum ConnectionPointDirection {
5
+ /** Input */
6
+ Input = 0,
7
+ /** Output */
8
+ Output = 1
9
+ }
10
+ //# sourceMappingURL=connectionPointDirection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointDirection.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointDirection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,wBAAwB;IAChC,YAAY;IACZ,KAAK,IAAI;IACT,aAAa;IACb,MAAM,IAAI;CACb"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Defines the direction of a connection point.
3
+ */
4
+ export var ConnectionPointDirection;
5
+ (function (ConnectionPointDirection) {
6
+ /** Input */
7
+ ConnectionPointDirection[ConnectionPointDirection["Input"] = 0] = "Input";
8
+ /** Output */
9
+ ConnectionPointDirection[ConnectionPointDirection["Output"] = 1] = "Output";
10
+ })(ConnectionPointDirection || (ConnectionPointDirection = {}));
11
+ //# sourceMappingURL=connectionPointDirection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointDirection.js","sourceRoot":"","sources":["../../src/connection/connectionPointDirection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAChC,YAAY;IACZ,yEAAS,CAAA;IACT,aAAa;IACb,2EAAU,CAAA;AACd,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC"}
@@ -0,0 +1,29 @@
1
+ import type { ThinTexture } from "@onerjs/core/Materials/Textures/thinTexture.js";
2
+ import type { IColor3Like, IColor4Like, IVector2Like } from "@onerjs/core/Maths/math.like.js";
3
+ import type { Nullable } from "@onerjs/core/types.js";
4
+ /**
5
+ * Defines the type of a connection point.
6
+ */
7
+ export declare enum ConnectionPointType {
8
+ /** Float */
9
+ Float = 1,
10
+ /** Texture */
11
+ Texture = 2,
12
+ /** Color3 */
13
+ Color3 = 3,
14
+ /** Color4 */
15
+ Color4 = 4,
16
+ /** Boolean */
17
+ Boolean = 5,
18
+ /** Vector2 */
19
+ Vector2 = 6
20
+ }
21
+ /**
22
+ * A union of all supported connection point types
23
+ */
24
+ export type AllConnectionPointTypes = ConnectionPointType.Float | ConnectionPointType.Texture | ConnectionPointType.Color3 | ConnectionPointType.Color4 | ConnectionPointType.Boolean | ConnectionPointType.Vector2;
25
+ /**
26
+ * Retrieves the type of the value from the Connection point type.
27
+ */
28
+ export type ConnectionPointValue<T extends ConnectionPointType = ConnectionPointType> = T extends ConnectionPointType.Float ? number : T extends ConnectionPointType.Texture ? Nullable<ThinTexture> : T extends ConnectionPointType.Color3 ? IColor3Like : T extends ConnectionPointType.Color4 ? IColor4Like : T extends ConnectionPointType.Boolean ? boolean : T extends ConnectionPointType.Vector2 ? IVector2Like : never;
29
+ //# sourceMappingURL=connectionPointType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointType.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,uDAA+C;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,wCAAgC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,8BAAsB;AAE9C;;GAEG;AACH,oBAAY,mBAAmB;IAC3B,YAAY;IACZ,KAAK,IAAI;IACT,cAAc;IACd,OAAO,IAAI;IACX,aAAa;IACb,MAAM,IAAI;IACV,aAAa;IACb,MAAM,IAAI;IACV,cAAc;IACd,OAAO,IAAI;IACX,cAAc;IACd,OAAO,IAAI;CACd;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC7B,mBAAmB,CAAC,KAAK,GACzB,mBAAmB,CAAC,OAAO,GAC3B,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,OAAO,GAC3B,mBAAmB,CAAC,OAAO,CAAC;AAElC;;GAEG;AAEH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAChF,CAAC,SAAS,mBAAmB,CAAC,KAAK,GAAG,MAAM,GAC5C,CAAC,SAAS,mBAAmB,CAAC,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC,GAC7D,CAAC,SAAS,mBAAmB,CAAC,MAAM,GAAG,WAAW,GAClD,CAAC,SAAS,mBAAmB,CAAC,MAAM,GAAG,WAAW,GAClD,CAAC,SAAS,mBAAmB,CAAC,OAAO,GAAG,OAAO,GAC/C,CAAC,SAAS,mBAAmB,CAAC,OAAO,GAAG,YAAY,GACpD,KAAK,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Defines the type of a connection point.
3
+ */
4
+ export var ConnectionPointType;
5
+ (function (ConnectionPointType) {
6
+ /** Float */
7
+ ConnectionPointType[ConnectionPointType["Float"] = 1] = "Float";
8
+ /** Texture */
9
+ ConnectionPointType[ConnectionPointType["Texture"] = 2] = "Texture";
10
+ /** Color3 */
11
+ ConnectionPointType[ConnectionPointType["Color3"] = 3] = "Color3";
12
+ /** Color4 */
13
+ ConnectionPointType[ConnectionPointType["Color4"] = 4] = "Color4";
14
+ /** Boolean */
15
+ ConnectionPointType[ConnectionPointType["Boolean"] = 5] = "Boolean";
16
+ /** Vector2 */
17
+ ConnectionPointType[ConnectionPointType["Vector2"] = 6] = "Vector2";
18
+ })(ConnectionPointType || (ConnectionPointType = {}));
19
+ //# sourceMappingURL=connectionPointType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointType.js","sourceRoot":"","sources":["../../src/connection/connectionPointType.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC3B,YAAY;IACZ,+DAAS,CAAA;IACT,cAAc;IACd,mEAAW,CAAA;IACX,aAAa;IACb,iEAAU,CAAA;IACV,aAAa;IACb,iEAAU,CAAA;IACV,cAAc;IACd,mEAAW,CAAA;IACX,cAAc;IACd,mEAAW,CAAA;AACf,CAAC,EAbW,mBAAmB,KAAnB,mBAAmB,QAa9B"}
@@ -0,0 +1,23 @@
1
+ import type { BaseBlock } from "../blockFoundation/baseBlock.js";
2
+ import { ConnectionPoint, type RuntimeData } from "./connectionPoint.js";
3
+ import type { ConnectionPointDirection } from "./connectionPointDirection.js";
4
+ import type { ConnectionPointType } from "./connectionPointType.js";
5
+ /**
6
+ * A ConnectionPoint whose runtimeData is never null - if not hooked up to a connection, it will use a default value.
7
+ */
8
+ export declare class ConnectionPointWithDefault<U extends ConnectionPointType = ConnectionPointType> extends ConnectionPoint<U> {
9
+ /**
10
+ * The runtime data for this ConnectionPoint - it will never be null - if not hooked up to a connection, it will use the default value.
11
+ */
12
+ runtimeData: RuntimeData<U>;
13
+ /**
14
+ * Create a new ConnectionPointWithDefault
15
+ * @param name - The name the connection point has in the block
16
+ * @param ownerBlock - The block the connection point belongs to
17
+ * @param type - The type of the connection point
18
+ * @param direction - The direction of the connection point
19
+ * @param runtimeData - The runtimeData to use for this connection point if no connection is made
20
+ */
21
+ constructor(name: string, ownerBlock: BaseBlock, type: U, direction: ConnectionPointDirection, runtimeData: RuntimeData<U>);
22
+ }
23
+ //# sourceMappingURL=connectionPointWithDefault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointWithDefault.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointWithDefault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;GAEG;AACH,qBAAa,0BAA0B,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACnH;;OAEG;IACa,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAE5C;;;;;;;OAOG;gBACS,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,wBAAwB,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;CAI7H"}
@@ -0,0 +1,19 @@
1
+ import { ConnectionPoint } from "./connectionPoint.js";
2
+ /**
3
+ * A ConnectionPoint whose runtimeData is never null - if not hooked up to a connection, it will use a default value.
4
+ */
5
+ export class ConnectionPointWithDefault extends ConnectionPoint {
6
+ /**
7
+ * Create a new ConnectionPointWithDefault
8
+ * @param name - The name the connection point has in the block
9
+ * @param ownerBlock - The block the connection point belongs to
10
+ * @param type - The type of the connection point
11
+ * @param direction - The direction of the connection point
12
+ * @param runtimeData - The runtimeData to use for this connection point if no connection is made
13
+ */
14
+ constructor(name, ownerBlock, type, direction, runtimeData) {
15
+ super(name, ownerBlock, type, direction, runtimeData);
16
+ this.runtimeData = runtimeData;
17
+ }
18
+ }
19
+ //# sourceMappingURL=connectionPointWithDefault.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionPointWithDefault.js","sourceRoot":"","sources":["../../src/connection/connectionPointWithDefault.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAoB,MAAM,sBAAsB,CAAC;AAIzE;;GAEG;AACH,MAAM,OAAO,0BAAgF,SAAQ,eAAkB;IAMnH;;;;;;;OAOG;IACH,YAAY,IAAY,EAAE,UAAqB,EAAE,IAAO,EAAE,SAAmC,EAAE,WAA2B;QACtH,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;QACtD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CACJ"}
@@ -0,0 +1,8 @@
1
+ export { ConnectionPointDirection } from "./connectionPointDirection.js";
2
+ export { ConnectionPointType } from "./connectionPointType.js";
3
+ export { type ConnectionPointValue } from "./connectionPointType.js";
4
+ export { ConnectionPointCompatibilityState, GetCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
5
+ export { GetCompatibilityIssueMessage as getCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
6
+ export { ConnectionPoint } from "./connectionPoint.js";
7
+ export { type RuntimeData } from "./connectionPoint.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEzH,OAAO,EAAE,4BAA4B,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { ConnectionPointDirection } from "./connectionPointDirection.js";
2
+ export { ConnectionPointType } from "./connectionPointType.js";
3
+ export { ConnectionPointCompatibilityState, GetCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
4
+ // Back compat for when camelCase was used
5
+ export { GetCompatibilityIssueMessage as getCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
6
+ export { ConnectionPoint } from "./connectionPoint.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACzH,0CAA0C;AAC1C,OAAO,EAAE,4BAA4B,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,80 @@
1
+ import type { Observable } from "@onerjs/core/Misc/observable.js";
2
+ /**
3
+ * Enum defining the type of properties that can be edited in the property pages in the node editor
4
+ */
5
+ export declare enum PropertyTypeForEdition {
6
+ /** property is a boolean */
7
+ Boolean = 0,
8
+ /** property is a float */
9
+ Float = 1,
10
+ /** property is a int */
11
+ Int = 2,
12
+ /** property is a Vector2 */
13
+ Vector2 = 3,
14
+ /** property is a list of values */
15
+ List = 4
16
+ }
17
+ /**
18
+ * Interface that defines an option in a variable of type list
19
+ */
20
+ export interface IEditablePropertyListOption {
21
+ /** label of the option */
22
+ label: string;
23
+ /** value of the option */
24
+ value: number | string;
25
+ }
26
+ /**
27
+ * Interface that defines the options available for an editable property
28
+ */
29
+ export interface IEditablePropertyOption {
30
+ /** min value */
31
+ min?: number;
32
+ /** max value */
33
+ max?: number;
34
+ /** notifiers: indicates which actions to take when the property is changed */
35
+ notifiers?: {
36
+ /** the entity should be rebuilt */
37
+ rebuild?: boolean;
38
+ /** the preview should be updated */
39
+ update?: boolean;
40
+ /** the onPreviewCommandActivated observer of the preview manager should be triggered */
41
+ activatePreviewCommand?: boolean;
42
+ /** a callback to trigger */
43
+ callback?: () => boolean | undefined | void;
44
+ /** a callback to validate the property. Returns true if the property is ok, else false. If false, the rebuild/update/callback events won't be called */
45
+ onValidation?: (block: any, propertyName: string) => boolean;
46
+ };
47
+ /** a list of the options for a property of type list */
48
+ options?: IEditablePropertyListOption[] | Observable<IEditablePropertyListOption[]>;
49
+ /** whether the options' values should be treated as strings */
50
+ valuesAreStrings?: boolean;
51
+ /** If supplied, the sub property to read/write */
52
+ subPropertyName?: string;
53
+ }
54
+ /**
55
+ * Interface that describes an editable property
56
+ */
57
+ export interface IPropertyDescriptionForEdition {
58
+ /** name of the property */
59
+ propertyName: string;
60
+ /** display name of the property */
61
+ displayName: string;
62
+ /** type of the property */
63
+ type: PropertyTypeForEdition;
64
+ /** group of the property - all properties with the same group value will be displayed in a specific section */
65
+ groupName: string;
66
+ /** options for the property */
67
+ options: IEditablePropertyOption;
68
+ /** name of the class that contains the property */
69
+ className: string;
70
+ }
71
+ /**
72
+ * Decorator that flags a property in a node block as being editable
73
+ * @param displayName - the display name of the property
74
+ * @param propertyType - the type of the property
75
+ * @param groupName - the group name of the property
76
+ * @param options - the options of the property
77
+ * @returns the decorator
78
+ */
79
+ export declare function EditableInPropertyPage(displayName: string, propertyType?: PropertyTypeForEdition, groupName?: string, options?: IEditablePropertyOption): (target: any, propertyKey: string) => void;
80
+ //# sourceMappingURL=editableInPropertyPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editableInPropertyPage.d.ts","sourceRoot":"","sources":["../../src/editorUtils/editableInPropertyPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,wCAAgC;AAE1D;;GAEG;AACH,oBAAY,sBAAsB;IAC9B,4BAA4B;IAC5B,OAAO,IAAA;IACP,0BAA0B;IAC1B,KAAK,IAAA;IACL,wBAAwB;IACxB,GAAG,IAAA;IACH,4BAA4B;IAC5B,OAAO,IAAA;IACP,mCAAmC;IACnC,IAAI,IAAA;CACP;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,gBAAgB;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,SAAS,CAAC,EAAE;QACR,mCAAmC;QACnC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,oCAAoC;QACpC,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,wFAAwF;QACxF,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,4BAA4B;QAC5B,QAAQ,CAAC,EAAE,MAAM,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;QAC5C,wJAAwJ;QACxJ,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;KAChE,CAAC;IACF,wDAAwD;IACxD,OAAO,CAAC,EAAE,2BAA2B,EAAE,GAAG,UAAU,CAAC,2BAA2B,EAAE,CAAC,CAAC;IACpF,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,+GAA+G;IAC/G,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,OAAO,EAAE,uBAAuB,CAAC;IACjC,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAClC,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,sBAAuD,EACrE,SAAS,GAAE,MAAqB,EAChC,OAAO,CAAC,EAAE,uBAAuB,YAEjB,GAAG,eAAe,MAAM,UAgB3C"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Enum defining the type of properties that can be edited in the property pages in the node editor
3
+ */
4
+ export var PropertyTypeForEdition;
5
+ (function (PropertyTypeForEdition) {
6
+ /** property is a boolean */
7
+ PropertyTypeForEdition[PropertyTypeForEdition["Boolean"] = 0] = "Boolean";
8
+ /** property is a float */
9
+ PropertyTypeForEdition[PropertyTypeForEdition["Float"] = 1] = "Float";
10
+ /** property is a int */
11
+ PropertyTypeForEdition[PropertyTypeForEdition["Int"] = 2] = "Int";
12
+ /** property is a Vector2 */
13
+ PropertyTypeForEdition[PropertyTypeForEdition["Vector2"] = 3] = "Vector2";
14
+ /** property is a list of values */
15
+ PropertyTypeForEdition[PropertyTypeForEdition["List"] = 4] = "List";
16
+ })(PropertyTypeForEdition || (PropertyTypeForEdition = {}));
17
+ /**
18
+ * Decorator that flags a property in a node block as being editable
19
+ * @param displayName - the display name of the property
20
+ * @param propertyType - the type of the property
21
+ * @param groupName - the group name of the property
22
+ * @param options - the options of the property
23
+ * @returns the decorator
24
+ */
25
+ export function EditableInPropertyPage(displayName, propertyType = PropertyTypeForEdition.Boolean, groupName = "PROPERTIES", options) {
26
+ return (target, propertyKey) => {
27
+ let propStore = target._propStore;
28
+ if (!propStore) {
29
+ propStore = [];
30
+ target._propStore = propStore;
31
+ }
32
+ propStore.push({
33
+ propertyName: propertyKey,
34
+ displayName: displayName,
35
+ type: propertyType,
36
+ groupName: groupName,
37
+ options: options ?? {},
38
+ className: target.constructor.name,
39
+ });
40
+ };
41
+ }
42
+ //# sourceMappingURL=editableInPropertyPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editableInPropertyPage.js","sourceRoot":"","sources":["../../src/editorUtils/editableInPropertyPage.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAC9B,4BAA4B;IAC5B,yEAAO,CAAA;IACP,0BAA0B;IAC1B,qEAAK,CAAA;IACL,wBAAwB;IACxB,iEAAG,CAAA;IACH,4BAA4B;IAC5B,yEAAO,CAAA;IACP,mCAAmC;IACnC,mEAAI,CAAA;AACR,CAAC,EAXW,sBAAsB,KAAtB,sBAAsB,QAWjC;AA2DD;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAClC,WAAmB,EACnB,eAAuC,sBAAsB,CAAC,OAAO,EACrE,YAAoB,YAAY,EAChC,OAAiC;IAEjC,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QACxC,IAAI,SAAS,GAAqC,MAAM,CAAC,UAAU,CAAC;QACpE,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,SAAS,GAAG,EAAE,CAAC;YACf,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;QAClC,CAAC;QAED,SAAS,CAAC,IAAI,CAAC;YACX,YAAY,EAAE,WAAW;YACzB,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,OAAO,IAAI,EAAE;YACtB,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI;SACrC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./editableInPropertyPage.js";
2
+ export { EditableInPropertyPage as editableInPropertyPage } from "./editableInPropertyPage.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editorUtils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./editableInPropertyPage.js";
2
+ // Back compat for when camelCase was used
3
+ export { EditableInPropertyPage as editableInPropertyPage } from "./editableInPropertyPage.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editorUtils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,0CAA0C;AAC1C,OAAO,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,13 @@
1
+ export * from "./command/index.js";
2
+ export * from "./connection/index.js";
3
+ export * from "./blockFoundation/index.js";
4
+ export * from "./editorUtils/index.js";
5
+ export * from "./optimization/index.js";
6
+ export * from "./runtime/index.js";
7
+ export * from "./serialization/index.js";
8
+ export * from "./utils/index.js";
9
+ export { type IDisposable } from "./IDisposable.js";
10
+ export { SmartFilter, type InitializationData } from "./smartFilter.js";
11
+ export * from "./version.js";
12
+ export { Logger } from "@onerjs/core/Misc/logger.js";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,MAAM,EAAE,oCAA4B"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ /* eslint-disable import/no-internal-modules */
2
+ export * from "./command/index.js";
3
+ export * from "./connection/index.js";
4
+ export * from "./blockFoundation/index.js";
5
+ export * from "./editorUtils/index.js";
6
+ export * from "./optimization/index.js";
7
+ export * from "./runtime/index.js";
8
+ export * from "./serialization/index.js";
9
+ export * from "./utils/index.js";
10
+ export { SmartFilter } from "./smartFilter.js";
11
+ export * from "./version.js";
12
+ // So that users of the Smart Filters core can easily modify the logger settings (e.g. to change the logging level)
13
+ export { Logger } from "@onerjs/core/Misc/logger.js";
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AACxE,cAAc,cAAc,CAAC;AAE7B,mHAAmH;AACnH,OAAO,EAAE,MAAM,EAAE,oCAA4B"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Implementation of a dependency graph.
3
+ */
4
+ export declare class DependencyGraph<T> {
5
+ private _list;
6
+ private _dependOn;
7
+ private _requiredBy;
8
+ /**
9
+ * Creates a new instance of a dependency graph.
10
+ */
11
+ constructor();
12
+ /**
13
+ * Adds an element to the graph.
14
+ * @param element - The element to add to the graph.
15
+ */
16
+ addElement(element: T): void;
17
+ /**
18
+ * Adds a dependency between two elements.
19
+ * @param element - The element that depends on another element.
20
+ * @param dependency - The element that is required by the element passed as the first parameter.
21
+ */
22
+ addDependency(element: T, dependency: T): void;
23
+ /**
24
+ * Walks through the graph and calls the callback for each element.
25
+ * The elements that depend on other elements will be traversed after the elements they depend on.
26
+ * Note: the graph will be modified during the walk, so don't call walk twice on the same graph!
27
+ * @param callback - The callback to call for each element.
28
+ */
29
+ walk(callback: (element: T) => void): void;
30
+ }
31
+ //# sourceMappingURL=dependencyGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencyGraph.d.ts","sourceRoot":"","sources":["../../src/optimization/dependencyGraph.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC;IAC1B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,WAAW,CAAiB;IAEpC;;OAEG;;IAOH;;;OAGG;IACI,UAAU,CAAC,OAAO,EAAE,CAAC;IAQ5B;;;;OAIG;IACI,aAAa,CAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;IAa9C;;;;;OAKG;IACI,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI;CAwC7C"}