1
- # camera_radius = 250
2
1
editor_size = V 600 ,700
3
- half_editor_size = editor_size .scale 0.5
4
- camera = new THREE.OrthographicCamera 0 , editor_size .x , editor_size .y , 0 , - 2000 , 1000
5
- # camera = new THREE.OrthographicCamera -camera_radius, camera_radius,
6
- # camera_radius, -camera_radius, -camera_radius, camera_radius
7
- scene = new THREE.Scene ()
8
- scene .add camera
9
- renderer = new THREE.CanvasRenderer ()
10
- renderer .setSize editor_size .x , editor_size .y # window.innerWidth, window.innerHeight
11
- projector = new THREE.Projector ()
12
2
3
+ module = angular .module ' vislang' , []
4
+ module .directive ' subroutine' , ->
5
+ (scope , element , attributes ) ->
6
+ paper = Raphael element, editor_size .components ...
7
+ paper .circle 20 ,20 ,20
8
+
13
9
last = (list ) -> list[list .length - 1 ]
14
10
obj_first = (obj ) ->
15
11
for key, item of obj
@@ -472,6 +468,7 @@ make_text = (text, size) ->
472
468
mesh .position .x = centerOffset
473
469
return mesh
474
470
471
+ ###
475
472
node_material = new THREE.MeshBasicMaterial color:0x888888
476
473
highlighted_node_material = new THREE.MeshBasicMaterial color:0x8888FF
477
474
subroutine_material = new THREE.MeshBasicMaterial color:0xEEEEEE
@@ -483,6 +480,7 @@ subroutine_geometry = new THREE.PlaneGeometry editor_size.x,editor_size.y
483
480
node_mesh = [node_geometry, node_material]
484
481
nib_mesh = [nib_geometry, node_material]
485
482
subroutine_mesh = [subroutine_geometry, subroutine_material]
483
+ ###
486
484
487
485
make_box = (name , mesh , text_size , position ) ->
488
486
box = new THREE.Object3D ()
@@ -570,9 +568,8 @@ valid_json = (json) ->
570
568
571
569
pretty_json = (obj ) -> JSON .stringify obj, undefined , 2
572
570
573
- window .Controller = ($http ) ->
574
-
575
-
571
+ module .controller ' Controller' , ($http ) ->
572
+ ###
576
573
init_field = ->
577
574
if not should_animate
578
575
field = $("#field")
@@ -858,6 +855,7 @@ window.Controller = ($http) ->
858
855
start_saving()
859
856
else
860
857
@load_example_programs()
858
+ ###
861
859
862
860
dissociate_exception = (procedure ) ->
863
861
try
0 commit comments