-
Notifications
You must be signed in to change notification settings - Fork 9
/
jsoncad_example_all.html
394 lines (381 loc) · 29.9 KB
/
jsoncad_example_all.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<html>
<head>
<title>JSONCad Parser Example All</title>
<script type="text/javascript" src="three70.js" ></script>
<script type="text/javascript" src="OrthographicTrackballControls.js" ></script>
<script type="text/javascript" src="potree.js" ></script>
<script type="text/javascript" src="BinaryLoader.js" ></script>
<script type="text/javascript" src="csg.js" ></script>
<script type="text/javascript" src="threecsg.js" ></script>
<script type="text/javascript" src="Arial Narrow_Regular.js" ></script>
<script type="text/javascript" src="openscad.js" ></script>
<script type="text/javascript" src="jsoncad.js" ></script>
<script type="text/javascript" >
function example005() {
var cy = new Array();
for (var i = 0; i <= 5; i++) {
cy[i] = translate([sin(360 * i / 6) * 80, cos(360 * i / 6) * 80, 0],
cylinder({h: 200,r: 10}));
}
return translate([0, 0, -120],
union( difference( cylinder({h: 50,r: 100}),
translate([0, 0, 10], cylinder({h: 50,r: 80})),
translate([100, 0, 35], cube({size: 50,center: true})) ),
cy,
translate( [0, 0, 200], cylinder({h: 80,r1: 120,r2: 0}))
)
);
}
function sphere() {
return [
sphere({r: 10, fn: 18}).translate([15,-25,0]),
sphere({r: 10, fn: 18, type: 'geodesic'}).translate([-15,-25,0]),
sphere({r: 10, fn: 32}).translate([15,0,0]),
sphere({r: 10, fn: 32, type: 'geodesic'}).translate([-15,0,0]),
sphere({r: 10, fn: 32}).scale([0.5,1,2]).translate([15,25,0]),
sphere({r: 10, fn: 32}).scale([0.5,2,1]).translate([30,25,0]),
sphere({r: 10, fn: 32, type: 'geodesic'}).scale([0.5,1,2]).translate([-15,25,0]),
sphere({r: 10, fn: 32, type: 'geodesic'}).scale([0.5,2,1]).translate([-30,25,0]),
];
}
function dodecahedron(h) {
var c = cube({size: [2, 2, 1],center: true});
for (var i = 0; i <= 4; i++)
c = c.intersect(cube({size: [2, 2, 1],center: true}).rotateX(116.565).rotateZ(72 * i));
return scale([h, h, h], c);
}
function poly() {
return polyhedron({
points: [[0, -10, 60], [0, 10, 60 ], [0, 10, 0], [0, -10, 0], [60, -10, 60], [60, 10, 60], [10, -10, 50], [10, 10, 50], [10, 10, 30], [10, -10, 30], [30, -10, 50], [30, 10, 50]],
triangles: [[0, 3, 2], [0, 2, 1], [4, 0, 5], [5, 0, 1], [5, 2, 4], [4, 2, 3], [6, 8, 9], [6, 7, 8], [6, 10, 11], [6, 11, 7], [10, 8, 11], [10, 9, 8], [3, 0, 9], [9, 0, 6], [10, 6, 0], [0, 4, 10], [3, 9, 10], [3, 10, 4], [1, 7, 11], [1, 11, 5], [1, 8, 7], [2, 8, 1], [8, 2, 11], [5, 11, 2]
]
});
}
var nodes = {
'headsUpDisplay' : {
id : 'imageid'
, frame: 'acadtemplate1.png'
, etxt : [
{x : 1330 ,y : 580 , rz : -90 ,color : 'blue' ,fontsz : 52 ,scale: 1 ,strng : "XXX FRAME" }
,{x : 1410 ,y : 580 , rz : -90 ,color : 'blue' ,fontsz : 52 ,scale: 1 ,strng : "XXXX YYYYYYY " }
,{x : 1300 ,y : 650 , rz : 0 ,color : 'blue' ,fontsz : 14 ,scale: 1 ,strng : "Ima Notta P.E" }
,{x : 1375 ,y : 844 , rz : 0 ,color : 'blue' ,fontsz : 30 ,scale: 1 ,strng : "M-2" }
,{x : 100 ,y : 100 , rz : 0 ,color : 'deeppink' ,fontsz : 40 ,scale: 1 ,strng : "The Web is Alive... " }
,{x : 400 ,y : 144 , rz : 0 ,color : 'darkmagenta' ,fontsz : 60 ,scale: 1 ,strng : "With The Fun of OpenJSONCad!" }
,{x : 825 ,y : 250 , rz : 0 ,color : 'deepskyblue' ,fontsz : 30 ,scale: 1 ,strng : "(Dough I Hear... Is Very Near!)" }
]
},
'headsUpDisplay1' : {
id : 'imageid'
, frame: 'acadtemplate1.png'
, etxt : [
{x : 1330 ,y : 580 , rz : -90 ,color : 'blue' ,fontsz : 52 ,scale: 1 ,strng : "XXX FRAME" }
,{x : 1410 ,y : 580 , rz : -90 ,color : 'blue' ,fontsz : 52 ,scale: 1 ,strng : "XXXX YYYYYYY " }
,{x : 1300 ,y : 650 , rz : 0 ,color : 'blue' ,fontsz : 14 ,scale: 1 ,strng : "Ima Notta P.E" }
,{x : 1375 ,y : 844 , rz : 0 ,color : 'blue' ,fontsz : 30 ,scale: 1 ,strng : "M-2" }
]
},
'threeJSAnnotate' : [
{x : -670 ,y : 80 , rz : 0 ,color : 0xff0000 ,fontsz : 7 ,scale: 5 ,line : [3,28,51, 75 ] ,isx : 1 ,txy: [{x: 0,y: 15} ,{x: 0 ,y:15} ,{x : 0, y : 15} ,{x: 0,y:15} ] }
,{x : -200 ,y : 325 , rz : 0 ,color : 0xff0000 ,fontsz : 7 ,scale: 5 ,line : [0, 3,75, 78 ] ,isx : 1 ,txy: [{x: 0,y: 15} ,{x: 0 ,y:15} ,{x : -2, y : 15} ,{x: 4,y:15} ] }
,{x : 230 ,y :-275 , rz : 0 ,color : 0xff0000 ,fontsz : 7 ,scale: 5 ,line : [0,18,46, 84,120] ,isx : 0 ,txy: [{x:-15,y: 2} ,{x:-15 ,y: 2} ,{x :-15, y : 2} ,{x:-15,y: 2},{x:-15,y: 2} ] }
,{x : -255 ,y :-275 , rz : 0 ,color : 0xff0000 ,fontsz : 7 ,scale: 5 ,line : [0, 4,15,112 ] ,isx : 0 ,txy: [{x:-15,y: 2} ,{x:-15 ,y: 2} ,{x :-15, y : 2} ,{x:-15,y: 2} ] }
,{x : -720 ,y : -50 , rz : 0 ,color : 0xff0000 ,fontsz : 7 ,scale: 5 ,line : [2,23 ] ,isx : 0 ,txy: [{x:-15,y: 2} ,{x:-15 ,y: 2} ] }
,{x : -720 ,y :-275 , rz : 0 ,color : 0xff0000 ,fontsz : 7 ,scale: 5 ,line : [2, 8,16,23 ] ,isx : 0 ,txy: [{x:-15,y: 2} ,{x:-15 ,y: 2} ,{x :-15, y : 2} ,{x:-15,y: 2} ] }
]
, 'nodes001': {
'EX5': ['FUNC', ['example005', null, .5, null] , [ {x: 0 ,y: 2.2,z: 0 ,r1: {axis: 1,degrees: -90},r2: {axis: 0,degrees: 0} ,size: [.15, .15, .15]}
, {x: -100 ,y: 6.25,z: -50 ,r1: {axis: 1,degrees: -90},r2: {axis: 'y',degrees: 0},color: [0, 0, 1, 1],size: [.05, .05, .05]}
]
]
}
,'nodes004': {
// Calling a script from JSON... Eventually this script can be dynamically loaded
'EXX' : ['FUNC', ['dodecahedron' , '480' , 0.1 , [1, 0, 1, 1] ], [{x: 0,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 90},r2: {axis: 0,degrees: 0},color: [1, 1, 0, 1],size: [2, 2, 2]} ] ]
,'POLY': ['FUNC', ['poly' , '' , 1 , [1, 0, 1, 1] ], [{x: 0 ,y: 100 ,z: 0 ,r1: {axis:'x',degrees: -90},r2: {axis: 0,degrees: 0},color: [1, 0, 1, 1],size: [3, 3, 3]} ] ]
}
, 'nodes005': {
'TRWEDG': ['WEDG', [10,10,10, 1 , [0, 1, 0, 1]], [
{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1,0, 0, 1],size: [1, 1, 1]}
,{x: 0 ,y: 50 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0,1, 0, 1],size: [2, 2, 2]}
,{x: 0 ,y: 120 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0,0, 1, 1],size: [3, 3, 3]}
]
]
}
,'nodes006': {
'TRPYRM': ['PYRM', [25, 25, 25, 1, [0, 1, 0, 1]], [
{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1,0, 0, 1],size: [1, 1, 1]}
,{x: 0 ,y: 50 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0,1, 0, 1],size: [2, 2, 2]}
,{x: 0 ,y: 120 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0,0, 1, 1],size: [3, 3, 3]}
]
]
}
,'nodes007': {
//Spheres
'SPHERE1' : ['SPHR', [10, 18, 5, [0, 1, 0, 1]], [
{x: 15 ,y: -25 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1,0, 0, 1],size: [1, 1, 1]}
]
]
, 'SPHERE2' : ['SPHR', [10, 32, 5, [0, 1, 0, 1]], [
{x: 15 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1,0, 0, 1],size: [ 1, 1, 1]}
,{x: 15 ,y: 25 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0,1, 0, 1],size: [0.5, 1, 2]}
,{x: 30 ,y: 25 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0,0, 1, 1],size: [0.5, 2, 1]}
]
]
}
,'nodes008': {
'EX5X': ['GETF', ['example005', 'example005.jscad',null, .5, null] , [ {x: 0 ,y: 2.2,z: 0 ,r1: {axis: 1,degrees: -90},r2: {axis: 0,degrees: 0} ,size: [.15, .15, .15]}
, {x: -100 ,y: 6.25,z: -50 ,r1: {axis: 1,degrees: -90},r2: {axis: 'y',degrees: 0},color: [0, 0, 1, 1],size: [.05, .05, .05]}
]
]
}
,'nodes009': {
'EX5X': ['GOBJ', ['GAZEBOS', 'gazebo.js','nodeext', 1, null] , [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 1, 1,1] ,size: [1, 1, 1]}
]
]
}
, 'nodes010': {
'EX5X': ['GOBJ', ['GAZEBOS', 'gazebo.js','nodeext', 1, null] , [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0} ,color: [1, 0, 1, 1],size: [1, 1, 1]}
, {x: 0 ,y: 0 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0} ,color: [0, 1, 1, 1],size: [1, 1, 1]}
]
]
, 'EX5Y': ['GETF', ['example005', 'example005.jscad',null, .5, null] , [ {x: 0 ,y: 2.2,z: 40 ,r1: {axis: 1,degrees: -90},r2: {axis: 0,degrees: 0} ,size: [.15, .15, .15]}
, {x: -120 ,y: 7.25,z: -20 ,r1: {axis: 1,degrees: -90},r2: {axis: 'y',degrees: 0},color: [0, 0, 1, 1],size: [.05, .05, .05]}
]
]
}
,'nodes011': {
'BOXMARKS': ['BOXZ', [ 1, 1, 1, 1,null], [ //0
{x: -10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
]
]
, 'TRYLine00' : ['LIN3', [ 0, 0, 0, -10, -20, -20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine10' : ['LIN3', [ 0, 0, 0, -10, -20, 20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ]
, 'TRYLine20' : ['LIN3', [ 0, 0, 0, -10, 20, -20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine30' : ['LIN3', [ 0, 0, 0, -10, 20, 20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine40' : ['LIN3', [ 0, 0, 0, 10, -20, -20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ]
, 'TRYLine50' : ['LIN3', [ 0, 0, 0, 10, -20, 20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine60' : ['LIN3', [ 0, 0, 0, 10, 20, -20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine70' : ['LIN3', [ 0, 0, 0, 10, 20, 20, 1,null, .125], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}] ]
,'TRYLsegs': ['LSG3', [0, 0, 0, 1,null, .125], [ // x1 y1 z1 ...
{x: -10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
]
]
}
,'nodes012': {
'SPHERES': ['SPHR', [-1 ,32, 2,null], [ //0
{x: -10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: -20 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
]
]
// x0, y0, z0, x1 y1 z1 size color, pipe radius (optional parm that can be used to make thin lines or thick pipes)
, 'TRYLine00' : ['PIN3', [ 0, 0, 0, -10, -20, -20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine10' : ['PIN3', [ 0, 0, 0, -10, -20, 20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ]
, 'TRYLine20' : ['PIN3', [ 0, 0, 0, -10, 20, -20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine30' : ['PIN3', [ 0, 0, 0, -10, 20, 20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine40' : ['PIN3', [ 0, 0, 0, 10, -20, -20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ]
, 'TRYLine50' : ['PIN3', [ 0, 0, 0, 10, -20, 20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine60' : ['PIN3', [ 0, 0, 0, 10, 20, -20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}] ]
, 'TRYLine70' : ['PIN3', [ 0, 0, 0, 10, 20, 20, 1,null, 1.25], [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}] ]
// x0,y0, z0 size, color, radius(optional)
,'TRYLsegs': ['PSG3', [0, 0, 0, 1,null, 1.25], [ // x1 y1 z1 ...
{x: -10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [0, 0,1, 1],size: [1, 1, 1]}
, {x: -10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: -20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: -20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
, {x: 10 ,y: 20 ,z: 20 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,1, 1],size: [1, 1, 1]}
]
]
}
,'GAZEBOS': {
'GAZEBO' : ['VOBJ', [1, null] , [ {x: 0 ,y: -6.5,z: 0 ,r1: {axis: 1,degrees: -90},r2: {axis: 0,degrees: 0} ,size: [.15, .15, .15]}
, {x: -100 ,y: 2.0 ,z: -50 ,r1: {axis: 1,degrees: -90},r2: {axis: 'y',degrees: 0},color: [0, 0, 1, 1],size: [.05, .05, .05]}
]
]
}
,'POSTS' : [ 'PIPE' ,[10,200, 1, null] , [ {x: 0 ,y: 80 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}
, {x: 69.28 ,y: 40 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}
, {x: 69.28 ,y: -40 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}
, {x: 9.79 ,y: -80 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}
, {x: -69.28 ,y: -40 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}
, {x: -69.28 ,y: 40 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}
]
]
,'ROOF' : [ 'CONE' ,[ 120, 80, 120, 0, 1,null ], [ {x: 0 ,y: 0 ,z: 200 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}]]
,'HUTSECTION' : {
'subtract' : {
'POST0' : [ 'PIPE' ,[ 100, 50 ,1, null] , [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}]]
, 'POST1' : [ 'PIPE' ,[ 80 ,50 , 1, null] , [ {x: 0 ,y: 0 ,z: 10 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}]]
, 'FLOOR' : [ 'CUBE' ,[50, 50 , 50 ] , [ {x: 100 ,y: 0 ,z: 35 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}]]
}
}
,'GAZEBO' : {
'HUTSECTION' : ['VOBJ', [ .5,null] , [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}]]
,'ROOF' : ['VOBJ', [ .5,null] , [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}]]
,'POSTS' : ['VOBJ', [ .5,null] , [ {x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0 ,degrees: 0 },r2: {axis: 0 ,degrees: 0 } ,size: [1,1,1],color: [1, 0, 1, 1]}]]
}
, 'FRAME_TOP' :{ // primitive width height color instances x y z r1 r2 r1 r2
// deg deg
'SUBBEAM' : [ 'W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 'VOBJ' ,[5 ,3 ,0 ] ,[[ -670 , -50 , 0 , 0 , 0 , 0 , 0 ]] ]
, 'ALUM_FRAME_BOTTOM' : [ 'VOBJ' ,[5 ,1 ,0 ] ,[[ -670 ,-150 , 0 ,'X' ,-180 , 0 , 0 ]] ]
}
}
var node3s = {
'Gazebos' : ['CSG3'
, nodes['GAZEBOS']
, [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}]
]
, 'headsup' : ['HUD3'
, nodes['headsUpDisplay']
, [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}]
]
,'cloud' : ['PCL3'
, 'vol_total/cloud.js'
, [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}]
]
, 'veyron' : ['LOD3'
, {url : 'obj/veyron/VeyronNoUv_bin.js' ,parms : { mats : ['Red' , 'Pure chrome' , 'Red metal' , 'Dark glass', 'Pure chrome', 'Pure chrome' , 'Red glass 50', 'Orange glass 50'], face : null, mmap : [] } , size : 1, color : null}
, [ {x: 100 ,y: -25, z: -20 ,rotation : [0, Math.PI - Math.PI /12 ,0] , scale: [.04, .04, .04]}]
]
,'gallardo' : ['LOD3'
, {url : 'obj/gallardo/GallardoNoUv_bin.js' ,parms : { mats : [ 'Pure chrome', 'Black rough', 'White', 'Dark glass', 'Pure chrome' , 'Pure chrome' , 'Red glass 50' , 'Orange glass 50' ], face : null , mmap : [] } , size : 1, color : null}
, [ {x:-38 ,y: -2.5,z: 10 ,rotation : [0, -Math.PI/9 ,-Math.PI/12] , scale: [.03, .03, .03]}]
]
,'camaro' : ['LOD3'
, {url : 'obj/camaro/CamaroNoUv_bin.js' ,parms : { mats : [ 'Blue', 'Pure chrome', 'Pure chrome', 'Dark chrome', 'Light glass', 'Gray shiny', 'Black rough', 'Fullblack rough', 'Fullblack rough'], face : null , mmap : [] } , size : 1, color : null}
, [ {x: -80,y: 6,z: 102 ,rotation : [ Math.PI/10, -Math.PI/2 , Math.PI/10] , scale: [.75,.75,.75]}]
]
};
var node3s1 = {
'MBRS' : ['CSG3', nodes['DRAWINGSET'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ]
, 'headsup' : ['HUD3', nodes['headsUpDisplay1'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ]
, 'annotat' : ['LLT3', nodes['threeJSAnnotate'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ]
};
var target = [
{ 'MBRS' : ['CSG3', nodes['nodes001'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes004'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes005'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes007'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes008'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes009'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes010'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes011'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
,{ 'MBRS' : ['CSG3', nodes['nodes012'] , [{x: 0 ,y: 0 ,z: 0 ,r1: {axis: 0,degrees: 0},r2: {axis: 0,degrees: 0},color: [1, 0,0, 1],size: [1, 1, 1]}] ] }
];
</script>
<script type="text/javascript">
var gViewer = null;
function document_ready(){
gViewer = new JSONCad.Viewer( node3s , { camera_ : 'persp'} );
// gViewer = new JSONCad.Viewer( node3s1 );
// gViewer = new JSONCad.Viewer( target[0],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[1],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[2],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[3],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[4],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[5],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[6],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[7],{ axisxyz_ : true} );
// gViewer = new JSONCad.Viewer( target[8],{ axisxyz_ : true} );
};
</script>
</head>
<body onload="document_ready()" >
</body>
</html>