@holoscript/core 2.0.1 → 2.0.2
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.
- package/LICENSE +21 -0
- package/dist/chunk-3N67RLQP.cjs +1298 -0
- package/dist/chunk-3N67RLQP.cjs.map +1 -0
- package/dist/chunk-3X2EGU7Z.cjs +52 -0
- package/dist/chunk-3X2EGU7Z.cjs.map +1 -0
- package/dist/chunk-4CV4JOE5.js +24 -0
- package/dist/chunk-4CV4JOE5.js.map +1 -0
- package/dist/chunk-4OHVW4XR.cjs +1027 -0
- package/dist/chunk-4OHVW4XR.cjs.map +1 -0
- package/dist/chunk-CZLDE2OZ.cjs +28 -0
- package/dist/chunk-CZLDE2OZ.cjs.map +1 -0
- package/{src/HoloScriptRuntime.ts → dist/chunk-EU6CZMGJ.js} +437 -794
- package/dist/chunk-EU6CZMGJ.js.map +1 -0
- package/dist/chunk-KWYIVRIH.js +344 -0
- package/dist/chunk-KWYIVRIH.js.map +1 -0
- package/dist/chunk-MCP6D4LT.js +1025 -0
- package/dist/chunk-MCP6D4LT.js.map +1 -0
- package/dist/chunk-SATNCODL.js +45 -0
- package/dist/chunk-SATNCODL.js.map +1 -0
- package/dist/chunk-VMZN4EVR.cjs +347 -0
- package/dist/chunk-VMZN4EVR.cjs.map +1 -0
- package/{src/HoloScriptDebugger.ts → dist/chunk-VYIDLUCV.js} +118 -257
- package/dist/chunk-VYIDLUCV.js.map +1 -0
- package/dist/chunk-WFI4T3XB.cjs +424 -0
- package/dist/chunk-WFI4T3XB.cjs.map +1 -0
- package/dist/debugger.cjs +20 -0
- package/dist/debugger.cjs.map +1 -0
- package/dist/debugger.d.cts +171 -0
- package/dist/debugger.d.ts +171 -0
- package/dist/debugger.js +7 -0
- package/dist/debugger.js.map +1 -0
- package/dist/index.cjs +6006 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2482 -0
- package/dist/index.d.ts +2482 -0
- package/dist/index.js +5926 -0
- package/dist/index.js.map +1 -0
- package/dist/parser.cjs +14 -0
- package/dist/parser.cjs.map +1 -0
- package/dist/parser.d.cts +139 -0
- package/dist/parser.d.ts +139 -0
- package/dist/parser.js +5 -0
- package/dist/parser.js.map +1 -0
- package/dist/runtime.cjs +14 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +180 -0
- package/dist/runtime.d.ts +180 -0
- package/dist/runtime.js +5 -0
- package/dist/runtime.js.map +1 -0
- package/dist/type-checker.cjs +17 -0
- package/dist/type-checker.cjs.map +1 -0
- package/dist/type-checker.d.cts +105 -0
- package/dist/type-checker.d.ts +105 -0
- package/dist/type-checker.js +4 -0
- package/dist/type-checker.js.map +1 -0
- package/dist/types-D6g4ACjP.d.cts +262 -0
- package/dist/types-D6g4ACjP.d.ts +262 -0
- package/package.json +11 -8
- package/src/HoloScript2DParser.js +0 -227
- package/src/HoloScript2DParser.ts +0 -261
- package/src/HoloScriptCodeParser.js +0 -1102
- package/src/HoloScriptCodeParser.ts +0 -1188
- package/src/HoloScriptDebugger.js +0 -458
- package/src/HoloScriptParser.js +0 -338
- package/src/HoloScriptParser.ts +0 -397
- package/src/HoloScriptPlusParser.js +0 -371
- package/src/HoloScriptPlusParser.ts +0 -543
- package/src/HoloScriptRuntime.js +0 -1399
- package/src/HoloScriptRuntime.test.js +0 -351
- package/src/HoloScriptRuntime.test.ts +0 -436
- package/src/HoloScriptTypeChecker.js +0 -356
- package/src/HoloScriptTypeChecker.ts +0 -475
- package/src/__tests__/GraphicsServices.test.js +0 -357
- package/src/__tests__/GraphicsServices.test.ts +0 -427
- package/src/__tests__/HoloScriptPlusParser.test.js +0 -317
- package/src/__tests__/HoloScriptPlusParser.test.ts +0 -392
- package/src/__tests__/integration.test.js +0 -336
- package/src/__tests__/integration.test.ts +0 -416
- package/src/__tests__/performance.bench.js +0 -218
- package/src/__tests__/performance.bench.ts +0 -262
- package/src/__tests__/type-checker.test.js +0 -60
- package/src/__tests__/type-checker.test.ts +0 -73
- package/src/index.js +0 -217
- package/src/index.ts +0 -426
- package/src/interop/Interoperability.js +0 -413
- package/src/interop/Interoperability.ts +0 -494
- package/src/logger.js +0 -42
- package/src/logger.ts +0 -57
- package/src/parser/EnhancedParser.js +0 -205
- package/src/parser/EnhancedParser.ts +0 -251
- package/src/parser/HoloScriptPlusParser.js +0 -928
- package/src/parser/HoloScriptPlusParser.ts +0 -1089
- package/src/runtime/HoloScriptPlusRuntime.js +0 -674
- package/src/runtime/HoloScriptPlusRuntime.ts +0 -861
- package/src/runtime/PerformanceTelemetry.js +0 -323
- package/src/runtime/PerformanceTelemetry.ts +0 -467
- package/src/runtime/RuntimeOptimization.js +0 -361
- package/src/runtime/RuntimeOptimization.ts +0 -416
- package/src/services/HololandGraphicsPipelineService.js +0 -506
- package/src/services/HololandGraphicsPipelineService.ts +0 -662
- package/src/services/PlatformPerformanceOptimizer.js +0 -356
- package/src/services/PlatformPerformanceOptimizer.ts +0 -503
- package/src/state/ReactiveState.js +0 -427
- package/src/state/ReactiveState.ts +0 -572
- package/src/tools/DeveloperExperience.js +0 -376
- package/src/tools/DeveloperExperience.ts +0 -438
- package/src/traits/AIDriverTrait.js +0 -322
- package/src/traits/AIDriverTrait.test.js +0 -329
- package/src/traits/AIDriverTrait.test.ts +0 -357
- package/src/traits/AIDriverTrait.ts +0 -474
- package/src/traits/LightingTrait.js +0 -313
- package/src/traits/LightingTrait.test.js +0 -410
- package/src/traits/LightingTrait.test.ts +0 -462
- package/src/traits/LightingTrait.ts +0 -505
- package/src/traits/MaterialTrait.js +0 -194
- package/src/traits/MaterialTrait.test.js +0 -286
- package/src/traits/MaterialTrait.test.ts +0 -329
- package/src/traits/MaterialTrait.ts +0 -324
- package/src/traits/RenderingTrait.js +0 -356
- package/src/traits/RenderingTrait.test.js +0 -363
- package/src/traits/RenderingTrait.test.ts +0 -427
- package/src/traits/RenderingTrait.ts +0 -555
- package/src/traits/VRTraitSystem.js +0 -740
- package/src/traits/VRTraitSystem.ts +0 -1040
- package/src/traits/VoiceInputTrait.js +0 -284
- package/src/traits/VoiceInputTrait.test.js +0 -226
- package/src/traits/VoiceInputTrait.test.ts +0 -252
- package/src/traits/VoiceInputTrait.ts +0 -401
- package/src/types/AdvancedTypeSystem.js +0 -226
- package/src/types/AdvancedTypeSystem.ts +0 -494
- package/src/types/HoloScriptPlus.d.ts +0 -853
- package/src/types.js +0 -6
- package/src/types.ts +0 -369
- package/tsconfig.json +0 -23
- package/tsup.config.d.ts +0 -2
- package/tsup.config.js +0 -18
- package/tsup.config.ts +0 -19
package/src/HoloScriptParser.js
DELETED
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HoloScript Parser
|
|
3
|
-
*
|
|
4
|
-
* Parses voice commands, gestures, and code into HoloScript AST.
|
|
5
|
-
* Supports both 3D VR and 2D UI elements.
|
|
6
|
-
*/
|
|
7
|
-
import { logger } from './logger';
|
|
8
|
-
import { HoloScript2DParser } from './HoloScript2DParser';
|
|
9
|
-
const HOLOSCRIPT_SECURITY_CONFIG = {
|
|
10
|
-
maxCommandLength: 1000,
|
|
11
|
-
maxTokens: 100,
|
|
12
|
-
maxHologramsPerUser: 50,
|
|
13
|
-
suspiciousKeywords: [
|
|
14
|
-
'process', 'require', 'eval', 'import', 'constructor',
|
|
15
|
-
'prototype', '__proto__', 'fs', 'child_process', 'exec',
|
|
16
|
-
'spawn', 'fetch', 'xmlhttprequest',
|
|
17
|
-
],
|
|
18
|
-
allowedShapes: ['orb', 'cube', 'cylinder', 'pyramid', 'sphere', 'function', 'gate', 'stream'],
|
|
19
|
-
allowedUIElements: [
|
|
20
|
-
'canvas', 'button', 'textinput', 'panel', 'text', 'image',
|
|
21
|
-
'list', 'modal', 'slider', 'toggle', 'dropdown',
|
|
22
|
-
'flex-container', 'grid-container', 'scroll-view'
|
|
23
|
-
],
|
|
24
|
-
};
|
|
25
|
-
export class HoloScriptParser {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.ast = [];
|
|
28
|
-
this.parser2D = new HoloScript2DParser();
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Parse voice command into AST nodes
|
|
32
|
-
*/
|
|
33
|
-
parseVoiceCommand(command) {
|
|
34
|
-
if (command.command.length > HOLOSCRIPT_SECURITY_CONFIG.maxCommandLength) {
|
|
35
|
-
logger.warn('Command too long', {
|
|
36
|
-
length: command.command.length,
|
|
37
|
-
limit: HOLOSCRIPT_SECURITY_CONFIG.maxCommandLength,
|
|
38
|
-
});
|
|
39
|
-
return [];
|
|
40
|
-
}
|
|
41
|
-
const rawTokens = this.tokenizeCommand(command.command.toLowerCase());
|
|
42
|
-
const tokens = this.sanitizeTokens(rawTokens);
|
|
43
|
-
if (tokens.length === 0)
|
|
44
|
-
return [];
|
|
45
|
-
if (tokens.length > HOLOSCRIPT_SECURITY_CONFIG.maxTokens) {
|
|
46
|
-
logger.warn('Too many tokens in command', {
|
|
47
|
-
tokenCount: tokens.length,
|
|
48
|
-
limit: HOLOSCRIPT_SECURITY_CONFIG.maxTokens,
|
|
49
|
-
});
|
|
50
|
-
return [];
|
|
51
|
-
}
|
|
52
|
-
const commandType = tokens[0];
|
|
53
|
-
// Check if this is a 2D UI command
|
|
54
|
-
if ((commandType === 'create' || commandType === 'add') && tokens.length > 1) {
|
|
55
|
-
const elementType = tokens[1];
|
|
56
|
-
if (HOLOSCRIPT_SECURITY_CONFIG.allowedUIElements.includes(elementType)) {
|
|
57
|
-
return this.parse2DUICommand(command.command);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
switch (commandType) {
|
|
61
|
-
case 'create':
|
|
62
|
-
case 'summon':
|
|
63
|
-
return this.parseCreateCommand(tokens.slice(1), command.spatialContext);
|
|
64
|
-
case 'connect':
|
|
65
|
-
return this.parseConnectCommand(tokens.slice(1));
|
|
66
|
-
case 'execute':
|
|
67
|
-
case 'run':
|
|
68
|
-
return this.parseExecuteCommand(tokens.slice(1));
|
|
69
|
-
case 'debug':
|
|
70
|
-
return this.parseDebugCommand(tokens.slice(1));
|
|
71
|
-
case 'visualize':
|
|
72
|
-
return this.parseVisualizeCommand(tokens.slice(1));
|
|
73
|
-
default:
|
|
74
|
-
return this.parseGenericCommand(tokens);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
parse2DUICommand(command) {
|
|
78
|
-
const ui2DNode = this.parser2D.parse2DVoiceCommand(command);
|
|
79
|
-
if (!ui2DNode)
|
|
80
|
-
return [];
|
|
81
|
-
const astNode = {
|
|
82
|
-
type: '2d-ui',
|
|
83
|
-
uiElementType: ui2DNode.elementType,
|
|
84
|
-
name: ui2DNode.name,
|
|
85
|
-
properties: ui2DNode.properties,
|
|
86
|
-
events: ui2DNode.events,
|
|
87
|
-
children: ui2DNode.children,
|
|
88
|
-
};
|
|
89
|
-
return [astNode];
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Parse gesture input
|
|
93
|
-
*/
|
|
94
|
-
parseGesture(gesture) {
|
|
95
|
-
switch (gesture.type) {
|
|
96
|
-
case 'pinch':
|
|
97
|
-
return this.parsePinchGesture(gesture);
|
|
98
|
-
case 'swipe':
|
|
99
|
-
return this.parseSwipeGesture(gesture);
|
|
100
|
-
case 'rotate':
|
|
101
|
-
return this.parseRotateGesture(gesture);
|
|
102
|
-
case 'grab':
|
|
103
|
-
return this.parseGrabGesture(gesture);
|
|
104
|
-
default:
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
parseCreateCommand(tokens, position) {
|
|
109
|
-
if (tokens.length < 2)
|
|
110
|
-
return [];
|
|
111
|
-
const shape = tokens[0];
|
|
112
|
-
const name = tokens[1];
|
|
113
|
-
switch (shape) {
|
|
114
|
-
case 'orb':
|
|
115
|
-
case 'sphere':
|
|
116
|
-
return [this.createOrbNode(name, position)];
|
|
117
|
-
case 'function':
|
|
118
|
-
return [this.createFunctionNode(name, tokens.slice(2), position)];
|
|
119
|
-
case 'gate':
|
|
120
|
-
return [this.createGateNode(name, tokens.slice(2), position)];
|
|
121
|
-
case 'stream':
|
|
122
|
-
return [this.createStreamNode(name, tokens.slice(2), position)];
|
|
123
|
-
default:
|
|
124
|
-
return [this.createGenericNode(shape, name, position)];
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
parseConnectCommand(tokens) {
|
|
128
|
-
if (tokens.length < 3)
|
|
129
|
-
return [];
|
|
130
|
-
const from = tokens[0];
|
|
131
|
-
const to = tokens[2];
|
|
132
|
-
const dataType = tokens.length > 3 ? tokens[3] : 'any';
|
|
133
|
-
return [{
|
|
134
|
-
type: 'connection',
|
|
135
|
-
from,
|
|
136
|
-
to,
|
|
137
|
-
dataType,
|
|
138
|
-
bidirectional: tokens.includes('bidirectional') || tokens.includes('both'),
|
|
139
|
-
}];
|
|
140
|
-
}
|
|
141
|
-
createOrbNode(name, position) {
|
|
142
|
-
return {
|
|
143
|
-
type: 'orb',
|
|
144
|
-
name,
|
|
145
|
-
position: position || { x: 0, y: 0, z: 0 },
|
|
146
|
-
hologram: {
|
|
147
|
-
shape: 'orb',
|
|
148
|
-
color: '#00ffff',
|
|
149
|
-
size: 1,
|
|
150
|
-
glow: true,
|
|
151
|
-
interactive: true,
|
|
152
|
-
},
|
|
153
|
-
properties: {},
|
|
154
|
-
methods: [],
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
createFunctionNode(name, params, position) {
|
|
158
|
-
const parameters = [];
|
|
159
|
-
let inParams = false;
|
|
160
|
-
for (const param of params) {
|
|
161
|
-
if (param === 'with' || param === 'parameters') {
|
|
162
|
-
inParams = true;
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
if (inParams && param !== 'do' && param !== 'execute') {
|
|
166
|
-
parameters.push({
|
|
167
|
-
type: 'parameter',
|
|
168
|
-
name: param,
|
|
169
|
-
dataType: 'any',
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return {
|
|
174
|
-
type: 'function',
|
|
175
|
-
name,
|
|
176
|
-
parameters,
|
|
177
|
-
body: [],
|
|
178
|
-
position: position || { x: 0, y: 0, z: 0 },
|
|
179
|
-
hologram: {
|
|
180
|
-
shape: 'cube',
|
|
181
|
-
color: '#ff6b35',
|
|
182
|
-
size: 1.5,
|
|
183
|
-
glow: true,
|
|
184
|
-
interactive: true,
|
|
185
|
-
},
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
createGateNode(_name, params, position) {
|
|
189
|
-
const condition = params.join(' ').replace('condition', '').trim();
|
|
190
|
-
return {
|
|
191
|
-
type: 'gate',
|
|
192
|
-
condition,
|
|
193
|
-
truePath: [],
|
|
194
|
-
falsePath: [],
|
|
195
|
-
position: position || { x: 0, y: 0, z: 0 },
|
|
196
|
-
hologram: {
|
|
197
|
-
shape: 'pyramid',
|
|
198
|
-
color: '#4ecdc4',
|
|
199
|
-
size: 1,
|
|
200
|
-
glow: true,
|
|
201
|
-
interactive: true,
|
|
202
|
-
},
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
createStreamNode(name, params, position) {
|
|
206
|
-
return {
|
|
207
|
-
type: 'stream',
|
|
208
|
-
name,
|
|
209
|
-
source: params[0] || 'unknown',
|
|
210
|
-
transformations: [],
|
|
211
|
-
position: position || { x: 0, y: 0, z: 0 },
|
|
212
|
-
hologram: {
|
|
213
|
-
shape: 'cylinder',
|
|
214
|
-
color: '#45b7d1',
|
|
215
|
-
size: 2,
|
|
216
|
-
glow: true,
|
|
217
|
-
interactive: true,
|
|
218
|
-
},
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
createGenericNode(shape, name, position) {
|
|
222
|
-
return {
|
|
223
|
-
type: shape,
|
|
224
|
-
name,
|
|
225
|
-
position: position || { x: 0, y: 0, z: 0 },
|
|
226
|
-
hologram: {
|
|
227
|
-
shape: shape,
|
|
228
|
-
color: '#ffffff',
|
|
229
|
-
size: 1,
|
|
230
|
-
glow: false,
|
|
231
|
-
interactive: true,
|
|
232
|
-
},
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
parsePinchGesture(gesture) {
|
|
236
|
-
return [{
|
|
237
|
-
type: 'create',
|
|
238
|
-
position: gesture.position,
|
|
239
|
-
hologram: { shape: 'orb', color: '#ff0000', size: 0.5, glow: true, interactive: true },
|
|
240
|
-
}];
|
|
241
|
-
}
|
|
242
|
-
parseSwipeGesture(gesture) {
|
|
243
|
-
if (!gesture.direction)
|
|
244
|
-
return [];
|
|
245
|
-
return [{
|
|
246
|
-
type: 'connect',
|
|
247
|
-
position: gesture.position,
|
|
248
|
-
hologram: { shape: 'cylinder', color: '#00ff00', size: gesture.magnitude, glow: true, interactive: false },
|
|
249
|
-
}];
|
|
250
|
-
}
|
|
251
|
-
parseRotateGesture(gesture) {
|
|
252
|
-
return [{
|
|
253
|
-
type: 'modify',
|
|
254
|
-
position: gesture.position,
|
|
255
|
-
hologram: { shape: 'sphere', color: '#ffff00', size: 0.8, glow: true, interactive: true },
|
|
256
|
-
}];
|
|
257
|
-
}
|
|
258
|
-
parseGrabGesture(gesture) {
|
|
259
|
-
return [{
|
|
260
|
-
type: 'select',
|
|
261
|
-
position: gesture.position,
|
|
262
|
-
hologram: { shape: 'cube', color: '#ff00ff', size: 0.3, glow: true, interactive: true },
|
|
263
|
-
}];
|
|
264
|
-
}
|
|
265
|
-
tokenizeCommand(command) {
|
|
266
|
-
return command
|
|
267
|
-
.toLowerCase()
|
|
268
|
-
.replace(/[^\w\s]/g, ' ')
|
|
269
|
-
.split(/\s+/)
|
|
270
|
-
.filter(token => token.length > 0);
|
|
271
|
-
}
|
|
272
|
-
sanitizeTokens(tokens) {
|
|
273
|
-
return tokens.filter(token => {
|
|
274
|
-
const isSuspicious = HOLOSCRIPT_SECURITY_CONFIG.suspiciousKeywords.some(keyword => token.includes(keyword));
|
|
275
|
-
if (isSuspicious) {
|
|
276
|
-
logger.warn('Suspicious token blocked', { token });
|
|
277
|
-
return false;
|
|
278
|
-
}
|
|
279
|
-
return true;
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
parseExecuteCommand(tokens) {
|
|
283
|
-
return [{
|
|
284
|
-
type: 'execute',
|
|
285
|
-
target: tokens[0] || 'unknown',
|
|
286
|
-
hologram: { shape: 'sphere', color: '#ff4500', size: 1.2, glow: true, interactive: false },
|
|
287
|
-
}];
|
|
288
|
-
}
|
|
289
|
-
parseDebugCommand(tokens) {
|
|
290
|
-
return [{
|
|
291
|
-
type: 'debug',
|
|
292
|
-
target: tokens[0] || 'program',
|
|
293
|
-
hologram: { shape: 'pyramid', color: '#ff1493', size: 0.8, glow: true, interactive: true },
|
|
294
|
-
}];
|
|
295
|
-
}
|
|
296
|
-
parseVisualizeCommand(tokens) {
|
|
297
|
-
return [{
|
|
298
|
-
type: 'visualize',
|
|
299
|
-
target: tokens[0] || 'data',
|
|
300
|
-
hologram: { shape: 'cylinder', color: '#32cd32', size: 1.5, glow: true, interactive: true },
|
|
301
|
-
}];
|
|
302
|
-
}
|
|
303
|
-
parseGenericCommand(tokens) {
|
|
304
|
-
return [{
|
|
305
|
-
type: 'generic',
|
|
306
|
-
command: tokens.join(' '),
|
|
307
|
-
hologram: { shape: 'orb', color: '#808080', size: 0.5, glow: false, interactive: true },
|
|
308
|
-
}];
|
|
309
|
-
}
|
|
310
|
-
getAST() {
|
|
311
|
-
return [...this.ast];
|
|
312
|
-
}
|
|
313
|
-
addNode(node) {
|
|
314
|
-
this.ast.push(node);
|
|
315
|
-
}
|
|
316
|
-
clear() {
|
|
317
|
-
this.ast = [];
|
|
318
|
-
}
|
|
319
|
-
findNode(name) {
|
|
320
|
-
return this.ast.find(node => 'name' in node && node.name === name) || null;
|
|
321
|
-
}
|
|
322
|
-
getNodesAtPosition(position, radius = 1) {
|
|
323
|
-
return this.ast.filter(node => {
|
|
324
|
-
if (!node.position)
|
|
325
|
-
return false;
|
|
326
|
-
const distance = Math.sqrt(Math.pow(node.position.x - position.x, 2) +
|
|
327
|
-
Math.pow(node.position.y - position.y, 2) +
|
|
328
|
-
Math.pow(node.position.z - position.z, 2));
|
|
329
|
-
return distance <= radius;
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
parse2DCode(code) {
|
|
333
|
-
return this.parser2D.parse2DElement(code);
|
|
334
|
-
}
|
|
335
|
-
get2DParser() {
|
|
336
|
-
return this.parser2D;
|
|
337
|
-
}
|
|
338
|
-
}
|