{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/c4846b2a6af38d273a873509b6154012?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c4846b2a6af38d273a873509b6154012","url":"https://api.github.com/users/hwilliam","login":"hwilliam","id":1022353},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-10-28T10:20:50Z","closed_at":null,"comments":0,"url":"https://api.github.com/repos/xeolabs/scenejs/issues/142","body":"Hello \r\n\r\nUsing scenejs 2.0. After many tries to move “transparent:true”, I don’t understand how to manage the it\r\n\r\nAttached a simple test using 2 boxes and a ground, the sequence of rendering is  box1, ground, box2. The alpha ground is 0.5, I should see a kind of reflection of box1 under the ground. But what’s ever the order of the objects and the ground alpha factor, I can’t see the box under the ground.  This code  works with  scenejs 0.8\r\n\r\nany change in 2.0 ? Any tips ? or ideas ? \r\n\r\n\r\nvar _Scene=/*open First brace*/\r\n\r\n   {\r\n   type:\t'scene',\r\n   id:\t'Scene',\r\n   canvasId:\t'theCanvas',\r\n   /*Open node prologue*/\r\n   nodes:\r\n   [\r\n\r\n\r\n         {\r\n         type:\t'library',\r\n         nodes:\r\n         [\r\n            /*Generate 3 material*/\r\n\r\n               {\r\n               coreId:\t'No Material-use-default-014',\r\n               type:\t'material',\r\n               baseColor:\t{r:0.588000 , g:0.588000 , b:0.588000 },\r\n               specularColor:\t{r:0.900000 , g:0.900000 , b:0.900000 },\r\n               shine:\t10.000000,\r\n               emit:\t0.000000,\r\n               specular:\t0.000000,\r\n               },\r\n\r\n               {\r\n               coreId:\t'01 - Default',\r\n               type:\t'material',\r\n               baseColor:\t{r:0.235294 , g:0.949020 , b:0.384314 },\r\n               specularColor:\t{r:0.900000 , g:0.900000 , b:0.900000 },\r\n               shine:\t9.999999,\r\n               emit:\t0.000000,\r\n               specular:\t0.000000,\r\n               alpha:\t0.500000,\r\n\t\t\t   flags:{transparent:true},\r\n\t\t\t   \r\n               },\r\n\r\n               {\r\n               coreId:\t'No Material-use-default-015',\r\n               type:\t'material',\r\n               baseColor:\t{r:0.588000 , g:0.588000 , b:0.588000 },\r\n               specularColor:\t{r:0.900000 , g:0.900000 , b:0.900000 },\r\n               shine:\t10.000000,\r\n               emit:\t0.000000,\r\n               specular:\t0.000000,\r\n               },\r\n            /*Generate 0 Texture*/\r\n            /*Generate 3 Geometry*/\r\n\r\n               {\r\n               coreId:\t'geom_2CBECB80',\r\n               type:\t'geometry',\r\n               primitive:\t'triangles',\r\n               positions:[-4.5218,-5.1296,0.0000,-4.5218,5.1296,0.0000,4.5218,5.1296,0.0000,4.5218,-5.1296,0.0000,-4.5218,-5.1296,23.9300,4.5218,-5.1296,23.9300,4.5218,5.1296,23.9300,-4.5218,5.1296,23.9300,-4.5218,-5.1296,0.0000,4.5218,-5.1296,0.0000,4.5218,-5.1296,23.9300,-4.5218,-5.1296,23.9300,4.5218,5.1296,0.0000,4.5218,-5.1296,23.9300,4.5218,5.1296,0.0000,-4.5218,5.1296,0.0000,-4.5218,5.1296,23.9300,4.5218,5.1296,23.9300,-4.5218,5.1296,0.0000,-4.5218,-5.1296,23.9300],\r\n               normals:[0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000],\r\n               indices:[0,1,2,2,3,0,4,5,6,6,7,4,8,9,10,10,11,8,3,12,6,6,13,3,14,15,16,16,17,14,18,0,19,19,7,18],\r\n               uv:[1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,0.0000,0.0000,1.0000,1.0000],\r\n               },\r\n\r\n               {\r\n               coreId:\t'geom_19461D48',\r\n               type:\t'geometry',\r\n               primitive:\t'triangles',\r\n               positions:[-29.9236,-80.8360,0.0000,-14.9618,-80.8360,0.0000,-14.9618,-40.4180,0.0000,-29.9236,-40.4180,0.0000,0.0000,-80.8360,0.0000,0.0000,-40.4180,0.0000,14.9618,-80.8360,0.0000,14.9618,-40.4180,0.0000,29.9236,-80.8360,0.0000,29.9236,-40.4180,0.0000,-14.9618,0.0000,0.0000,-29.9236,0.0000,0.0000,-0.0000,0.0000,0.0000,14.9618,0.0000,0.0000,29.9236,0.0000,0.0000,-14.9618,40.4180,0.0000,-29.9236,40.4180,0.0000,-0.0000,40.4180,0.0000,14.9618,40.4180,0.0000,29.9236,40.4180,0.0000,-14.9618,80.8360,0.0000,-29.9236,80.8360,0.0000,0.0000,80.8360,0.0000,14.9618,80.8360,0.0000,29.9236,80.8360,0.0000,-44.8853,-121.2540,0.0000,-29.9236,-121.2540,0.0000,-44.8853,-80.8360,0.0000,44.8853,-80.8360,0.0000,29.9236,-121.2540,0.0000,44.8853,-121.2540,0.0000,44.8853,121.2540,0.0000,29.9236,121.2540,0.0000,44.8853,80.8360,0.0000,-44.8853,80.8360,0.0000,-29.9236,121.2540,0.0000,-44.8853,121.2540,0.0000,-14.9618,-121.2540,0.0000,44.8853,-40.4180,0.0000,14.9618,121.2540,0.0000,-44.8853,40.4180,0.0000,-0.0000,-121.2540,0.0000,44.8853,0.0000,0.0000,0.0000,121.2540,0.0000,-44.8853,0.0000,0.0000,14.9618,-121.2540,0.0000,44.8853,40.4180,0.0000,-14.9618,121.2540,0.0000,-44.8853,-40.4180,0.0000],\r\n               normals:[0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000],\r\n               indices:[0,1,2,2,3,0,1,4,5,5,2,1,4,6,7,7,5,4,6,8,9,9,7,6,3,2,10,10,11,3,2,5,12,12,10,2,5,7,13,13,12,5,7,9,14,14,13,7,11,10,15,15,16,11,10,12,17,17,15,10,12,13,18,18,17,12,13,14,19,19,18,13,16,15,20,20,21,16,15,17,22,22,20,15,17,18,23,23,22,17,18,19,24,24,23,18,25,26,0,0,27,25,28,8,29,29,30,28,31,32,24,24,33,31,34,21,35,35,36,34,26,37,1,1,0,26,38,9,8,8,28,38,32,39,23,23,24,32,40,16,21,21,34,40,37,41,4,4,1,37,42,14,9,9,38,42,39,43,22,22,23,39,44,11,16,16,40,44,41,45,6,6,4,41,46,19,14,14,42,46,43,47,20,20,22,43,48,3,11,11,44,48,45,29,8,8,6,45,33,24,19,19,46,33,47,35,21,21,20,47,27,0,3,3,48,27],\r\n               uv:[0.1667,0.1667,0.3333,0.1667,0.3333,0.3333,0.1667,0.3333,0.5000,0.1667,0.5000,0.3333,0.6667,0.1667,0.6667,0.3333,0.8333,0.1667,0.8333,0.3333,0.3333,0.5000,0.1667,0.5000,0.5000,0.5000,0.6667,0.5000,0.8333,0.5000,0.3333,0.6667,0.1667,0.6667,0.5000,0.6667,0.6667,0.6667,0.8333,0.6667,0.3333,0.8333,0.1667,0.8333,0.5000,0.8333,0.6667,0.8333,0.8333,0.8333,0.0000,0.0000,0.1667,0.0000,0.0000,0.1667,1.0000,0.1667,0.8333,0.0000,1.0000,0.0000,1.0000,1.0000,0.8333,1.0000,1.0000,0.8333,0.0000,0.8333,0.1667,1.0000,0.0000,1.0000,0.3333,0.0000,1.0000,0.3333,0.6667,1.0000,0.0000,0.6667,0.5000,0.0000,1.0000,0.5000,0.5000,1.0000,0.0000,0.5000,0.6667,0.0000,1.0000,0.6667,0.3333,1.0000,0.0000,0.3333],\r\n               },\r\n\r\n               {\r\n               coreId:\t'geom_2CC0B6C0',\r\n               type:\t'geometry',\r\n               primitive:\t'triangles',\r\n               positions:[-4.5218,-5.1296,0.0000,-4.5218,5.1296,0.0000,4.5218,5.1296,0.0000,4.5218,-5.1296,0.0000,-4.5218,-5.1296,23.9300,4.5218,-5.1296,23.9300,4.5218,5.1296,23.9300,-4.5218,5.1296,23.9300,-4.5218,-5.1296,0.0000,4.5218,-5.1296,0.0000,4.5218,-5.1296,23.9300,-4.5218,-5.1296,23.9300,4.5218,5.1296,0.0000,4.5218,-5.1296,23.9300,4.5218,5.1296,0.0000,-4.5218,5.1296,0.0000,-4.5218,5.1296,23.9300,4.5218,5.1296,23.9300,-4.5218,5.1296,0.0000,-4.5218,-5.1296,23.9300],\r\n               normals:[0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,-1.0000,0.0000,0.0000,1.0000],\r\n               indices:[0,1,2,2,3,0,4,5,6,6,7,4,8,9,10,10,11,8,3,12,6,6,13,3,14,15,16,16,17,14,18,0,19,19,7,18],\r\n               uv:[1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,1.0000,0.0000,0.0000,1.0000,0.0000,0.0000,1.0000,0.0000,1.0000,1.0000,0.0000,1.0000,0.0000,0.0000,1.0000,1.0000],\r\n               },\r\n            ],\r\n         },\r\n      /*Begin root object*/\r\n\r\n         {\r\n         nodes:\r\n         [\r\n\r\n               {\r\n               type:\t'flags',\r\n                  flags:\r\n                  {\r\n                  transparent:\ttrue,\r\n                  backfaces:\ttrue,\r\n                  enabled:\ttrue,\r\n                  },\r\n               nodes:\r\n               [\r\n\r\n                     {\r\n                     type:\t'renderer',\r\n                     enableCullFace:\ttrue,\r\n                        clear:\r\n                        {\r\n                        color:\ttrue,\r\n                        depth:\ttrue,\r\n                        },\r\n                        clearColor:\r\n                        {\r\n                        r:\t0.000000,\r\n                        g:\t0.000000,\r\n                        b:\t0.000000,\r\n                        },\r\n                     nodes:\r\n                     [\r\n\r\n                           {\r\n                           /*Open camera prologue*/\r\n                           type:\t'lookAt',\r\n                           eye:\t{x:-7.437860,y:-75.972046,z:53.947372},\r\n                           look:\t{x:-7.272458,y:-75.127327,z:53.438358},\r\n                           up:\t{x:0.097811,y:0.499527,z:0.860759},\r\n                           nodes:\r\n                           [\r\n\r\n                                 {\r\n                                 id:\t'Camera001',\r\n                                 type:\t'camera',\r\n                                    optics:\r\n                                    {\r\n                                    type:\t'perspective',\r\n                                    fovy:\t45.000000,\r\n                                    aspect :\t1.333333,\r\n                                    near:\t0.000000,\r\n                                    far:\t1000.000000,\r\n                                    },\r\n                                 /*Open the scene encapsulation*/\r\n                                 nodes:\r\n                                 [\r\n\r\n                                       {\r\n                                       type:\t'light',\r\n                                       mode:\t'point',\r\n                                       color:\t{r:1.000000 , g:1.000000 , b:1.000000 },\r\n                                       diffuse:\ttrue,\r\n                                       specular:\ttrue,\r\n                                       constantAttenuation:\t1.000000,\r\n                                       linearAttenuation:\t0.0,\r\n                                       pos:\t{x:-7.896260,y:-62.305199,z:141.669601},\r\n                                       },\r\n\r\n                                       {\r\n                                       type:\t'light',\r\n                                       mode:\t'point',\r\n                                       color:\t{r:1.000000 , g:1.000000 , b:1.000000 },\r\n                                       diffuse:\ttrue,\r\n                                       specular:\ttrue,\r\n                                       constantAttenuation:\t1.000000,\r\n                                       linearAttenuation:\t0.0,\r\n                                       pos:\t{x:-7.954369,y:-79.310524,z:46.700943},\r\n                                       },\r\n\r\n                                       {\r\n                                       id:\t'Box001',\r\n                                       type:\t'matrix',\r\n                                       elements:\t[1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,-0.189491,9.072725,23.053909,1.000000],\r\n                                       nodes:\r\n                                       [\r\n\r\n                                             {\r\n                                             type:\t'material',\r\n                                             coreId:\t'No Material-use-default-014',\r\n                                             nodes:\r\n                                             [\r\n\r\n                                                   {\r\n                                                   type:\t'geometry',\r\n                                                   coreId:\t'geom_2CBECB80',\r\n                                                   },\r\n                                                ],\r\n                                             },\r\n                                          ],\r\n                                       /*Closed  node  Box001 */\r\n                                       },\r\n\r\n                                       {\r\n                                       id:\t'QuadPatch001',\r\n                                       type:\t'matrix',\r\n                                       elements:\t[3.657845,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,-27.442038,44.402275,0.000000,1.000000],\r\n\t\t\t\t\t\t\t\t\t\tnodes:[{\r\n\t\t\t\t\t\t\t\t\t\tflags:{transparent:true},\r\n\t\t\t\t\t\t\t\t\t   \r\n                                       nodes:\r\n                                       [\r\n\r\n                                             {\r\n                                             type:\t'material',\r\n                                             coreId:\t'01 - Default',\r\n                                             nodes:\r\n                                             [\r\n\r\n                                                   {\r\n                                                   type:\t'geometry',\r\n                                                   coreId:\t'geom_19461D48',\r\n                                                   },\r\n                                                ],\r\n                                             },\r\n                                          ],\r\n\t\t\t\t\t\t\t\t\t\t}],\r\n                                       /*Closed  node  QuadPatch001 */\r\n                                       },\r\n                                    /*  User property buffer LastPose = undefined  */\r\n\r\n                                       {\r\n                                       id:\t'Box002',\r\n                                       type:\t'matrix',\r\n                                       elements:\t[1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,-0.189491,9.072725,-41.781898,1.000000],\r\n                                       nodes:\r\n                                       [\r\n\r\n                                             {\r\n                                             type:\t'material',\r\n                                             coreId:\t'No Material-use-default-015',\r\n                                             nodes:\r\n                                             [\r\n\r\n                                                   {\r\n                                                   type:\t'geometry',\r\n                                                   coreId:\t'geom_2CC0B6C0',\r\n                                                   },\r\n                                                ],\r\n                                             },\r\n                                          ],\r\n                                       /*Closed  node  Box002 */\r\n                                       },\r\n                                    ],\r\n                                 /*Closed the scene encapsulation*/\r\n                                 },\r\n                              ],\r\n                           /*Closed camera prologue*/\r\n                           },\r\n                        ],\r\n                     },\r\n                  ],\r\n               /*End of of Block flags */\r\n               },\r\n            ],\r\n         },\r\n      /*Closed Root Object*/\r\n      ],\r\n   };\r\n   /*closed first brace*/\r\n\r\n   myscene = SceneJS.createScene(_Scene);\r\n   myscene.start();\r\n\r\n","html_url":"https://github.com/xeolabs/scenejs/issues/142","number":142,"title":"transparency broken ? ","id":2077294,"created_at":"2011-10-28T10:20:50Z"},"action":"opened"}