text: [{"Owner":"NasimiAsl","Date":"2015-02-28T05:19:38Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_let me explain with sample_dd__lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_ _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_vertiex _dd__lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_ _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_p1_dd_ 0_co_0_co_0                                  uv _dd_ 0.0_co_0.0_lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_p2_dd_ 0_co_0_co_1                                  uv _dd_ 0.5_co_0.0_lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_p3_dd_ 1_co_0_co_0 _dd_ face 1(p1_co_p2_co_p3)     uv _dd_ 0.0_co_0.5_lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_p4_dd_ 1_co_0_co_1 _dd_ face 2(p2_co_p3_co_p4)     uv _dd_ 0.5_co_0.5_lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_ _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_everything is ok to p4_lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_so i want fill back face with out append more vertex_lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_ _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_so _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_ _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_face 3 (p4_co_p2_co_p3)   _dd_   i cant set any new uv _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_face 4 (p3_co_p1_co_p2)   _dd_   *** same problem  _lt_/p_gt__lt_br_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_ * in babylonjs i can set uv per  vertex  but in .obj format i have more uvs per vertex_lt_/p_gt__lt_br_gt_\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Dad72","Date":"2015-02-28T11:05:18Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hein  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_wacko.png_qt_ alt_eq__qt__dd_wacko_dd__qt__gt_ . sorry_co_ but I understood nothing._lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-02-28T13:01:59Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_i apologize for bad writing ._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_we have a simple plan with 4 point  like  _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_vertices _dd_  [{x_dd_0_co_y_dd_0_co_z_dd_0}_co_ {x_dd_1_co_y_dd_0_co_z_dd_0} _co_ {x_dd_1_co_y_dd_0_co_z_dd_1} _co_ {x_dd_0_co_y_dd_0_co_z_dd_1}]_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_faces _dd_ [{ a_dd_ 0_co_b_dd_1_co_c_dd_2}  _co_ { a_dd_1_co_b_dd_ 2_co_ c_dd_ 3 } ]   // two face for up side of plan_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_uvs _dd_   [ [0_co_0]_co_ [0.5_co_0]_co_ [0.5_co_0.5] _co_ [0_co_0.5] ]  //  per vertex _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_now i want add back side without append any vertex_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_so push two face like this _dd_    faces .push({ a_dd_ 3_co_b_dd_1_co_c_dd_2}  _co_ { a_dd_0_co_b_dd_ 2_co_ c_dd_ 1 })_sm__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_i fill UVS from 0 to 0.5 for Up Side of Plan now i want continue  UV from 0.5 to 1.0_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_but when i push new uvs nothing change in my geometry and back side have uv like up side_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_* important we need build this plan with 4 points._lt_/p_gt__lt_p_gt_           _lt_/p_gt__lt_p_gt_ _lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"jerome","Date":"2015-02-28T13:49:15Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_UVs are _lt_em_gt_per_lt_/em_gt_ vertex._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_3 vertices &lt_sm__eq_&gt_sm_ 3 UV pairs._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_If you need to stretch your texture backside with other UV values than the ones used for the front side_co_ you have then to add three more vertices_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_In your example_co_ you have only 3 vertices ... whatever the number of faces they are used_co_ or re-used_co_ in._lt_/p_gt__lt_p_gt_So only the 3 first coordinate pairs in your UV array will be be used._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt__lt_a href_eq__qt_http_dd_//www.html5gamedevs.com/topic/12467-double-sided-mesh/?p_eq_71736_qt__gt_http_dd_//www.html5gamedevs.com/topic/12467-double-sided-mesh/?p_eq_71736_lt_/a_gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-02-28T13:59:45Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_thanks jerome_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_i want import .obj geometry i dont want change the vertices array but i have problem in last face  .  some vertex in last faces have uvs but need a new uvs ._lt_/p_gt__lt_p_gt_i want know why uvs defined per vertex but in   3d software it is not like this ._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_i thinks in three js it is not like this so maybe we can correct babylonjs core?_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"jerome","Date":"2015-02-28T14:21:00Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_I guess ThreeJS and BJS behave the same way on this topic_co_ because it_t_s just the WebGL / OpenGL rule _dd_ a normal per vertex and a UV per vertex only._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_You could get your vertex array and face array_co_  instanciate a VertexData object  andt hen use the (public and private) methods _dd__lt_/p_gt__lt_p_gt__lt_em_gt_ComputeNormals(positions_co_ indices_co_ normals) _lt_/em_gt__dd_ re-computes the normals array given _lt_em_gt_positions_lt_/em_gt_ and _lt_em_gt_indices_lt_/em_gt__lt_/p_gt__lt_p_gt_and _lt_/p_gt__lt_p_gt__lt_em_gt__ComputeSides(sideOrientation_co_ positions_co_ indices_co_ normals_co_ uvs)_lt_/em_gt_ _dd_ re-computes vertex_co_ indices_co_ normals and uv arrays given a _lt_em_gt_sideOrientation_lt_/em_gt_ value._lt_/p_gt__lt_p_gt_This method will add the missing backside vertices_co_ faces_co_ normals and uvs for you if you want a double sided mesh._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt__lt_em_gt_sideOrientation_lt_/em_gt_ values are detailed here in the Side Orientation part_dd_ _lt_a href_eq__qt_http_dd_//doc.babylonjs.com/page.php?p_eq_22011_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//doc.babylonjs.com/page.php?p_eq_22011_lt_/a_gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt__lt_a href_eq__qt_https_dd_//github.com/BabylonJS/Babylon.js/blob/master/Babylon/Mesh/babylon.mesh.vertexData.ts#L1162_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//github.com/BabylonJS/Babylon.js/blob/master/Babylon/Mesh/babylon.mesh.vertexData.ts#L1162_lt_/a_gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-02-28T14:39:15Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_div_gt__lt_br_gt__lt_div_gt_// this method append mor than 1 uvs per vertex_lt_/div_gt__lt_br_gt__lt_div_gt__lt_br_gt__lt_div_gt_geometry.faceVertexUvs[ 0 ].push( [_lt_/div_gt__lt_br_gt__lt_div_gt_uvs[ parseUVIndex( a ) ].clone()_co__lt_/div_gt__lt_br_gt__lt_div_gt_uvs[ parseUVIndex( b ) ].clone()_co__lt_/div_gt__lt_br_gt__lt_div_gt_uvs[ parseUVIndex( c ) ].clone()_lt_/div_gt__lt_br_gt__lt_div_gt_] )_sm__lt_/div_gt__lt_br_gt__lt_/div_gt__lt_br_gt__lt_div_gt_ _lt_/div_gt__lt_br_gt__lt_/div_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"jerome","Date":"2015-02-28T16:44:40Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Well_co_ maybe you could edit your post and wrap the code in the _lt_em_gt_code tag_lt_/em_gt_ (select the text and click on _qt_&lt_sm_&gt_sm__qt_ in the tool bar) so it will be easier to read._lt_/p_gt__lt_p_gt_I just can_t_t read in this function what gives the ability to have more and an uv per vertex so far._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_here is a part of the khronos (the guys who made Wegl) group forum _dd__lt_/p_gt__lt_p_gt__lt_a href_eq__qt_https_dd_//www.khronos.org/message_boards/showthread.php/7063-Texture-coordinates-per-face-index-instead-of-per-vertex_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//www.khronos.org/message_boards/showthread.php/7063-Texture-coordinates-per-face-index-instead-of-per-vertex_lt_/a_gt__lt_/p_gt__lt_blockquote data-ipsquote_eq__qt__qt_ class_eq__qt_ipsQuote_qt__gt__lt_div_gt_No - you should duplicate the vertex if the texture coord is different (note also that your surface normal vector will also be different - which gives you two reasons to duplicate it)._lt_/div_gt__lt_/blockquote_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_btw_co_ there_t_s a _lt_em_gt_uv2_lt_/em_gt_ property in the VertexData object_co_ but I don_t_t know what is for ..._lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2015-02-28T17:06:18Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_I think you can delete the code from your post_co_ if you wish.  I _lt_u_gt_think_lt_/u_gt_ the same code is here_dd__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt__lt_a href_eq__qt_http_dd_//threejs.org/examples/js/loaders/OBJLoader.js_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//threejs.org/examples/js/loaders/OBJLoader.js_lt_/a_gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_there seems to be ANOTHER version... for Ejecta._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt__lt_a href_eq__qt_https_dd_//gist.github.com/phoboslab/5964733_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//gist.github.com/phoboslab/5964733_lt_/a_gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_*shrug*_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_I think we need to write a book called _qt_The Last UV_qt_.  The last uv has troubled quite a few people.  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_The book will be about a team of relay racers... with troubles.  They keep making the mistake of trying to hand the baton to the first runner... when the last runner reaches the finish line.  The first runner says _qt_NO NO_co_ I already gave that away to somebody_qt_.  (Wingnut trying comedy_co_ failing)_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Maybe the last uv needs to be treated like a VALUE that is _qt_averaged_qt_ with the first uv.  The first uv gets adjusted to _qt_split the difference_qt__co_ and then the last uv values are discarded.  *shrug*  Just guessing.  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-02-28T19:45:05Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_uv2 just for  use 2 type of uv map for geo in shader and can set 2 texture ._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_we need .obj loader for babylonjs anyway  i convert that  but i have problem with last uv_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_i can find last faces but i want resolve that without change vertices of geometry _lt_/p_gt__lt_p_gt_any append new vertex make problem for smooth property so help me to resolve that._lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"RaananW","Date":"2015-02-28T20:16:16Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hi!_lt_/p_gt__lt_p_gt_Trying to understand your initial question - _lt_/p_gt__lt_p_gt_You have 4 vertices_co_ defined with xyz on each. Each has a uv (v and u)._lt_/p_gt__lt_p_gt_So your positions and usv vector look like this (babylon format)_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_positions _eq_ [0_co_0_co_0_co_0_co_0_co_1_co_1_co_0_co_0_co_1_co_0_co_1] // 12 itemsuvs _eq_ [0_co_0_co_0_co_0.5_co_0.5_co_0_co_0.5_co_0.5] // 8 items_lt_/pre_gt__lt_p_gt_indices vector (the faces) will look like this_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_indices _eq_ [0_co_ 1_co_ 2_co_ 0_co_ 2_co_ 3] _lt_/pre_gt__lt_p_gt_This created a plane._lt_/p_gt__lt_p_gt_Now_co_ If I understand you fully_co_ you wanted to _qt_reuse_qt_ the positions and add a new uv definition._lt_/p_gt__lt_p_gt_In OBJ you can reference the location of both position and uv in the faces definition _dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_f 1/2 2/1 3/2_lt_/pre_gt__lt_p_gt_Which avoids having redundant uv definitions._lt_/p_gt__lt_p_gt_The babylon format works differently. It is rather redundant_co_ but wonderful for performance. If you want to add a new uv to an existing position definition_co_ you will have to duplicate this position and add the uvs definition at the correct position. This is due to the indices definition. Not like obj_co_ indices is only 1 number_co_ meaning 1 position of the array. You can_t_t reference a specific uv definition and a different positions definition._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_So - to do what you wanted to do_co_ you would have to add a new position to the positions (which is a duplicate of an existing position) and add the uv_dd__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_(let_t_s say you want to add a new uv definition for the 0_co_0_co_0 positions)_lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_positions _eq_ [0_co_0_co_0_co_0_co_0_co_1_co_1_co_0_co_0_co_1_co_0_co_1_co_ 0_co_0_co_0] //15 itemsuvs _eq_ [0_co_0_co_0_co_0.5_co_0.5_co_0_co_0.5_co_0.5_co_ 0.5_co_1.0] // 10 items_lt_/pre_gt__lt_p_gt_and now create a new face using the 4th _qt_definition location_qt__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_indices _eq_ [0_co_ 1_co_ 2_co_ 0_co_ 2_co_ 3_co_ 1_co_ 2_co_ 4] _lt_/pre_gt__lt_p_gt_I am not sure if I understood your question correctly_co_ I hope this clears things up a bit._lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-03-01T05:41:04Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_thanks _lt_/p_gt_\t_lt_span_gt__lt_a href_eq__qt_http_dd_//www.html5gamedevs.com/user/10310-raananw/_qt_ title_eq__qt__qt__gt_RaananW_lt_/a_gt__lt_/span_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_we wont add a new position  actually this problem is not for a simple plan we want have solution for all object ._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Main Problem _dd_ We have some vertices in the  .obj format that have many uvs but in babylon js we have one uv(two number) per vertex.  _lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-03-01T07:00:11Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_blockquote data-ipsquote_eq__qt__qt_ class_eq__qt_ipsQuote_qt_ data-ipsquote-contentcommentid_eq__qt_73683_qt_ data-ipsquote-contenttype_eq__qt_forums_qt_ data-ipsquote-contentclass_eq__qt_forums_Topic_qt_ data-ipsquote-contentid_eq__qt_12804_qt_ data-ipsquote-username_eq__qt_Wingnut_qt_ data-cite_eq__qt_Wingnut_qt_ data-ipsquote-timestamp_eq__qt_1425143178_qt__gt__lt_div_gt__lt_div_gt__lt_p_gt_I think you can delete the code from your post_co_ if you wish.  I _lt_u_gt_think_lt_/u_gt_ the same code is here_dd__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt__lt_a href_eq__qt_http_dd_//threejs.org/examples/js/loaders/OBJLoader.js_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//threejs.org/examples/js/loaders/OBJLoader.js_lt_/a_gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_there seems to be ANOTHER version... for Ejecta._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt__lt_a href_eq__qt_https_dd_//gist.github.com/phoboslab/5964733_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//gist.github.com/phoboslab/5964733_lt_/a_gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_*shrug*_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_I think we need to write a book called _qt_The Last UV_qt_.  The last uv has troubled quite a few people.  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_The book will be about a team of relay racers... with troubles.  They keep making the mistake of trying to hand the baton to the first runner... when the last runner reaches the finish line.  The first runner says _qt_NO NO_co_ I already gave that away to somebody_qt_.  (Wingnut trying comedy_co_ failing)_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Maybe the last uv needs to be treated like a VALUE that is _qt_averaged_qt_ with the first uv.  The first uv gets adjusted to _qt_split the difference_qt__co_ and then the last uv values are discarded.  *shrug*  Just guessing.  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_/div_gt__lt_/div_gt__lt_/blockquote_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_main question is why uvs set per vertex 1&lt_sm__eq_&gt_sm_1 ( who design this?) _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt_)_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"RaananW","Date":"2015-03-01T07:15:01Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Can you show us how it_t_s done in the obj file?_lt_/p_gt__lt_p_gt_An obj consists of a lot of vt_co_ vn and v_co_ connected using faces (f)_co_ but I_t_m not sure how you achieve what you mean._lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-03-01T07:47:14Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_16 face  any face have 3 point with 3 uv index so  16 * 3 ( vertex count)  _eq_ 48_lt_/p_gt__lt_p_gt_all vertex count _eq_ 26_lt_/p_gt__lt_p_gt_all indexed uv count _eq_ 43 ( same uv removed when indexed)_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_what we have 26 place for uv_lt_/p_gt__lt_p_gt__lt_a href_eq__qt_http_dd_//www.html5gamedevs.com/applications/core/interface/file/attachment.php?id_eq_3807_qt__gt_255.txt_lt_/a_gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"RaananW","Date":"2015-03-01T08:52:12Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_This is exactly what I meant in my post. And it_t_s more than possible_co_ Babylon supports creating such objects_co_ naturally._lt_/p_gt__lt_p_gt_The obj representation of a face is more complex than babylon_t_s. In obj you can choose the uv_co_ v and normal for a single face vertex. Babylon requires you to duplicate the data. _lt_/p_gt__lt_p_gt_Look at the first face in your txt file. 1/1/1_co_ 2/2/2 etc. This is how Babylon works. You can_t_t do_lt_/p_gt__lt_p_gt_f 1/2/1 2/2/3_co_ 1/4/1_lt_/p_gt__lt_p_gt_in Babylon. _lt_/p_gt__lt_p_gt_The amount of faces will eventually be the same. The size of the array that represents the vertices will be bigger._lt_/p_gt__lt_p_gt_If it_t_s not clear_co_ I_t_ll try explaining a bit more thoroughly_co_ not a problem. _lt_/p_gt__lt_p_gt_Btw - maybe try the asset converter with your obj and see how the data is represented. _lt_a href_eq__qt_http_dd_//www.babylonjs.com/converter.html_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs.com/converter.html_lt_/a_gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"jerome","Date":"2015-03-01T09:49:50Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_As Raanaw said_co_ the _lt_em_gt_indices_lt_/em_gt_ array is the reference._lt_/p_gt__lt_p_gt_The _lt_em_gt_indices _lt_/em_gt_refers what vertex triplet should be used from the _lt_em_gt_positions_lt_/em_gt_ array to draw a face (triangle)_co_ but also what normal from _lt_em_gt_normals_lt_/em_gt_ array to apply to each vertex and what uv froms _lt_em_gt_uvs_lt_/em_gt_ array to associate to each vertex._lt_/p_gt__lt_p_gt_This is way the _lt_em_gt_indices_lt_/em_gt_ array is iterated (I guess)._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_If you have more _lt_em_gt_positions _lt_/em_gt_elements than _lt_em_gt_indices_lt_/em_gt_ corresponding elements_co_ they don_t_t matter_co_ they aren_t_t used._lt_/p_gt__lt_p_gt_The same for _lt_em_gt_normals_lt_/em_gt_ and _lt_em_gt_uvs_lt_/em_gt_. This is the reason why your extra uvs aren_t_t applied._lt_/p_gt__lt_p_gt_If you have less _lt_em_gt_positions_lt_/em_gt_ elements than _lt_em_gt_indices_lt_/em_gt_ corresponding elements_co_ it will raise a WebGL error in the console. _lt_/p_gt__lt_p_gt_You can therefore have less or none _lt_em_gt_normals_lt_/em_gt_ and _lt_em_gt_uvs_lt_/em_gt_ elements than _lt_em_gt_indices_lt_/em_gt_ elements (set to zero by default ?)._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_I don_t_t really know if it is a BJS design choice or a WebGL limitation._lt_/p_gt__lt_p_gt_As they often talk about this need for vertex duplication in openGL forums_co_ I guess it_t_s related to WebGL itself_co_ but don_t_t sincerely know. _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Briefly_co_ you still want to use BJS_co_ you will have to duplicate vertices to have normals and uvs both side of your mesh._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_This is why I just led you to this internal function doing the job _dd__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_blockquote data-ipsquote_eq__qt__qt_ class_eq__qt_ipsQuote_qt__gt__lt_div_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt__lt_em_gt__ComputeSides(sideOrientation_co_ positions_co_ indices_co_ normals_co_ uvs)_lt_/em_gt_ _dd_ re-computes vertex_co_ indices_co_ normals and uv arrays given a _lt_em_gt_sideOrientation_lt_/em_gt_value._lt_/p_gt__lt_p style_eq__qt_color_dd_rgb(40_co_40_co_40)_sm_font-family_dd_helvetica_co_ arial_co_ sans-serif_sm__qt__gt_This method will add the missing backside vertices_co_ faces_co_ normals and uvs for you if you want a double sided mesh._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_/div_gt__lt_/blockquote_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"NasimiAsl","Date":"2015-03-01T14:05:34Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_thanks all _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_i Submission and rewrite   objloader (objparser ) for babaylon js ( used  by threejs objloader _lt_a href_eq__qt_http_dd_//threejs.org/examples/js/loaders/OBJLoader.js_qt_ title_eq__qt_External link_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//threejs.org/e...rs/OBJLoader.js_lt_/a_gt_ )  let me refactor  that  i put it here._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_unbeautyfull code just for now create only geometry without material and normals_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_corrected lastUV    _lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_function def(a_co_ d) {    if (a !_eq_ undefined &amp_sm_&amp_sm_ a !_eq_ null) return (d !_eq_ undefined &amp_sm_&amp_sm_ def !_eq_ null ? a _dd_ true)_sm_    else        if (d !_eq_ _null)            return (d !_eq_ undefined &amp_sm_&amp_sm_ d !_eq_ null ? d _dd_ false)_sm_    return null_sm_}function n_1(ar) {    ar _eq_ def(ar_co_ [])_sm_    if (!def(ar.length)) return null_sm_    return ar[ar.length - 1]_sm_}objParse _eq_ function (text) {    var objects _eq_ []_sm_    var correctLastUVIndexer _eq_ 0_sm_    var uvsHelper _eq_ []_sm_    var geometry _eq_ null_sm_    var i0 _eq_ 0_sm_    function parseVertexIndex(index) {        index _eq_ parseInt(index)_sm_        return index &gt_sm__eq_ 0 ? index - 1 _dd_ index + vertices.length_sm_    }    function parseUVIndex(index) {        index _eq_ parseInt(index)_sm_        return index &gt_sm__eq_ 0 ? index - 1 _dd_ 1.0_sm_    }    function add_face(a_co_ b_co_ c_co_ uvs) {        a _eq_ parseVertexIndex(a - oldIndex)_sm_        b _eq_ parseVertexIndex(b - oldIndex)_sm_        c _eq_ parseVertexIndex(c - oldIndex)_sm_        if (def(n_1(objects).uvs[a * 2]) &amp_sm_&amp_sm_ n_1(objects).uvs[a * 2] !_eq_ uvsHelper[parseUVIndex(uvs[0])].x &amp_sm_&amp_sm_ n_1(objects).uvs[a * 2 + 1] !_eq_ uvsHelper[parseUVIndex(uvs[0])].y) {            correctLastUVIndexer++_sm_            a _eq_ $3d.tools.push1(n_1(objects)_co_ { x_dd_ parseFloat(n_1(objects).positions[a * 3])_co_ y_dd_ parseFloat(n_1(objects).positions[a * 3 + 1])_co_ z_dd_ parseFloat(n_1(objects).positions[a * 3 + 2]) }_co_ false)_sm_        }        if (def(n_1(objects).uvs[b * 2]) &amp_sm_&amp_sm_ n_1(objects).uvs[b * 2] !_eq_ uvsHelper[parseUVIndex(uvs[1])].x &amp_sm_&amp_sm_ n_1(objects).uvs[b * 2 + 1] !_eq_ uvsHelper[parseUVIndex(uvs[1])].y) {            b _eq_ $3d.tools.push1(n_1(objects)_co_ { x_dd_ parseFloat(n_1(objects).positions[b * 3])_co_ y_dd_ parseFloat(n_1(objects).positions[b * 3 + 1])_co_ z_dd_ parseFloat(n_1(objects).positions[b * 3 + 2]) }_co_ false)_sm_            correctLastUVIndexer++_sm_        }        if (def(n_1(objects).uvs[c * 2]) &amp_sm_&amp_sm_ n_1(objects).uvs[c * 2] !_eq_ uvsHelper[parseUVIndex(uvs[2])].x &amp_sm_&amp_sm_ n_1(objects).uvs[c * 2 + 1] !_eq_ uvsHelper[parseUVIndex(uvs[2])].y) {            c _eq_ $3d.tools.push1(n_1(objects)_co_ { x_dd_ parseFloat(n_1(objects).positions[c * 3])_co_ y_dd_ parseFloat(n_1(objects).positions[c * 3 + 1])_co_ z_dd_ parseFloat(n_1(objects).positions[c * 3 + 2]) }_co_ false)_sm_            correctLastUVIndexer++_sm_        }        $3d.tools.face3(n_1(objects)_co_            a_co_            b_co_            c_co_ { flip_dd_ !def(op.back_co_ false) }        )_sm_        if (!def(n_1(objects).uvs[a * 2]))            n_1(objects).uvs[a * 2] _eq_ uvsHelper[parseUVIndex(uvs[0])].x_sm_        if (!def(n_1(objects).uvs[a * 2 + 1]))            n_1(objects).uvs[a * 2 + 1] _eq_ uvsHelper[parseUVIndex(uvs[0])].y_sm_        if (!def(n_1(objects).uvs[b * 2]))            n_1(objects).uvs[b * 2] _eq_ uvsHelper[parseUVIndex(uvs[1])].x_sm_        if (!def(n_1(objects).uvs[b * 2 + 1]))            n_1(objects).uvs[b * 2 + 1] _eq_ uvsHelper[parseUVIndex(uvs[1])].y_sm_        if (!def(n_1(objects).uvs[c * 2]))            n_1(objects).uvs[c * 2] _eq_ uvsHelper[parseUVIndex(uvs[2])].x_sm_        if (!def(n_1(objects).uvs[c * 2 + 1]))            n_1(objects).uvs[c * 2 + 1] _eq_ uvsHelper[parseUVIndex(uvs[2])].y_sm_    }    function handle_face_line(faces_co_ uvs_co_ normals_inds) {        uvs _eq_ def(uvs_co_ [0_co_ 0_co_ 0_co_ 0])_sm_        if (faces[3] _eq__eq__eq_ undefined) {            add_face(faces[0]_co_ faces[1]_co_ faces[2]_co_ uvs)_sm_        } else {            add_face(faces[0]_co_ faces[1]_co_ faces[3]_co_ [uvs[0]_co_ uvs[1]_co_ uvs[3]])_sm_            add_face(faces[1]_co_ faces[2]_co_ faces[3]_co_ [uvs[1]_co_ uvs[2]_co_ uvs[3]])_sm_        }    }    // create mesh if no objects in text    if (/^o /gm.test(text) _eq__eq__eq_ false) {        geometry _eq_ $3d.tools.geometryBase()_sm_        objects.push(geometry)_sm_    }    // v float float float    var vertex_pattern _eq_ /v( +[\\d|\\.|\\+|\\-|e]+)( +[\\d|\\.|\\+|\\-|e]+)( +[\\d|\\.|\\+|\\-|e]+)/_sm_    // vn float float float    var normal_pattern _eq_ /vn( +[\\d|\\.|\\+|\\-|e]+)( +[\\d|\\.|\\+|\\-|e]+)( +[\\d|\\.|\\+|\\-|e]+)/_sm_    // vt float float    var uv_pattern _eq_ /vt( +[\\d|\\.|\\+|\\-|e]+)( +[\\d|\\.|\\+|\\-|e]+)/_sm_    // f vertex vertex vertex ...    var face_pattern1 _eq_ /f( +-?\\d+)( +-?\\d+)( +-?\\d+)( +-?\\d+)?/_sm_    // f vertex/uv vertex/uv vertex/uv ...    var face_pattern2 _eq_ /f( +(-?\\d+)\\/(-?\\d+))( +(-?\\d+)\\/(-?\\d+))( +(-?\\d+)\\/(-?\\d+))( +(-?\\d+)\\/(-?\\d+))?/_sm_    // f vertex/uv/normal vertex/uv/normal vertex/uv/normal ...    var face_pattern3 _eq_ /f( +(-?\\d+)\\/(-?\\d+)\\/(-?\\d+))( +(-?\\d+)\\/(-?\\d+)\\/(-?\\d+))( +(-?\\d+)\\/(-?\\d+)\\/(-?\\d+))( +(-?\\d+)\\/(-?\\d+)\\/(-?\\d+))?/_sm_    // f vertex//normal vertex//normal vertex//normal ...     var face_pattern4 _eq_ /f( +(-?\\d+)\\/\\/(-?\\d+))( +(-?\\d+)\\/\\/(-?\\d+))( +(-?\\d+)\\/\\/(-?\\d+))( +(-?\\d+)\\/\\/(-?\\d+))?/    //    var lines _eq_ text.split(_t_\\n_t_)_sm_    var oldIndex _eq_ 0_sm_    var oldLine _eq_ _t__t__sm_    var lastchar _eq_ _t__t__sm_    function newGeo() {        if (objects.length _eq__eq_ 0 || n_1(objects).vertices.length &gt_sm_ 0) {            oldIndex +_eq_ objects.length &gt_sm_ 0 ? n_1(objects).vertices.length - correctLastUVIndexer _dd_ 0_sm_            correctLastUVIndexer _eq_ 0_sm_            geometry _eq_ $3d.tools.geometryBase()_sm_            objects.push(geometry)_sm_        }    }    for (var i _eq_ 0_sm_ i &lt_sm_ lines.length_sm_ i++) {        var line _eq_ lines[i]_sm_        line _eq_ line.trim()_sm_        var result_sm_        if (line.length _eq__eq__eq_ 0 || line.charAt(0) _eq__eq__eq_ _t_#_t_) {            continue_sm_        } else if ((result _eq_ vertex_pattern.exec(line)) !_eq__eq_ null) {            // [_qt_v 1.0 2.0 3.0_qt__co_ _qt_1.0_qt__co_ _qt_2.0_qt__co_ _qt_3.0_qt_]            if (lastchar _eq__eq_ _t_g_t_)                newGeo()_sm_            $3d.tools.push1(n_1(objects)_co_ { x_dd_ -1 * result[1]_co_ y_dd_ result[2]_co_ z_dd_ result[3] }_co_ false)_sm_            lastchar _eq_ _t_v_t__sm_        } else if ((result _eq_ normal_pattern.exec(line)) !_eq__eq_ null) {            // [_qt_vn 1.0 2.0 3.0_qt__co_ _qt_1.0_qt__co_ _qt_2.0_qt__co_ _qt_3.0_qt_]            // normals.push({ x_dd_ result[1]_co_ y_dd_ result[2]_co_ z_dd_ result[3] })_sm_            lastchar _eq_ _t_n_t__sm_        } else if ((result _eq_ uv_pattern.exec(line)) !_eq__eq_ null) {            // [_qt_vt 0.1 0.2_qt__co_ _qt_0.1_qt__co_ _qt_0.2_qt_]            uvsHelper.push({ x_dd_ parseFloat(result[1])_co_ y_dd_ parseFloat(result[2]) })_sm_            // uvs.push({ x_dd_ result[1]_co_ y_dd_ result[2] })_sm_            lastchar _eq_ _t_t_t__sm_        } else if ((result _eq_ face_pattern1.exec(line)) !_eq__eq_ null) {            // [_qt_f 1 2 3_qt__co_ _qt_1_qt__co_ _qt_2_qt__co_ _qt_3_qt__co_ undefined]            handle_face_line(                [result[1]_co_ result[2]_co_ result[3]_co_ result[4]]            )_sm_            lastchar _eq_ _t_f_t__sm_        } else if ((result _eq_ face_pattern2.exec(line)) !_eq__eq_ null) {            // [_qt_f 1/1 2/2 3/3_qt__co_ _qt_ 1/1_qt__co_ _qt_1_qt__co_ _qt_1_qt__co_ _qt_ 2/2_qt__co_ _qt_2_qt__co_ _qt_2_qt__co_ _qt_ 3/3_qt__co_ _qt_3_qt__co_ _qt_3_qt__co_ undefined_co_ undefined_co_ undefined]            handle_face_line(                [result[2]_co_ result[5]_co_ result[8]_co_ result[11]]_co_ //faces                [result[3]_co_ result[6]_co_ result[9]_co_ result[12]] //uv            )_sm_            lastchar _eq_ _t_f_t__sm_        } else if ((result _eq_ face_pattern3.exec(line)) !_eq__eq_ null) {            // [_qt_f 1/1/1 2/2/2 3/3/3_qt__co_ _qt_ 1/1/1_qt__co_ _qt_1_qt__co_ _qt_1_qt__co_ _qt_1_qt__co_ _qt_ 2/2/2_qt__co_ _qt_2_qt__co_ _qt_2_qt__co_ _qt_2_qt__co_ _qt_ 3/3/3_qt__co_ _qt_3_qt__co_ _qt_3_qt__co_ _qt_3_qt__co_ undefined_co_ undefined_co_ undefined_co_ undefined]            handle_face_line(                [result[2]_co_ result[6]_co_ result[10]_co_ result[14]]_co_ //faces                [result[3]_co_ result[7]_co_ result[11]_co_ result[15]]_co_ //uv                [result[4]_co_ result[8]_co_ result[12]_co_ result[16]] //normal            )_sm_            lastchar _eq_ _t_f_t__sm_        } else if ((result _eq_ face_pattern4.exec(line)) !_eq__eq_ null) {            // [_qt_f 1//1 2//2 3//3_qt__co_ _qt_ 1//1_qt__co_ _qt_1_qt__co_ _qt_1_qt__co_ _qt_ 2//2_qt__co_ _qt_2_qt__co_ _qt_2_qt__co_ _qt_ 3//3_qt__co_ _qt_3_qt__co_ _qt_3_qt__co_ undefined_co_ undefined_co_ undefined]            handle_face_line(                [result[2]_co_ result[5]_co_ result[8]_co_ result[11]]_co_ //faces                []_co_ //uv                [result[3]_co_ result[6]_co_ result[9]_co_ result[12]] //normal            )_sm_            lastchar _eq_ _t_f_t__sm_        } else if (/^o /.test(line)) { // || /^g /.test(line)) {            if (line.replace(_t_o_t__co_ _t__t_).trim() !_eq_ _t_default_t_) {                oldLine _eq_ line.replace(_t_o_t__co_ _t__t_).trim()_sm_                if (oldLine !_eq_ _t__t_ &amp_sm_&amp_sm_ objects.length &gt_sm_ 0)                    n_1(objects).refname _eq_ oldLine_sm_            }            else oldLine _eq_ _t__t__sm_            newGeo()_sm_            lastchar _eq_ _t_o_t__sm_        }        else if (/^g /.test(line)) {            if (line.replace(_t_g_t__co_ _t__t_).trim() !_eq_ _t_default_t_) {                oldLine _eq_ line.replace(_t_g_t__co_ _t__t_).trim()_sm_                if (oldLine !_eq_ _t__t_ &amp_sm_&amp_sm_ objects.length &gt_sm_ 0)                    n_1(objects).refname _eq_ oldLine_sm_            }            else oldLine _eq_ _t__t__sm_            lastchar _eq_ _t_g_t__sm_        }        else if (/^usemtl /.test(line)) {            // material            // material.name _eq_ line.substring( 7 ).trim()_sm_            lastchar _eq_ _t_u_t__sm_        } else if (/^mtllib /.test(line)) {            // mtl file            lastchar _eq_ _t_m_t__sm_        } else if (/^s /.test(line)) {            // smooth shading             lastchar _eq_ _t_s_t__sm_        } else {            // console.log( _qt_THREE.OBJLoader_dd_ Unhandled line _qt_ + line )_sm_          }    }    return objects_sm_}///  $3d.tools.geometryBase() _dd_ you need initialize in again for yourself///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //geometryBase_dd_ function (firstp_co_ builder_co_ exgeo_co_ custom_co_ op) { //      var geo _eq_ { //          faces_dd_ []_co_ //          vertices_dd_ []_co_ //          normals_dd_ []_co_ //          positions_dd_ []_co_ //          uvs_dd_ [] //      }_sm_ // //      if (!exgeo) //          exgeo _eq_ geo_sm_ // //      if (builder) { //          builder(firstp_co_ exgeo)_sm_ //      } // //      if (custom) { //          exgeo _eq_ custom(exgeo)_sm_ //      } // //      return exgeo_sm_ //  }_co_ ///// ///  $3d.tools.push1 _eq_ push vertex match by custom engin just push a vertics array [{x_co_y_co_z}_co_..] and positions [x_co_y_co_x_co_..]////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// my push method //////////// push1_dd_ function (geo_co_ p1_co_ uv) {//  uv _eq_ def(uv_co_ true)_sm_//  geo.vertices.push(p1)_sm_ geo.positions.push(p1.x_co_ p1.y_co_ p1.z)_sm_//  if (uv) geo.uvs.push(0.0_co_ 0.0)_sm_//  return geo.vertices.length - 1_sm_//  }_co_////  $3d.tools.face3/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////  my push face method ////////////////////  face3_dd_ function (geo_co_ p1_co_ p2_co_ p3_co_ op) {//  if (!op) { op _eq_ {}_sm_ }//  function exch(p) { return (p.x || p.x _eq__eq_ 0.0)_sm_ }//  if (!op.uv) { op.uv _eq_ _qt_0123_qt__sm_ }//// if (def(op.noUV_co_ false)) op.uv _eq_ _qt_....._qt__sm_//function addUv(i) {//    if (op.uv[i].toString() _eq__eq_ _qt_0_qt_) geo.uvs.push(0.0_co_ 0.0)_sm_//    if (op.uv[i].toString() _eq__eq_ _qt_1_qt_) geo.uvs.push(0.0_co_ op.vp)_sm_//    if (op.uv[i].toString() _eq__eq_ _qt_2_qt_) geo.uvs.push(op.up_co_ 0.0)_sm_//}_sm_//if (!op.up) { op.up _eq_ 1.0_sm_ }//if (!op.vp) { op.vp _eq_ 1.0_sm_ }//if (exch(p1)) { geo.vertices.push(p1)_sm_ geo.positions.push(p1.x_co_ p1.y_co_ p1.z)_sm_ addUv(0)_sm_ op.p1Ind _eq_ geo.vertices.length - 1_sm_ }//if (exch(p2)) { geo.vertices.push(p2)_sm_ geo.positions.push(p2.x_co_ p2.y_co_ p2.z)_sm_ addUv(1)_sm_ op.p2Ind _eq_ geo.vertices.length - 1_sm_ }//if (exch(p3)) { geo.vertices.push(p3)_sm_ geo.positions.push(p3.x_co_ p3.y_co_ p3.z)_sm_ addUv(2)_sm_ op.p3Ind _eq_ geo.vertices.length - 1_sm_ }//if (op.p1Ind _eq__eq_ null || op.p1Ind _eq__eq_ undefined) op.p1Ind _eq_ p1_sm_//if (op.p2Ind _eq__eq_ null || op.p2Ind _eq__eq_ undefined) op.p2Ind _eq_ p2_sm_//if (op.p3Ind _eq__eq_ null || op.p3Ind _eq__eq_ undefined) op.p3Ind _eq_ p3_sm_//if (!def(isInOp)) {//    if (op.flip) {//        geo.faces.push(op.p1Ind_co_ op.p2Ind_co_ op.p3Ind)_sm_//    }//    else {//        geo.faces.push(op.p1Ind_co_ op.p3Ind_co_ op.p2Ind)_sm_//    }//}//else {//    if (op.flip) {//        if (isInOp.a &amp_sm_&amp_sm_ isInOp.b &amp_sm_&amp_sm_ isInOp.c) geo.faces.push(op.p1Ind_co_ op.p2Ind_co_ op.p3Ind)_sm_//    }//    else {//        if (isInOp.a &amp_sm_&amp_sm_ isInOp.c &amp_sm_&amp_sm_ isInOp. geo.faces.push(op.p1Ind_co_ op.p3Ind_co_ op.p2Ind)_sm_//    }//}//isInOp _eq_ null_sm_//return [op.p1Ind_co_ op.p2Ind_co_ op.p3Ind]_sm_//}_co__lt_/pre_gt__lt_p_gt__lt_a class_eq__qt_ipsAttachLink ipsAttachLink_image_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_03_2015/post-13038-0-86274400-1425220348.jpg_qt_ rel_eq__qt_external nofollow_qt__gt__lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_03_2015/post-13038-0-86274400-1425220348.jpg_qt_ data-fileid_eq__qt_3808_qt_ class_eq__qt_ipsImage ipsImage_thumbnailed_qt_ alt_eq__qt_post-13038-0-86274400-1425220348.jpg_qt__gt__lt_/a_gt__lt_/p_gt__lt_p_gt__lt_a class_eq__qt_ipsAttachLink ipsAttachLink_image_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_03_2015/post-13038-0-92754100-1425220349.jpg_qt_ rel_eq__qt_external nofollow_qt__gt__lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_03_2015/post-13038-0-92754100-1425220349.jpg_qt_ data-fileid_eq__qt_3809_qt_ class_eq__qt_ipsImage ipsImage_thumbnailed_qt_ alt_eq__qt_post-13038-0-92754100-1425220349.jpg_qt__gt__lt_/a_gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]