@@ -38,6 +38,14 @@ function on_event()
3838 print (table_to_string (comp .vec_of_usize ))
3939 comp .vec_of_usize = comp .vec_of_usize
4040 print (table_to_string (comp .vec_of_usize ))
41+ comp .vec_of_usize :insert (1 , 42 )
42+ print (table_to_string (comp .vec_of_usize ))
43+
44+ print (" \n map" )
45+ -- print(comp.map_of_strings["key"])
46+ comp .map_of_strings :insert (" key2" , " value" )
47+ -- print(comp.map_of_strings["key2"])
48+
4149
4250
4351 print (" ============" )
@@ -75,42 +83,31 @@ function on_event()
7583 comp .vec_of_option_bools :insert (1 ,nil )
7684 print (" comp.vec_of_option_bools after insert: " , table_to_string (comp .vec_of_option_bools ))
7785
86+
87+
7888 print (" comp.vec_of_option_bools before push: " , table_to_string (comp .vec_of_option_bools ))
7989 comp .vec_of_option_bools :push (false )
8090 print (" comp.vec_of_option_bools after push: " , table_to_string (comp .vec_of_option_bools ))
8191
8292 print (" comp.vec_of_option_bools len after push: " , # comp .vec_of_option_bools )
8393
8494 print (" comp.vec_of_option_bools before pop: " , table_to_string (comp .vec_of_option_bools ))
85- print (comp .vec_of_option_bools :pop ())
95+ print (comp .vec_of_option_bools :pop (): print_value () )
8696 print (" comp.vec_of_option_bools after pop: " , table_to_string (comp .vec_of_option_bools ))
8797
8898 print (" the pairs inside comp.vec_of_option_bools: " )
8999 for k ,v in pairs (comp .vec_of_option_bools ) do
90100 print (string.format (" - %s:%s" ,k ,v ))
91101 end
92102
103+
93104 comp .vec_of_option_bools :clear ()
94105 print (" comp.vec_of_option_bools after clear: " , table_to_string (comp .vec_of_option_bools ))
95-
96106 print (" comp.vec_of_option_bools len after clear: " , # comp .vec_of_option_bools )
97- print (" ============" )
98-
99- print (" comp.option_vec_of_bools before: " , table_to_string (comp .option_vec_of_bools ))
100- print (comp .option_vec_of_bools :pop ())
101- print (" comp.option_vec_of_bools after pop: " , table_to_string (comp .option_vec_of_bools ))
102-
103-
104- print (" comp.option_vec_of_bools len after pop: " , # comp .option_vec_of_bools )
105-
106- print (" the pairs inside comp.option_vec_of_bools: " )
107- for k ,v in pairs (comp .option_vec_of_bools ) do
108- print (string.format (" - %s:%s" ,k ,v ))
109- end
110107
111108 print (" ============" )
112109
113- local complex_vec_op = Vec3 .new (0 ,1 ,0 ):any_orthonormal_vector () + comp .mat3 . x_axis
110+ local complex_vec_op = Vec3 .new (0 ,1 ,0 ):any_orthonormal_vector () + comp .mat3 [ 1 ]
114111 print (" (0,1,0).any_orthonormal_vector() + mat3.x_axis is: " , complex_vec_op )
115112
116113 local new_mat3 = Mat3 .from_cols (Vec3 .new (1 ,0 ,0 ),Vec3 .new (0 ,1 ,0 ),Vec3 .new (0 ,0 ,- 1 ))
@@ -121,8 +118,11 @@ function on_event()
121118 comp .f32 = comp .f32 + comp .f32 + comp .vec2 :min_element ()
122119 comp .vec2 = Vec2 .new (2 ,1 )
123120 comp .quat = Quat .from_xyzw (3 ,2 ,1 ,4 )
124- comp .mat3 . x_axis = Vec3 .new (69 ,69 ,69 )
121+ comp .mat3 [ 1 ] = Vec3 .new (69 ,69 ,69 )
125122
123+
124+ world :exit ()
125+ do return end
126126 print (" ============" )
127127
128128 -- this is an example of something impossible to achieve with plain bevy reflection under the hood
0 commit comments