makugym

Members
  • Content Count

    9
  • Joined

  • Last visited

About makugym

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. makugym

    Change colour - shape from blender

    Thanks bro, everything works! @gryff I needed change diffuse by newScene.meshes[0].material.diffuseColor.b = 1; Btw I'm doing Engineering Thesis about led cube 4x4x4. Cube is controlled by JS framework - Johnny Five and connect with computer by serial port. I must show on the screen the same what is displayed on cube and i think that babylon can be the best way to do this. @Lynxerious Thank you for help too
  2. makugym

    Change colour - shape from blender

    Now I'm trying to change color of the monkey. I downloaded io_export_babylon.py from https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/Blender - i found this in tutorial. Where can I download the latest version? This is my green monkey and value color in RGB (field diffuse) In my code the same value is named as ambient. Why in Blender the same value is named as diffuse? {"producer":{"name":"Blender","version":"2.78 (sub 0)","exporter_version":"4.6.1","file":"untitled.babylon"}, "autoClear":true,"clearColor":[0.0509,0.0509,0.0509],"ambientColor":[0,0,0],"gravity":[0,-9.81,0], "materials":[{"name":"untitled.Material.002","id":"untitled.Material.002","ambient":[0.0503,1,0.0472],"diffuse":[0.0402,0.8,0.0378],"specular":[0.5,0.5,0.5],"emissive":[0,0,0],"specularPower":50,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false}, {"name":"untitled.Material.001","id":"untitled.Material.001","ambient":[0.9,0.8,0.2341],"diffuse":[0.72,0.64,0.1873],"specular":[0.5,0.5,0.5],"emissive":[0,0,0],"specularPower":50,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false}], "multiMaterials":[], "skeletons":[], "meshes":[{"name":"Suzanne","id":"Suzanne","materialId":"untitled.Material.002","billboardMode":0,"position":[1.3255,2.1598,4.7749],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[0.4688,0.2422,-0.7578,0.5,0.0938,-0.6875,0.5625,0.2422,-0.6719,-0.5,0.0938,-0.6875,-0.4688,0.2422,-0.7578,-0.5625,0.2422,-0.6719,0.5469,0.0547,-0.5781,0.625,0.2422,-0.5625,-0.5469,0.0547,-0.5781,-0.625,0.2422,-0.5625,0.3516,-0.0234,-0.6172,-0.3516,-0.0234,-0.6172,0.4375,0.1641,-0.7656,0.3516,0.0312,-0.7188,-0.3516,0.0312,-0.7188,-0.4375,0.1641,-0.7656,0.3516,0.1328,-0.7812,0.2031,0.0938,-0.7422,-0.2031,0.0938,-0.7422,-0.3516,0.1328,-0.7812,0.1562,0.0547,-0.6484,-0.1562,0.0547,-0.6484,0.1406,0.2422,-0.7422,-0.1406,0.2422,-0.7422,-0.0781,0.2422,-0.6562,0.2734,0.1641,-0.7969,-0.2734,0.1641,-0.7969,0.2422,0.2422,-0.7969,0.2031,0.3906,-0.7422,-0.2031,0.3906,-0.7422,-0.2422,0.2422,-0.7969,0.0781,0.2422,-0.6562,-0.1562,0.4375,-0.6484,0.3516,0.4531,-0.7188,0.1562,0.4375,-0.6484,-0.3516,0.4531,-0.7188,-0.3516,0.5156,-0.6172,0.3516,0.3594,-0.7812,0.2734,0.3281,-0.7969,-0.3516,0.3594,-0.7812,0.4375,0.3281,-0.7656,-0.4375,0.3281,-0.7656,-0.5,0.3906,-0.6875,0.5,0.3906,-0.6875,0.3516,0.5156,-0.6172,-0.5469,0.4375,-0.5781,0.5469,0.4375,-0.5781,0.4766,0.2422,-0.7734,-0.4766,0.2422,-0.7734,-0.4453,0.3359,-0.7812,0.4453,0.3359,-0.7812,-0.3516,0.375,-0.8047,0.3516,0.375,-0.8047,-0.2734,0.3281,-0.7969,-0.2656,0.3359,-0.8203,0.2656,0.3359,-0.8203,-0.2266,0.2422,-0.8203,0.2656,0.1562,-0.8203,0.2266,0.2422,-0.8203,-0.2656,0.1562,-0.8203,0.3516,0.1172,-0.8047,-0.3516,0.1172,-0.8047,0.4453,0.1562,-0.7812,-0.4453,0.1562,-0.7812,0.3516,0.2422,-0.8281,-0.3516,0.2422,-0.8281,0.1641,-0.9297,-0.6328,0,-0.9844,-0.5781,0.1797,-0.9688,-0.5547,-0.1641,-0.9297,-0.6328,0,-0.9453,-0.6406,0.2344,-0.9141,-0.6328,0.3281,-0.9453,-0.5234,-0.2344,-0.9141,-0.6328,-0.1797,-0.9688,-0.5547,0.3672,-0.8906,-0.5312,-0.3672,-0.8906,-0.5312,-0.3281,-0.9453,-0.5234,0.3516,-0.6953,-0.5703,0.2656,-0.8203,-0.6641,-0.2656,-0.8203,-0.6641,-0.3516,-0.6953,-0.5703,0.3125,-0.4375,-0.5703,0.25,-0.7031,-0.6875,-0.25,-0.7031,-0.6875,-0.3125,-0.4375,-0.5703,0.2031,-0.1875,-0.5625,0.3984,-0.0469,-0.6719,0.125,-0.1016,-0.8125,-0.3984,-0.0469,-0.6719,-0.2031,-0.1875,-0.5625,-0.125,-0.1016,-0.8125,0.6328,-0.0391,-0.5391,0.4375,-0.1406,-0.5312,-0.6328,-0.0391,-0.5391,-0.6172,0.0547,-0.625,0.7266,0.2031,-0.6016,0.6172,0.0547,-0.625,-0.7266,0.2031,-0.6016,0.8594,0.4297,-0.5938,0.8281,0.1484,-0.4453,-0.8594,0.4297,-0.5938,-0.7422,0.375,-0.6562,0.7109,0.4844,-0.625,0.7422,0.375,-0.6562,-0.7109,0.4844,-0.625,-0.6875,0.4141,-0.7266,0.4922,0.6016,-0.6875,0.6875,0.4141,-0.7266,-0.4922,0.6016,-0.6875,-0.4375,0.5469,-0.7969,0.3125,0.6406,-0.8359,0.4375,0.5469,-0.7969,-0.3125,0.6406,-0.8359,0.1562,0.7188,-0.7578,0.3203,0.7578,-0.7344,-0.1562,0.7188,-0.7578,-0.2031,0.6172,-0.8516,0.0625,0.4922,-0.75,0.2031,0.6172,-0.8516,-0.0625,0.4922,-0.75,-0.1016,0.4297,-0.8438,0,0.4297,-0.7422,0.1016,0.4297,-0.8438,0,0.3516,-0.8203,0.25,0.4688,-0.7578,0.1641,0.4141,-0.7734,-0.25,0.4688,-0.7578,0.3281,0.4766,-0.7422,0.4297,0.4375,-0.7188,-0.3281,0.4766,-0.7422,0.6016,0.375,-0.6641,-0.4297,0.4375,-0.7188,0.6406,0.2969,-0.6484,-0.6016,0.375,-0.6641,0.625,0.1875,-0.6484,-0.6406,0.2969,-0.6484,0.4922,0.0625,-0.6719,-0.625,0.1875,-0.6484,0.375,0.0156,-0.7031,-0.4922,0.0625,-0.6719,0.2031,0.0938,-0.7422,-0.375,0.0156,-0.7031,0,0.0469,-0.7266,-0.2031,0.0938,-0.7422,0.125,0.3047,-0.7656,-0.125,0.3047,-0.7656,0,0.2109,-0.7656,0.1328,0.2109,-0.7578,-0.1328,0.2109,-0.7578,0.1641,0.1406,-0.75,-0.1641,0.1406,-0.75,0.0625,-0.8828,-0.6953,-0.0625,-0.8828,-0.6953,0.1172,-0.8359,-0.7109,-0.1172,-0.8359,-0.7109,0.1094,-0.7188,-0.7344,0.2109,-0.4453,-0.7109,0.1172,-0.6875,-0.7344,-0.1172,-0.6875,-0.7344,-0.2109,-0.4453,-0.7109,-0.1094,-0.7188,-0.7344,0,-0.3281,-0.7422,0.0781,-0.4453,-0.75,0.0859,-0.2891,-0.7422,-0.0781,-0.4453,-0.75,0,-0.4453,-0.75,0,-0.6797,-0.7344,0,-0.7656,-0.7344,0.125,-0.2266,-0.75,0.0938,-0.2734,-0.7812,-0.0938,-0.2734,-0.7812,-0.125,-0.2266,-0.75,-0.0859,-0.2891,-0.7422,0.1016,-0.1484,-0.7422,0.1328,-0.2266,-0.7969,-0.1328,-0.2266,-0.7969,-0.1016,-0.1484,-0.7422,0.0391,-0.125,-0.7812,0,-0.1406,-0.7422,-0.0391,-0.125,-0.7812,-0.1094,-0.1328,-0.7812,0,-0.1875,-0.7969,0,-0.1953,-0.75,0,-0.3203,-0.7812,0,-0.2891,-0.8047,-0.0781,-0.25,-0.8047,0.0469,-0.1484,-0.8125,-0.0469,-0.1484,-0.8125,0.0938,-0.1562,-0.8125,0.1094,-0.1328,-0.7812,-0.0938,-0.1562,-0.8125,-0.1094,-0.2266,-0.8281,0.0781,-0.25,-0.8047,0.1094,-0.2266,-0.8281,0,-0.2031,-0.8281,0.1641,-0.2422,-0.7109,-0.1641,-0.2422,-0.7109,-0.1797,-0.3125,-0.7109,0.1797,-0.3125,-0.7109,0.2578,-0.3125,-0.5547,-0.2578,-0.3125,-0.5547,0.2344,-0.25,-0.5547,-0.2344,-0.25,-0.5547,0.0938,-0.7422,-0.7266,-0.0938,-0.7422,-0.7266,0,-0.7734,-0.7188,0.0938,-0.8203,-0.7109,-0.0938,-0.8203,-0.7109,0.0469,-0.8672,-0.6875,-0.0469,-0.8672,-0.6875,0,-0.8906,-0.6875,0,-0.875,-0.6875,0,-0.8594,-0.6328,-0.0469,-0.8516,-0.6328,0.0938,-0.8125,-0.6406,0.0469,-0.8516,-0.6328,-0.0938,-0.8125,-0.6406,0.0938,-0.75,-0.6641,-0.0938,-0.75,-0.6641,0,-0.7812,-0.6562,0.1875,0.1562,-0.7734,0.1719,0.2188,-0.7812,-0.1875,0.1562,-0.7734,-0.1719,0.2188,-0.7812,0.1797,0.2969,-0.7812,-0.1797,0.2969,-0.7812,0.2109,0.375,-0.7812,-0.2109,0.375,-0.7812,-0.2266,0.1094,-0.7812,0.375,0.0625,-0.7422,0.2266,0.1094,-0.7812,-0.375,0.0625,-0.7422,0.4766,0.1016,-0.7188,-0.4766,0.1016,-0.7188,0.5781,0.1953,-0.6797,-0.5781,0.1953,-0.6797,0.5859,0.2891,-0.6875,-0.5859,0.2891,-0.6875,-0.5625,0.3516,-0.6953,0.5625,0.3516,-0.6953,-0.4219,0.3984,-0.7734,0.3359,0.4297,-0.7578,0.4219,0.3984,-0.7734,-0.3359,0.4297,-0.7578,0.2734,0.4219,-0.7734,-0.2734,0.4219,-0.7734,0.2812,0.3984,-0.7656,-0.2812,0.3984,-0.7656,-0.2344,0.3594,-0.7578,0.3359,0.4062,-0.75,-0.3359,0.4062,-0.75,0.4141,0.3906,-0.75,-0.4141,0.3906,-0.75,0.5312,0.3359,-0.6797,-0.5312,0.3359,-0.6797,0.5547,0.2812,-0.6719,-0.5547,0.2812,-0.6719,0.5469,0.2109,-0.6719,-0.5469,0.2109,-0.6719,0.4609,0.1172,-0.7031,-0.4609,0.1172,-0.7031,0.375,0.0859,-0.7266,-0.375,0.0859,-0.7266,0.2422,0.125,-0.7578,-0.2422,0.125,-0.7578,0.2031,0.1719,-0.75,-0.2031,0.1719,-0.75,0.1953,0.2969,-0.7578,0.2344,0.3594,-0.7578,-0.1953,0.2969,-0.7578,0.1953,0.2266,-0.75,-0.1953,0.2266,-0.75,0.1094,0.4609,-0.6094,0,0.4062,-0.6016,-0.1094,0.4609,-0.6094,0.1953,0.6641,-0.6172,-0.1953,0.6641,-0.6172,-0.3203,0.7578,-0.7344,-0.3359,0.6875,-0.5938,0.3359,0.6875,-0.5938,-0.4844,0.5547,-0.5547,0.4844,0.5547,-0.5547,-0.6797,0.4531,-0.4922,0.7969,0.4062,-0.4609,0.6797,0.4531,-0.4922,-0.7969,0.4062,-0.4609,-0.8281,0.1484,-0.4453,-0.7734,0.1641,-0.375,0.6016,0,-0.4141,0.7734,0.1641,-0.375,-0.6016,0,-0.4141,0.4375,-0.0938,-0.4688,-0.4375,-0.0938,-0.4688,0,-0.4844,-0.2812,0.125,-0.5391,-0.3594,0,-0.5703,-0.3203,-0.125,-0.5391,-0.3594,-0.1797,-0.4141,-0.2578,0.1406,-0.7578,-0.3672,0,-0.8047,-0.3438,-0.1406,-0.7578,-0.3672,0.1641,-0.9453,-0.4375,0,-0.9766,-0.4609,-0.1641,-0.9453,-0.4375,0.3281,-0.9141,-0.3984,-0.3281,-0.9141,-0.3984,0.2891,-0.7109,-0.3828,-0.2891,-0.7109,-0.3828,0.25,-0.5,-0.3906,-0.25,-0.5,-0.3906,0.1797,-0.4141,-0.2578,0.2344,-0.3516,-0.4062,-0.2344,-0.3516,-0.4062,0.2188,-0.2812,-0.4297,-0.2188,-0.2812,-0.4297,-0.2109,-0.2266,-0.4688,0.2031,-0.1719,-0.5,-0.2031,-0.1719,-0.5,-0.4375,-0.1406,-0.5312,0.3359,0.0547,0.6641,0,-0.1953,0.6719,0,0.0703,0.8281,-0.3359,0.0547,0.6641,-0.3438,-0.1484,0.5391,0.3438,-0.1484,0.5391,0,-0.3828,0.3516,-0.2969,-0.3125,0.2656,0.2109,-0.3906,-0.1641,0,-0.4609,-0.1875,-0.2109,-0.3906,-0.1641,0.7344,-0.0469,-0.0703,0.8516,0.2344,-0.0547,-0.7344,-0.0469,-0.0703,-0.8516,0.2344,-0.0547,0.4609,0.4375,0.7031,0,0.5625,0.8516,-0.4609,0.4375,0.7031,0.4531,0.8516,-0.2344,0,0.9844,0.0781,0,0.8984,-0.2891,-0.4531,0.8516,-0.2344,-0.4531,0.9297,0.0703,0.4531,0.8672,0.3828,0,0.8984,0.5469,-0.4531,0.8672,0.3828,0.7266,0.4062,-0.3359,0.6328,0.4531,-0.2812,-0.7266,0.4062,-0.3359,-0.6328,0.4531,-0.2812,0.7969,0.5625,-0.125,0.6406,0.7031,-0.0547,-0.7969,0.5625,-0.125,-0.6406,0.7031,-0.0547,0.7969,0.6172,0.1172,0.6406,0.75,0.1953,-0.7969,0.6172,0.1172,-0.6406,0.75,0.1953,0.7969,0.5391,0.3594,0.6406,0.6797,0.4453,-0.7969,0.5391,0.3594,-0.6406,0.6797,0.4453,0.6172,0.3281,0.5859,0.7734,0.2656,0.4375,-0.6172,0.3281,0.5859,0.4531,0.9297,0.0703,0.4609,0.5234,-0.4297,-0.4609,0.5234,-0.4297,0,0.5703,-0.5703,0.8594,0.3203,0.0469,-0.8594,0.3203,0.0469,0.8203,0.3281,0.2031,-0.8203,0.3281,0.2031,0.2969,-0.3125,0.2656,0.4062,-0.1719,-0.1484,-0.4062,-0.1719,-0.1484,-0.4297,-0.1953,0.2109,0.5938,-0.125,0.1641,-0.5938,-0.125,0.1641,0.2109,-0.2266,-0.4688,0.6406,-0.0078,0.4297,-0.6406,-0.0078,0.4297,-0.4844,0.0234,0.5469,0.4297,-0.1953,0.2109,0.4844,0.0234,0.5469,0.8906,0.4062,0.2344,1.0156,0.4141,0.2891,1.0234,0.4766,0.3125,-0.8906,0.4062,0.2344,-1.0156,0.4141,0.2891,-0.9219,0.3594,0.2188,1.1875,0.4375,0.3906,1.2344,0.5078,0.4219,-1.1875,0.4375,0.3906,-1.0234,0.4766,0.3125,-1.2344,0.5078,0.4219,1.3516,0.3203,0.4219,-1.3516,0.3203,0.4219,-1.2656,0.2891,0.4062,1.2656,0.2891,0.4062,1.2812,0.0547,0.4297,-1.2812,0.0547,0.4297,-1.2109,0.0781,0.4062,1.2109,0.0781,0.4062,1.0391,-0.1016,0.3281,-1.0391,-0.1016,0.3281,-1.0312,-0.0391,0.3047,0.8281,-0.0703,0.1328,0.7734,-0.1406,0.125,-0.8281,-0.0703,0.1328,-0.7734,-0.1406,0.125,1.0312,-0.0391,0.3047,0.8828,-0.0234,0.2109,-0.8828,-0.0234,0.2109,1.0391,0,0.3672,-1.0391,0,0.3672,1.2344,0.25,0.4453,-1.2344,0.25,0.4453,-1.1875,0.0938,0.4453,1.1719,0.3594,0.4375,-1.1719,0.3594,0.4375,1.0234,0.3438,0.3594,-1.0234,0.3438,0.3594,0.9453,0.3047,0.2891,-0.9453,0.3047,0.2891,0.7266,0,0.0703,-0.7266,0,0.0703,-0.7188,-0.0234,0.1719,0.7188,-0.0234,0.1719,0.9219,0.3594,0.2188,0.8125,-0.0156,0.2734,-0.8125,-0.0156,0.2734,0.7188,0.0391,0.1875,0.8438,0.0156,0.2734,-0.7188,0.0391,0.1875,0.7578,0.0938,0.2734,0.8203,0.0859,0.2734,-0.8438,0.0156,0.2734,-0.7578,0.0938,0.2734,-0.8203,0.0859,0.2734,0.7969,0.2031,0.2109,0.8359,0.1719,0.2734,-0.7969,0.2031,0.2109,0.8906,0.2422,0.2656,0.8438,0.2891,0.2109,-0.8906,0.2422,0.2656,-0.8359,0.1719,0.2734,-0.8438,0.2891,0.2109,0.8906,0.2344,0.3203,0.9531,0.2891,0.3438,-0.8906,0.2344,0.3203,-0.9531,0.2891,0.3438,-0.8438,0.1719,0.3203,0.7656,0.0938,0.3203,0.8438,0.1719,0.3203,-0.7656,0.0938,0.3203,-0.8281,0.0781,0.3203,0.8281,0.0781,0.3203,-0.8516,0.0156,0.3203,0.8125,-0.0156,0.3203,0.8516,0.0156,0.3203,-0.8125,-0.0156,0.3203,0.8828,-0.0156,0.2656,-0.8828,-0.0156,0.2656,1.0391,0.3281,0.4141,-1.0391,0.3281,0.4141,1.1875,0.3438,0.4844,-1.1875,0.3438,0.4844,1.2578,0.2422,0.4922,-1.2578,0.2422,0.4922,1.2109,0.0859,0.4844,1.1875,0.0938,0.4453,-1.2109,0.0859,0.4844,1.0469,0,0.4219,-1.0469,0,0.4219,0.8906,0.1094,0.3281,-0.8906,0.1094,0.3281,-0.9375,0.0625,0.3359,0.9375,0.0625,0.3359,0.9609,0.1719,0.3516,-0.9609,0.1719,0.3516,-1,0.125,0.3672,1.0547,0.1875,0.3828,1.0156,0.2344,0.375,-1.0547,0.1875,0.3828,-1.0156,0.2344,0.375,1.0859,0.2734,0.3906,-1.0859,0.2734,0.3906,-1.1094,0.2109,0.3906,1.1094,0.2109,0.3906,0.7891,-0.125,0.3281,1.0391,-0.0859,0.4922,-0.7891,-0.125,0.3281,-1.0391,-0.0859,0.4922,1.3125,0.0547,0.5312,-1.3125,0.0547,0.5312,1.3672,0.2969,0.5,-1.3672,0.2969,0.5,1.25,0.4688,0.5469,-1.25,0.4688,0.5469,1.0234,0.4375,0.4844,-1.0234,0.4375,0.4844,0.8594,0.3828,0.3828,-0.8594,0.3828,0.3828,-0.7734,0.2656,0.4375,-0.1641,0.4141,-0.7734,1,0.125,0.3672] ,"normals":[0.9693,-0.0118,-0.2456,0.6076,-0.5104,-0.6085,0.8001,-0.0028,-0.5998,-0.6076,-0.5104,-0.6085,-0.9693,-0.0118,-0.2456,-0.8001,-0.0028,-0.5998,0.6802,-0.5463,-0.4888,0.8682,-0.0047,-0.4961,-0.6802,-0.5463,-0.4888,-0.8682,-0.0047,-0.4961,0.1193,-0.8712,-0.4763,-0.1193,-0.8712,-0.4763,0.729,-0.6566,-0.1934,0.0995,-0.7515,-0.6522,-0.0995,-0.7515,-0.6522,-0.729,-0.6566,-0.1934,0.0314,-0.9669,-0.2529,-0.4563,-0.5361,-0.7101,0.4563,-0.5361,-0.7101,-0.0314,-0.9669,-0.2529,-0.5538,-0.6332,-0.5406,0.5538,-0.6332,-0.5406,-0.6899,-0.004,-0.7239,0.6899,-0.004,-0.7239,0.8097,-0.007,-0.5867,-0.6506,-0.6883,-0.321,0.6506,-0.6883,-0.321,-0.9521,-0.0102,-0.3057,-0.4559,0.5222,-0.7207,0.4559,0.5222,-0.7207,0.9521,-0.0102,-0.3057,-0.8097,-0.007,-0.5867,0.5306,0.6258,-0.5717,0.1031,0.7402,-0.6644,-0.5306,0.6258,-0.5717,-0.1031,0.7402,-0.6644,-0.1257,0.8416,-0.5253,0.0257,0.9726,-0.2311,-0.6644,0.6821,-0.3056,-0.0257,0.9726,-0.2311,0.7364,0.6521,-0.1803,-0.7364,0.6521,-0.1803,-0.6102,0.4956,-0.6181,0.6102,0.4956,-0.6181,0.1257,0.8416,-0.5253,-0.6682,0.5371,-0.5148,0.6682,0.5371,-0.5148,0.9644,-0.0127,-0.2639,-0.9644,-0.0127,-0.2639,-0.7216,0.6556,-0.2224,0.7216,0.6556,-0.2224,-0.0432,0.9389,-0.3414,0.0432,0.9389,-0.3414,0.6644,0.6821,-0.3056,0.6237,0.6285,-0.4647,-0.6237,0.6285,-0.4647,0.927,-0.0129,-0.3749,-0.6159,-0.6366,-0.4641,-0.927,-0.0129,-0.3749,0.6159,-0.6366,-0.4641,0.0425,-0.9403,-0.3375,-0.0425,-0.9403,-0.3375,0.7152,-0.6625,-0.2227,-0.7152,-0.6625,-0.2227,0.1836,-0.0053,-0.983,-0.1836,-0.0053,-0.983,0.1554,-0.759,-0.6323,0,-0.9677,-0.2523,0.1596,-0.9752,-0.1529,-0.1554,-0.759,-0.6323,0,-0.7753,-0.6316,0.3502,-0.6391,-0.6847,0.5267,-0.8347,-0.1611,-0.3502,-0.6391,-0.6847,-0.1596,-0.9752,-0.1529,0.9457,-0.2579,-0.1977,-0.9457,-0.2579,-0.1977,-0.5267,-0.8347,-0.1611,0.9728,0.1003,-0.2087,0.5557,-0.2264,-0.8,-0.5557,-0.2264,-0.8,-0.9728,0.1003,-0.2087,0.9557,0.2492,-0.1565,0.5652,-0.0297,-0.8244,-0.5652,-0.0297,-0.8244,-0.9557,0.2492,-0.1565,0.8915,-0.3307,-0.3095,0.3841,-0.5671,-0.7285,0.0402,-0.2721,-0.9614,-0.3841,-0.5671,-0.7285,-0.8915,-0.3307,-0.3095,-0.0402,-0.2721,-0.9614,0.5875,-0.7849,-0.197,0.3488,-0.9371,0.0081,-0.5875,-0.7849,-0.197,-0.4991,-0.376,-0.7807,0.5665,-0.3188,-0.7598,0.4991,-0.376,-0.7807,-0.5665,-0.3188,-0.7598,0.8451,0.4434,-0.2985,0.907,-0.4009,0.1289,-0.8451,0.4434,-0.2985,-0.4607,-0.1448,-0.8756,0.517,0.8291,-0.2125,0.4607,-0.1448,-0.8756,-0.517,0.8291,-0.2125,-0.4801,-0.1833,-0.8578,0.5976,0.7847,-0.1646,0.4801,-0.1833,-0.8578,-0.5976,0.7847,-0.1646,-0.3085,0.0038,-0.9512,0.2666,0.2166,-0.9391,0.3085,0.0038,-0.9512,-0.2666,0.2166,-0.9391,-0.6051,0.768,-0.2098,0.2313,0.957,-0.1751,0.6051,0.768,-0.2098,0.1574,0.166,-0.9734,-0.8242,0.5468,-0.1473,-0.1574,0.166,-0.9734,0.8242,0.5468,-0.1473,0.0611,-0.0252,-0.9978,0,0.9636,-0.2673,-0.0611,-0.0252,-0.9978,0,-0.0827,-0.9966,0.2582,-0.1265,-0.9578,0.3678,-0.2836,-0.8856,-0.2582,-0.1265,-0.9578,0.149,-0.1541,-0.9767,0.219,0.0371,-0.975,-0.149,-0.1541,-0.9767,0.2254,-0.3608,-0.905,-0.219,0.0371,-0.975,0.3588,-0.1192,-0.9257,-0.2254,-0.3608,-0.905,0.4602,-0.1651,-0.8723,-0.3588,-0.1192,-0.9257,0.4279,-0.3895,-0.8156,-0.4602,-0.1651,-0.8723,0.3322,-0.3667,-0.869,-0.4279,-0.3895,-0.8156,-0.1522,-0.2548,-0.9549,-0.3322,-0.3667,-0.869,0,0.0643,-0.9979,0.1522,-0.2548,-0.9549,0.0316,-0.1782,-0.9835,-0.0316,-0.1782,-0.9835,0,-0.222,-0.975,-0.2006,-0.135,-0.9703,0.2006,-0.135,-0.9703,-0.2393,-0.3012,-0.923,0.2393,-0.3012,-0.923,-0.0589,-0.3784,-0.9237,0.0589,-0.3784,-0.9237,0.1307,-0.3186,-0.9388,-0.1307,-0.3186,-0.9388,0.1459,-0.1202,-0.9819,0.5937,0.1082,-0.7974,0.1815,-0.0452,-0.9823,-0.1815,-0.0452,-0.9823,-0.5937,0.1082,-0.7974,-0.1459,-0.1202,-0.9819,0,-0.4759,-0.8795,0.1341,0.0063,-0.9909,0.5003,-0.4292,-0.7519,-0.1341,0.0063,-0.9909,0,0,-1,0,-0.0341,-0.9994,0,-0.587,-0.8096,0.9304,-0.1242,-0.3448,0.5836,-0.6929,-0.4235,-0.5836,-0.6929,-0.4235,-0.9304,-0.1242,-0.3448,-0.5003,-0.4292,-0.7519,0.4931,-0.3412,-0.8002,0.9306,-0.2353,-0.2804,-0.9306,-0.2353,-0.2804,-0.4931,-0.3412,-0.8002,-0.2405,0.949,-0.2036,0,0.5166,-0.8562,0.2405,0.949,-0.2036,-0.6286,0.7688,-0.1177,0,0.8287,-0.5596,0,-0.252,-0.9677,0,-0.8654,-0.5011,0,-0.4815,-0.8764,-0.1833,-0.5864,-0.789,-0.1857,0.5956,-0.7815,0.1857,0.5956,-0.7815,0.3611,0.4713,-0.8047,0.6286,0.7688,-0.1177,-0.3611,0.4713,-0.8047,-0.4488,-0.3147,-0.8364,0.1833,-0.5864,-0.789,0.4488,-0.3147,-0.8364,0,0.1578,-0.9875,0.7751,0.0387,-0.6306,-0.7751,0.0387,-0.6306,-0.6507,0.1487,-0.7447,0.6507,0.1487,-0.7447,0.9278,0.353,-0.1209,-0.9278,0.353,-0.1209,0.9306,0.3435,-0.1263,-0.9306,0.3435,-0.1263,-0.1368,-0.5273,-0.8386,0.1368,-0.5273,-0.8386,0,-0.9619,-0.2732,-0.6351,0.0428,-0.7712,0.6351,0.0428,-0.7712,-0.4141,0.5798,-0.7016,0.4141,0.5798,-0.7016,0,-0.3465,-0.938,0,0.5588,-0.8293,0,0.5334,-0.8459,0.2958,0.475,-0.8288,-0.6738,0.1155,-0.7299,-0.2958,0.475,-0.8288,0.6738,0.1155,-0.7299,-0.5177,-0.7041,-0.486,0.5177,-0.7041,-0.486,0,-0.6989,-0.7152,-0.0101,-0.07,-0.9975,0.1581,-0.0842,-0.9838,0.0101,-0.07,-0.9975,-0.1581,-0.0842,-0.9838,0.2934,-0.0602,-0.9541,-0.2934,-0.0602,-0.9541,0.1588,-0.1064,-0.9815,-0.1588,-0.1064,-0.9815,0.0317,-0.2198,-0.975,0.1845,-0.1863,-0.965,-0.0317,-0.2198,-0.975,-0.1845,-0.1863,-0.965,0.299,-0.0356,-0.9536,-0.299,-0.0356,-0.9536,0.2943,-0.102,-0.9502,-0.2943,-0.102,-0.9502,0.1776,-0.0608,-0.9822,-0.1776,-0.0608,-0.9822,-0.2944,0.0046,-0.9557,0.2944,0.0046,-0.9557,-0.0887,-0.1272,-0.9879,0.2036,0.1032,-0.9736,0.0887,-0.1272,-0.9879,-0.2036,0.1032,-0.9736,0.1435,0.0966,-0.9849,-0.1435,0.0966,-0.9849,0.2886,-0.2785,-0.916,-0.2886,-0.2785,-0.916,-0.4508,-0.4658,-0.7614,0.1133,-0.3142,-0.9426,-0.1133,-0.3142,-0.9426,-0.2741,-0.8556,-0.4391,0.2741,-0.8556,-0.4391,-0.1423,-0.5826,-0.8002,0.1423,-0.5826,-0.8002,-0.4229,-0.1078,-0.8997,0.4229,-0.1078,-0.8997,-0.1921,0.1914,-0.9625,0.1921,0.1914,-0.9625,-0.1653,0.6098,-0.7751,0.1653,0.6098,-0.7751,0.1431,0.5587,-0.8169,-0.1431,0.5587,-0.8169,0.4323,0.5833,-0.6876,-0.4323,0.5833,-0.6876,0.688,0.2985,-0.6614,-0.688,0.2985,-0.6614,0.7894,-0.2032,-0.5793,0.4508,-0.4658,-0.7614,-0.7894,-0.2032,-0.5793,0.8016,0.011,-0.5977,-0.8016,0.011,-0.5977,-0.4602,0.8619,-0.2127,0,0.8592,-0.5116,0.4602,0.8619,-0.2127,-0.4792,0.5119,0.7129,0.4792,0.5119,0.7129,-0.2313,0.957,-0.1751,-0.1217,0.6503,0.7498,0.1217,0.6503,0.7498,-0.2275,0.8745,0.4283,0.2275,0.8745,0.4283,-0.3455,0.9124,0.2191,0.6957,0.5814,0.4218,0.3455,0.9124,0.2191,-0.6957,0.5814,0.4218,-0.907,-0.4009,0.1289,-0.9302,-0.3062,0.2023,0.5443,-0.8372,0.0533,0.9302,-0.3062,0.2023,-0.5443,-0.8372,0.0533,0.472,-0.8637,0.1768,-0.472,-0.8637,0.1768,0,-0.7711,0.6367,0.2771,-0.3147,0.9078,0,-0.2133,0.977,-0.2771,-0.3147,0.9078,-0.6893,-0.6687,0.2786,0.1514,-0.151,0.9769,0,-0.2973,0.9547,-0.1514,-0.151,0.9769,0.0675,-0.7832,0.6181,0,-0.8818,0.4716,-0.0675,-0.7832,0.6181,0.5551,-0.4762,0.682,-0.5551,-0.4762,0.682,0.6204,0.0835,0.7798,-0.6204,0.0835,0.7798,0.7798,-0.0105,0.6258,-0.7798,-0.0105,0.6258,0.6893,-0.6687,0.2786,0.8957,0.2577,0.3624,-0.8957,0.2577,0.3624,0.9787,-0.1958,-0.0615,-0.9787,-0.1958,-0.0615,-0.8872,-0.1577,-0.4336,0.7857,-0.5715,-0.2367,-0.7857,-0.5715,-0.2367,-0.3488,-0.9371,0.0081,0.4455,-0.3583,0.8204,0,-0.6913,0.7226,0,-0.3049,0.9524,-0.4455,-0.3583,0.8204,-0.5223,-0.6536,0.5477,0.5223,-0.6536,0.5477,0,-0.9416,0.3365,-0.5071,-0.8376,0.2033,0.5727,-0.8197,-0.012,0,-0.983,0.1833,-0.5727,-0.8197,-0.012,0.721,-0.6898,-0.0651,0.985,-0.1605,-0.0631,-0.721,-0.6898,-0.0651,-0.985,-0.1605,-0.0631,0.473,0.1763,0.8632,0,0.365,0.931,-0.473,0.1763,0.8632,0.4442,0.7244,-0.5271,0,0.9997,-0.0226,0,0.8306,-0.5568,-0.4442,0.7244,-0.5271,-0.4135,0.9096,-0.0395,0.3912,0.8153,0.4268,0,0.8342,0.5514,-0.3912,0.8153,0.4268,0.7717,0.6311,-0.0785,0.4444,0.7885,-0.425,-0.7717,0.6311,-0.0785,-0.4444,0.7885,-0.425,0.7418,0.5164,-0.4278,0.6682,0.6719,-0.3195,-0.7418,0.5164,-0.4278,-0.6682,0.6719,-0.3195,0.8486,0.5288,0.014,0.6784,0.7314,0.0695,-0.8486,0.5288,0.014,-0.6784,0.7314,0.0695,0.8722,0.3146,0.3746,0.6075,0.5696,0.5536,-0.8722,0.3146,0.3746,-0.6075,0.5696,0.5536,0.6196,-0.0605,0.7825,0.6708,-0.0453,0.7403,-0.6196,-0.0605,0.7825,0.4135,0.9096,-0.0395,0.3406,0.8832,-0.3223,-0.3406,0.8832,-0.3223,0,0.5293,-0.8484,0.9983,-0.0283,0.0502,-0.9983,-0.0283,0.0502,0.8403,0.4934,-0.2246,-0.8403,0.4934,-0.2246,0.5071,-0.8376,0.2033,0.579,-0.8027,-0.1427,-0.579,-0.8027,-0.1427,-0.5633,-0.8173,0.1213,0.3123,-0.9499,-0.0012,-0.3123,-0.9499,-0.0012,0.8872,-0.1577,-0.4336,0.3255,-0.6029,0.7284,-0.3255,-0.6029,0.7284,-0.5292,-0.5051,0.6817,0.5633,-0.8173,0.1213,0.5292,-0.5051,0.6817,-0.2792,0.7683,-0.5759,0.5512,-0.0788,-0.8306,0.0188,0.8722,-0.4886,0.2792,0.7683,-0.5759,-0.5512,-0.0788,-0.8306,-0.4492,-0.0383,-0.8926,0.3215,-0.0923,-0.9424,0.3836,0.863,-0.3288,-0.3215,-0.0923,-0.9424,-0.0188,0.8722,-0.4886,-0.3836,0.863,-0.3288,0.7788,0.1678,-0.6044,-0.7788,0.1678,-0.6044,0.1545,-0.1239,-0.9802,-0.1545,-0.1239,-0.9802,0.6526,-0.4768,-0.5888,-0.6526,-0.4768,-0.5888,0.0411,0.3108,-0.9496,-0.0411,0.3108,-0.9496,0.5029,-0.781,-0.3703,-0.5029,-0.781,-0.3703,-0.5384,0.2953,-0.7892,0.3299,0.3157,-0.8896,0.0295,-0.635,-0.7719,-0.3299,0.3157,-0.8896,-0.0295,-0.635,-0.7719,0.5384,0.2953,-0.7892,0.1629,0.858,-0.487,-0.1629,0.858,-0.487,-0.1868,0.9538,-0.2351,0.1868,0.9538,-0.2351,-0.9847,-0.0996,-0.1426,0.9847,-0.0996,-0.1426,0.7621,0.6471,0.0193,-0.1496,-0.7455,-0.6495,0.1496,-0.7455,-0.6495,0.5604,-0.6609,-0.4991,-0.5604,-0.6609,-0.4991,0.6842,-0.5558,-0.4722,-0.6842,-0.5558,-0.4722,0.8572,-0.4931,0.1483,-0.8572,-0.4931,0.1483,-0.7312,0.1144,-0.6725,0.7312,0.1144,-0.6725,0.4492,-0.0383,-0.8926,0.5998,0.5131,-0.6139,-0.5998,0.5131,-0.6139,0.9609,-0.1188,-0.2499,0.842,-0.1762,-0.5098,-0.9609,-0.1188,-0.2499,0.8515,0.0414,-0.5228,0.4814,0.6344,-0.6048,-0.842,-0.1762,-0.5098,-0.8515,0.0414,-0.5228,-0.4814,0.6344,-0.6048,0.8303,-0.479,-0.285,0.6864,-0.6234,-0.3746,-0.8303,-0.479,-0.285,0.7261,-0.4989,-0.4731,0.7949,-0.2332,-0.5601,-0.7261,-0.4989,-0.4731,-0.6864,-0.6234,-0.3746,-0.7949,-0.2332,-0.5601,0.6593,-0.4685,-0.5881,0.6482,-0.4206,-0.6347,-0.6593,-0.4685,-0.5881,-0.6482,-0.4206,-0.6347,-0.5725,-0.4189,-0.7047,0.7584,0.2665,-0.5948,0.5725,-0.4189,-0.7047,-0.7584,0.2665,-0.5948,-0.4492,0.3799,-0.8086,0.4492,0.3799,-0.8086,-0.2929,0.3709,-0.8812,0.645,0.3101,-0.6984,0.2929,0.3709,-0.8812,-0.645,0.3101,-0.6984,-0.0331,0.9449,-0.3256,0.0331,0.9449,-0.3256,0.4618,-0.3291,-0.8237,-0.4618,-0.3291,-0.8237,-0.2624,-0.5331,-0.8043,0.2624,-0.5331,-0.8043,-0.7529,-0.0338,-0.6573,0.7529,-0.0338,-0.6573,-0.5831,0.4999,-0.6403,-0.7621,0.6471,0.0193,0.5831,0.4999,-0.6403,0.065,0.7038,-0.7074,-0.065,0.7038,-0.7074,0.1951,0.0389,-0.98,-0.1951,0.0389,-0.98,-0.4084,0.1273,-0.9038,0.4084,0.1273,-0.9038,0.3347,-0.0046,-0.9423,-0.3347,-0.0046,-0.9423,-0.4448,-0.0937,-0.8907,0.3144,-0.1037,-0.9436,0.3343,0.1068,-0.9364,-0.3144,-0.1037,-0.9436,-0.3343,0.1068,-0.9364,0.2897,0.3158,-0.9035,-0.2897,0.3158,-0.9035,-0.3831,-0.0685,-0.9211,0.3831,-0.0685,-0.9211,-0.0988,-0.8408,0.5322,-0.0253,-0.6796,0.7331,0.0988,-0.8408,0.5322,0.0253,-0.6796,0.7331,0.6366,-0.5043,0.5834,-0.6366,-0.5043,0.5834,0.9253,0.0918,0.368,-0.9253,0.0918,0.368,0.287,0.5978,0.7485,-0.287,0.5978,0.7485,-0.4142,0.5509,0.7245,0.4142,0.5509,0.7245,-0.65,0.5846,0.4853,0.65,0.5846,0.4853,-0.6708,-0.0453,0.7403,-0.3678,-0.2836,-0.8856,0.4448,-0.0937,-0.8907] ,"indices":[0,1,2,3,4,5,2,6,7,8,5,9,1,10,6,11,3,8,12,13,1,14,15,3,16,17,13,18,19,14,13,20,10,21,14,11,22,20,17,23,21,24,25,22,17,23,26,18,27,28,22,29,30,23,28,31,22,29,24,32,33,34,28,35,32,36,37,28,38,39,29,35,40,33,37,41,35,42,43,44,33,42,36,45,2,46,43,5,45,9,0,43,40,4,42,5,40,47,0,41,48,49,37,50,40,39,49,51,38,52,37,53,51,54,27,55,38,30,54,56,27,57,58,59,30,56,25,60,57,61,26,59,16,62,60,63,19,61,12,47,62,48,15,63,64,62,47,48,63,65,60,62,64,65,63,61,64,57,60,61,59,65,64,58,57,59,56,65,64,55,58,56,54,65,64,52,55,54,51,65,64,50,52,51,49,65,64,47,50,49,48,65,66,67,68,69,67,70,71,68,72,73,74,69,75,71,72,73,76,77,78,79,75,80,81,76,82,83,78,84,85,81,86,87,88,89,90,91,92,87,93,94,89,95,92,96,97,98,94,95,99,96,100,101,98,102,103,104,99,105,102,106,107,108,103,109,106,110,107,111,112,113,109,110,114,111,115,116,113,117,118,119,114,120,117,121,122,123,118,122,121,124,125,123,126,127,121,117,125,111,119,113,127,117,112,128,129,110,130,113,108,129,131,106,132,110,104,131,133,102,134,106,96,133,135,98,136,102,97,135,137,95,138,98,87,137,139,89,140,95,88,139,141,91,142,89,141,143,88,143,144,91,123,145,126,121,146,124,145,147,148,147,146,149,150,147,143,151,147,149,152,70,66,70,153,69,154,66,71,69,155,73,154,79,156,155,80,73,157,158,83,159,160,84,156,83,158,84,161,159,162,163,164,162,165,166,163,167,158,165,167,166,156,167,168,161,167,159,169,170,164,171,172,173,174,175,169,176,177,172,178,174,179,180,177,181,182,179,183,182,179,180,164,184,162,173,184,171,170,185,184,171,185,186,182,187,178,188,182,180,178,189,190,191,180,181,189,175,190,191,176,192,175,193,170,186,176,171,194,187,195,192,188,191,195,193,194,186,195,192,179,88,143,91,179,143,174,196,88,197,177,91,164,196,169,173,197,198,163,199,164,165,198,160,200,157,82,201,160,198,202,199,200,203,198,197,86,196,202,197,90,203,168,204,156,168,205,206,154,204,207,205,155,208,152,207,209,208,153,210,211,209,212,210,211,212,209,213,212,210,213,214,209,215,216,217,210,214,207,218,215,219,208,217,206,218,204,206,219,220,220,216,218,214,220,219,218,216,215,217,214,219,148,221,222,223,149,224,145,222,225,224,146,226,145,227,126,146,228,226,141,221,150,144,223,229,141,230,231,232,144,229,139,233,230,234,142,232,137,235,233,236,140,234,135,237,235,238,138,236,131,237,133,134,238,239,129,240,131,132,239,241,129,242,243,244,132,241,128,245,242,246,130,244,125,227,245,228,127,246,227,247,245,228,248,249,242,247,250,248,244,251,242,252,243,244,253,251,243,254,240,241,255,253,237,254,256,255,238,257,237,258,235,238,259,257,233,258,260,259,234,261,233,262,230,234,263,261,230,264,231,232,265,263,221,264,266,265,223,267,227,268,269,270,228,249,225,271,268,272,226,270,222,266,271,267,224,272,122,273,274,275,122,274,118,276,273,277,120,275,115,276,114,278,277,279,107,280,115,109,279,281,103,282,107,105,281,283,103,284,285,286,105,283,100,284,99,287,286,288,100,289,290,291,287,288,92,292,289,293,94,291,294,295,296,294,297,298,296,299,300,296,301,297,300,302,303,300,304,301,68,303,302,303,74,304,72,302,305,304,77,306,75,305,307,306,76,308,78,307,309,308,81,310,307,295,309,297,308,310,305,299,307,306,301,304,309,311,312,310,298,297,82,309,312,310,85,313,314,202,200,315,203,316,312,200,82,313,201,315,202,317,86,203,318,316,317,93,86,318,319,293,320,321,322,323,321,324,325,326,321,324,326,327,326,328,329,330,326,329,329,311,294,298,329,294,311,314,312,298,315,330,290,331,332,333,288,334,335,322,336,337,322,323,338,339,340,341,339,342,339,343,344,345,339,344,344,335,336,337,344,336,285,346,347,348,283,349,347,350,351,352,349,353,351,354,355,356,353,357,355,358,359,360,357,361,362,358,363,364,360,361,335,359,362,361,337,364,343,355,359,357,345,361,365,351,355,353,342,357,338,347,351,349,341,353,285,366,282,283,367,349,366,340,368,367,340,341,273,280,282,279,275,281,273,366,368,367,275,368,274,273,368,368,275,274,290,346,284,288,348,334,332,350,346,352,334,348,369,354,350,356,370,352,358,371,363,360,372,356,373,374,328,327,375,376,374,377,331,375,378,376,289,374,331,375,291,333,292,314,374,315,293,375,314,328,374,375,330,315,292,317,379,316,318,293,380,362,363,381,364,382,362,320,335,364,323,382,383,380,377,376,381,382,325,383,373,324,376,382,320,384,325,324,382,323,385,386,387,388,389,390,387,391,392,393,394,395,391,396,392,393,397,398,399,400,396,398,401,402,403,404,400,402,405,406,404,407,408,409,405,410,411,412,407,413,406,409,403,414,411,415,402,406,416,403,399,417,402,418,419,399,391,420,398,417,421,391,386,422,393,420,386,423,421,424,389,422,377,425,331,378,426,427,408,428,377,410,427,409,332,425,369,426,334,370,371,429,385,390,372,388,407,430,428,431,409,427,432,430,433,434,431,427,435,433,436,437,438,439,440,435,441,442,438,434,440,443,444,442,445,446,444,423,429,447,424,445,369,444,371,447,370,372,425,440,369,426,442,434,425,428,432,434,427,426,423,448,449,450,424,451,441,448,443,446,450,452,441,453,454,455,446,452,436,453,435,439,455,456,433,457,436,437,456,458,433,459,460,461,437,458,430,462,459,463,431,461,421,449,464,451,422,465,419,464,466,465,420,467,416,466,468,467,417,469,416,470,471,417,472,469,471,473,414,418,474,472,414,462,412,415,463,474,460,475,457,458,476,477,478,479,475,477,480,481,479,482,483,484,480,485,482,486,483,484,487,488,464,483,486,485,465,487,479,449,448,480,451,485,454,479,448,452,480,476,457,454,453,452,456,455,462,460,459,463,458,477,473,478,462,477,474,463,482,473,470,484,474,481,489,470,468,488,472,484,466,489,468,488,467,469,464,486,466,467,487,465,404,490,491,492,405,493,400,491,494,493,401,495,400,496,396,401,497,495,396,498,392,397,499,497,392,500,387,395,501,499,387,502,385,394,503,501,491,502,500,493,503,492,500,494,491,495,501,493,498,496,494,495,497,499,371,502,363,372,503,388,363,490,380,492,504,381,377,490,408,492,378,410,0,12,1,3,15,4,2,1,6,8,3,5,1,13,10,11,14,3,12,16,13,14,19,15,16,25,17,18,26,19,13,17,20,21,18,14,22,31,20,23,18,21,25,27,22,23,30,26,27,38,28,29,53,30,28,34,31,29,23,24,33,44,34,35,29,32,37,33,28,39,53,29,40,43,33,41,39,35,43,46,44,42,35,36,2,7,46,5,42,45,0,2,43,4,41,42,40,50,47,41,4,48,37,52,50,39,41,49,38,55,52,53,39,51,27,58,55,30,53,54,27,25,57,59,26,30,25,16,60,61,19,26,16,12,62,63,15,19,12,0,47,48,4,15,66,70,67,69,74,67,71,66,68,73,77,74,75,79,71,73,80,76,78,83,79,80,84,81,82,157,83,84,160,85,86,93,87,89,319,90,92,97,87,94,319,89,92,100,96,98,287,94,99,104,96,101,287,98,103,108,104,105,101,102,107,112,108,109,105,106,107,115,111,113,278,109,114,119,111,116,278,113,118,123,119,120,116,117,122,124,123,122,120,121,125,119,123,127,505,121,125,128,111,113,130,127,112,111,128,110,132,130,108,112,129,106,134,132,104,108,131,102,136,134,96,104,133,98,138,136,97,96,135,95,140,138,87,97,137,89,142,140,88,87,139,91,144,142,141,150,143,143,151,144,123,124,145,121,505,146,145,124,147,147,124,146,150,148,147,151,143,147,152,211,70,70,211,153,154,152,66,69,153,155,154,71,79,155,161,80,157,163,158,159,165,160,156,79,83,84,80,161,162,166,163,162,173,165,163,166,167,165,159,167,156,158,167,161,168,167,169,175,170,171,176,172,174,190,175,176,181,177,178,190,174,180,179,177,182,178,179,182,183,179,164,170,184,173,162,184,170,193,185,171,184,185,182,195,187,188,195,182,178,187,189,191,188,180,189,194,175,191,181,176,175,194,193,186,192,176,194,189,187,192,195,188,195,185,193,186,185,195,179,174,88,91,177,179,174,169,196,197,172,177,164,199,196,173,172,197,163,157,199,165,173,198,200,199,157,201,85,160,202,196,199,203,201,198,86,88,196,197,91,90,168,206,204,168,161,205,154,156,204,205,161,155,152,154,207,208,155,153,211,152,209,210,153,211,209,216,213,210,212,213,209,207,215,217,208,210,207,204,218,219,205,208,206,220,218,206,205,219,220,213,216,214,213,220,148,150,221,223,151,149,145,148,222,224,149,146,145,225,227,146,505,228,141,231,221,144,151,223,141,139,230,232,142,144,139,137,233,234,140,142,137,135,235,236,138,140,135,133,237,238,136,138,131,240,237,134,136,238,129,243,240,132,134,239,129,128,242,244,130,132,128,125,245,246,127,130,125,126,227,228,505,127,227,269,247,228,246,248,242,245,247,248,246,244,242,250,252,244,241,253,243,252,254,241,239,255,237,240,254,255,239,238,237,256,258,238,236,259,233,235,258,259,236,234,233,260,262,234,232,263,230,262,264,232,229,265,221,231,264,265,229,223,227,225,268,270,226,228,225,222,271,272,224,226,222,221,266,267,223,224,122,118,273,275,120,122,118,114,276,277,116,120,115,280,276,278,116,277,107,282,280,109,278,279,103,285,282,105,109,281,103,99,284,286,101,105,100,290,284,287,101,286,100,92,289,291,94,287,92,93,292,293,319,94,294,311,295,294,296,297,296,295,299,296,300,301,300,299,302,300,303,304,68,67,303,303,67,74,72,68,302,304,74,77,75,72,305,306,77,76,78,75,307,308,76,81,307,299,295,297,301,308,305,302,299,306,308,301,309,295,311,310,313,298,82,78,309,310,81,85,314,379,202,315,201,203,312,314,200,313,85,201,202,379,317,203,90,318,317,292,93,318,90,319,320,325,321,323,322,321,325,373,326,324,321,326,326,373,328,330,327,326,329,328,311,298,330,329,311,328,314,298,313,315,290,289,331,333,291,288,335,320,322,337,336,322,338,365,339,341,340,339,339,365,343,345,342,339,344,343,335,337,345,344,285,284,346,348,286,283,347,346,350,352,348,349,351,350,354,356,352,353,355,354,358,360,356,357,362,359,358,364,504,360,335,343,359,361,345,337,343,365,355,357,342,345,365,338,351,353,341,342,338,366,347,349,367,341,285,347,366,283,281,367,366,338,340,367,368,340,273,276,280,279,277,275,273,282,366,367,281,275,290,332,346,288,286,348,332,369,350,352,370,334,369,371,354,356,372,370,358,354,371,360,504,372,373,383,374,327,330,375,374,383,377,375,333,378,289,292,374,375,293,291,292,379,314,315,316,293,380,384,362,381,504,364,362,384,320,364,337,323,383,384,380,376,378,381,325,384,383,324,327,376,385,429,386,388,394,389,387,386,391,393,389,394,391,399,396,393,395,397,399,403,400,398,397,401,403,411,404,402,401,405,404,411,407,409,406,405,411,414,412,413,415,406,403,471,414,415,418,402,416,471,403,417,398,402,419,416,399,420,393,398,421,419,391,422,389,393,386,429,423,424,390,389,377,428,425,378,333,426,408,407,428,410,378,427,332,331,425,426,333,334,371,444,429,390,447,372,407,412,430,431,413,409,432,428,430,434,437,431,435,432,433,437,434,438,440,432,435,442,446,438,440,441,443,442,447,445,444,443,423,447,390,424,369,440,444,447,442,370,425,432,440,426,370,442,423,443,448,450,445,424,441,454,448,446,445,450,441,435,453,455,438,446,436,457,453,439,438,455,433,460,457,437,439,456,433,430,459,461,431,437,430,412,462,463,413,431,421,423,449,451,424,422,419,421,464,465,422,420,416,419,466,467,420,417,416,468,470,417,418,472,471,470,473,418,415,474,414,473,462,415,413,463,460,478,475,458,456,476,478,506,479,477,476,480,479,506,482,484,481,480,482,489,486,484,485,487,464,449,483,485,451,465,479,483,449,480,450,451,454,475,479,452,450,480,457,475,454,452,476,456,462,478,460,463,461,458,473,506,478,477,481,474,482,506,473,484,472,474,489,482,470,488,469,472,466,486,489,488,487,467,404,408,490,492,410,405,400,404,491,493,405,401,400,494,496,401,397,497,396,496,498,397,395,499,392,498,500,395,394,501,387,500,502,394,388,503,491,490,502,493,501,503,500,498,494,495,499,501,371,385,502,372,504,503,363,502,490,492,503,504,377,380,490,492,381,378] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":507,"indexStart":0,"indexCount":2904}] ,"instances":[]} ,{"name":"Cylinder","id":"Cylinder","billboardMode":0,"position":[-2.8491,1.0358,4.0248],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[0,1,1,0.1951,-1,0.9808,0,-1,1,0.1951,1,0.9808,0.3827,-1,0.9239,0.3827,1,0.9239,0.5556,-1,0.8315,0.5556,1,0.8315,0.7071,-1,0.7071,0.7071,1,0.7071,0.8315,-1,0.5556,0.8315,1,0.5556,0.9239,-1,0.3827,0.9239,1,0.3827,0.9808,-1,0.1951,0.9808,1,0.1951,1,-1,0,1,1,0,0.9808,-1,-0.1951,0.9808,1,-0.1951,0.9239,-1,-0.3827,0.9239,1,-0.3827,0.8315,-1,-0.5556,0.8315,1,-0.5556,0.7071,-1,-0.7071,0.7071,1,-0.7071,0.5556,-1,-0.8315,0.5556,1,-0.8315,0.3827,-1,-0.9239,0.3827,1,-0.9239,0.1951,-1,-0.9808,0.1951,1,-0.9808,0,-1,-1,0,1,-1,-0.1951,-1,-0.9808,-0.1951,1,-0.9808,-0.3827,-1,-0.9239,-0.3827,1,-0.9239,-0.5556,-1,-0.8315,-0.5556,1,-0.8315,-0.7071,-1,-0.7071,-0.7071,1,-0.7071,-0.8315,-1,-0.5556,-0.8315,1,-0.5556,-0.9239,-1,-0.3827,-0.9239,1,-0.3827,-0.9808,-1,-0.1951,-0.9808,1,-0.1951,-1,-1,0,-1,1,0,-0.9808,-1,0.1951,-0.9808,1,0.1951,-0.9239,-1,0.3827,-0.9239,1,0.3827,-0.8315,-1,0.5556,-0.8315,1,0.5556,-0.7071,-1,0.7071,-0.7071,1,0.7071,-0.5556,-1,0.8315,-0.5556,1,0.8315,-0.3827,-1,0.9239,-0.3827,1,0.9239,-0.1951,-1,0.9808,-0.1951,1,0.9808] ,"normals":[0,0.6857,0.7279,0.142,-0.6857,0.7139,0,-0.6857,0.7279,0.142,0.6857,0.7139,0.2785,-0.6857,0.6725,0.2785,0.6857,0.6725,0.4044,-0.6857,0.6052,0.4044,0.6857,0.6052,0.5147,-0.6857,0.5147,0.5147,0.6857,0.5147,0.6052,-0.6857,0.4044,0.6052,0.6857,0.4044,0.6725,-0.6857,0.2785,0.6725,0.6857,0.2785,0.7139,-0.6857,0.142,0.7139,0.6857,0.142,0.7279,-0.6857,0,0.7279,0.6857,0,0.7139,-0.6857,-0.142,0.7139,0.6857,-0.142,0.6725,-0.6857,-0.2785,0.6725,0.6857,-0.2785,0.6052,-0.6857,-0.4044,0.6052,0.6857,-0.4044,0.5147,-0.6857,-0.5147,0.5147,0.6857,-0.5147,0.4044,-0.6857,-0.6052,0.4044,0.6857,-0.6052,0.2785,-0.6857,-0.6725,0.2785,0.6857,-0.6725,0.142,-0.6857,-0.7139,0.142,0.6857,-0.7139,0,-0.6857,-0.7279,0,0.6857,-0.7279,-0.142,-0.6857,-0.7139,-0.142,0.6857,-0.7139,-0.2785,-0.6857,-0.6725,-0.2785,0.6857,-0.6725,-0.4044,-0.6857,-0.6052,-0.4044,0.6857,-0.6052,-0.5147,-0.6857,-0.5147,-0.5147,0.6857,-0.5147,-0.6052,-0.6857,-0.4044,-0.6052,0.6857,-0.4044,-0.6725,-0.6857,-0.2785,-0.6725,0.6857,-0.2785,-0.7139,-0.6857,-0.142,-0.7139,0.6857,-0.142,-0.7279,-0.6857,0,-0.7279,0.6857,0,-0.7139,-0.6857,0.142,-0.7139,0.6857,0.142,-0.6725,-0.6857,0.2785,-0.6725,0.6857,0.2785,-0.6052,-0.6857,0.4044,-0.6052,0.6857,0.4044,-0.5147,-0.6857,0.5147,-0.5147,0.6857,0.5147,-0.4044,-0.6857,0.6052,-0.4044,0.6857,0.6052,-0.2785,-0.6857,0.6725,-0.2785,0.6857,0.6725,-0.142,-0.6857,0.7139,-0.142,0.6857,0.7139] ,"indices":[0,1,2,3,4,1,5,6,4,7,8,6,9,10,8,11,12,10,13,14,12,15,16,14,17,18,16,19,20,18,21,22,20,23,24,22,25,26,24,27,28,26,29,30,28,31,32,30,33,34,32,35,36,34,37,38,36,39,40,38,41,42,40,43,44,42,45,46,44,47,48,46,49,50,48,51,52,50,53,54,52,55,56,54,57,58,56,59,60,58,37,21,53,61,62,60,63,2,62,30,46,14,0,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,61,60,5,3,0,0,63,5,61,59,57,57,55,53,53,51,49,49,47,53,45,43,37,41,39,37,37,35,33,33,31,29,29,27,25,25,23,21,21,19,17,17,15,21,13,11,9,9,7,5,5,63,61,61,57,5,53,47,45,43,41,37,37,33,21,29,25,21,21,15,13,13,9,21,5,57,53,53,45,37,33,29,21,21,9,5,5,53,21,61,63,62,63,0,2,62,2,1,1,4,6,6,8,10,10,12,6,14,16,18,18,20,14,22,24,30,26,28,30,30,32,34,34,36,38,38,40,42,42,44,46,46,48,50,50,52,54,54,56,62,58,60,62,62,1,14,6,12,14,14,20,22,24,26,30,30,34,46,38,42,46,46,50,62,56,58,62,1,6,14,14,22,30,34,38,46,50,54,62,62,14,46] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":64,"indexStart":0,"indexCount":372}] ,"instances":[]} ,{"name":"Plane","id":"Plane","materialId":"untitled.Material.001","billboardMode":0,"position":[-1.1292,0,1.8154],"rotation":[0,0,0],"scaling":[10,10,10],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,0,-1,-1,0,1,-1,0,-1,1,0,1] ,"normals":[0,1,0,0,1,0,0,1,0,0,1,0] ,"indices":[0,1,2,0,3,1] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":4,"indexStart":0,"indexCount":6}] ,"instances":[]} ,{"name":"Cube","id":"Cube","billboardMode":0,"position":[-2.5963,1.4304,-1.1156],"rotation":[-0.0285,-0.0246,0.0068],"scaling":[0.9193,0.9193,0.9193],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1] ,"normals":[0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773] ,"uvs":[1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,1,1,0,0,0,1,0,1,1,1,0,1,1,0,1] ,"indices":[0,1,2,3,4,5,6,7,2,8,9,10,11,12,1,13,14,5,0,15,1,3,16,4,17,18,19,20,16,9,21,22,23,24,25,26] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":27,"indexStart":0,"indexCount":36}] ,"instances":[]} ], "cameras":[{"name":"Camera","id":"Camera","position":[7.4811,5.3437,-6.5076],"rotation":[0.4615,-0.8149,0],"fov":0.8576,"minZ":0.1,"maxZ":100,"speed":1,"inertia":0.9,"checkCollisions":false,"applyGravity":false,"ellipsoid":[0.2,0.9,0.2],"cameraRigMode":0,"interaxial_distance":0.0637,"type":"FreeCamera"}],"activeCamera":"Camera", "lights":[{"name":"Lamp","id":"Lamp","type":0,"position":[4.0762,5.9039,1.0055],"intensity":1,"diffuse":[1,1,1],"specular":[1,1,1]}], "shadowGenerators":[] }
  3. makugym

    Change colour - shape from blender

    Bellow code changes value of ambient color; however, changes are not visible in browser, but when I log the value of ambientColor it is changed. Is there need of rendering everything again? If rendering everything once again is necessary how to do it? scene.materials[0].ambientColor.r = 0.9; console.log(scene.materials[0].ambientColor.r); Code fragment exported from Blender Log from browser's console Whole code <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Using babylon.js - How to load a scene</title> <script src="babylon.2.5.js"></script> <style> html, body { width: 80%; height: 80%; padding: 0; margin: 0; overflow: hidden; } #renderCanvas { width: 100%; height: 100%; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); BABYLON.SceneLoader.Load("", "untitled.babylon", engine, function (newScene) { scene = newScene; scene.materials[0].ambientColor.r = 0.9; console.log(scene.materials[0].ambientColor.r); // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }); } </script> <body> </html>
  4. makugym

    Change colour - shape from blender

    In which place in my code I can use this? When I used this before 'return scene' and i tried log 'scene.getMeshByName("Cube")' I got null.
  5. I maked simple hexagon in blender and i want change colour on click button "Click me". How I can refer to the specific id (In this case - Cube) from blender in my script? Can you check my html file? I'm not sure that all it's good. It's blender file {"producer":{"name":"Blender","version":"2.78 (sub 0)","exporter_version":"4.6.1","file":"szescian.babylon"}, "autoClear":true,"clearColor":[0.0509,0.0509,0.0509],"ambientColor":[0,0,0],"gravity":[0,-9.81,0], "materials":[{"name":"szescian.Material","id":"szescian.Material","ambient":[0.8,0.7048,0.0663],"diffuse":[0.64,0.5639,0.0531],"specular":[0.5,0.5,0.5],"emissive":[0,0,0],"specularPower":50,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false}], "multiMaterials":[], "skeletons":[], "meshes":[{"name":"Plane","id":"Plane","billboardMode":0,"position":[0.2658,0.2489,1.9542],"rotation":[0,0,0],"scaling":[5,5,5],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,0,-1,-1,0,1,-1,0,-1,1,0,1] ,"normals":[0,1,0,0,1,0,0,1,0,0,1,0] ,"indices":[0,1,2,0,3,1] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":4,"indexStart":0,"indexCount":6}] ,"instances":[]} ,{"name":"Cube","id":"Cube","materialId":"szescian.Material","billboardMode":0,"position":[0,1,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1] ,"normals":[0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773] ,"indices":[0,1,2,3,4,5,5,0,2,4,6,0,6,3,1,2,3,5,0,6,1,3,7,4,5,4,0,4,7,6,6,7,3,2,1,3] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}] ,"instances":[]} ], "cameras":[{"name":"Camera","id":"Camera","position":[7.4811,5.3437,-6.5076],"rotation":[0.4615,-0.8149,0],"fov":0.8576,"minZ":0.1,"maxZ":100,"speed":1,"inertia":0.9,"checkCollisions":false,"applyGravity":false,"ellipsoid":[0.2,0.9,0.2],"cameraRigMode":0,"interaxial_distance":0.0637,"type":"FreeCamera"}],"activeCamera":"Camera", "lights":[{"name":"Lamp","id":"Lamp","type":0,"position":[4.0762,5.9039,1.0055],"intensity":8.22,"diffuse":[0.1138,1,0.1492],"specular":[0.1138,1,0.1492]}], "shadowGenerators":[] } My html code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/> <title>Babylon - Getting Started</title> <!-- link to the last version of babylon --> <script src="js/babylon.2.5.js"></script> <link rel="stylesheet" href="css/style.css"> </head> <body> <canvas id="renderCanvas"></canvas> <button id="sweetButton">Click me</button> <script> window.addEventListener('DOMContentLoaded', function(){ var canvas = document.getElementById('renderCanvas'); var engine = new BABYLON.Engine(canvas, true); engine.enableOfflineSupport = false; var createScene = function(){ var scene = new BABYLON.Scene(engine); // create a FreeCamera, and set its position to (x:0, y:5, z:-10) var camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0, 5,-10), scene); // target the camera to scene origin camera.setTarget(BABYLON.Vector3.Zero()); // attach the camera to the canvas camera.attachControl(canvas, false); // create a basic light, aiming 0,1,0 - meaning, to the sky var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0,1,0), scene); BABYLON.SceneLoader.ImportMesh("","","szescian.babylon",scene); return scene; } var scene = createScene(); engine.runRenderLoop(function(){ scene.render(); }); window.addEventListener('resize', function() { engine.resize(); }); }); </script> </body> </html>
  6. makugym

    Change material colour

    newMeshes is not defined
  7. makugym

    Change material colour

    Yes but cube have id: Cube in blender file. In which place i need add code with change colour. I will try something like this but doesn`t work. I have log from console with error 'Cube is not defined' <script> var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "szescian.babylon", engine, function(newScene) { var Scene = newScene; Scene.executeWhenReady(function(){ Scene.activeCamera.attachControl(canvas); engine.runRenderLoop(function(){ Scene.render(); }); }); // Define a material var material = new BABYLON.StandardMaterial("std", Scene); material.diffuseColor = new BABYLON.Color3(0.5, 1, 0.5); var coolButton = document.getElementById("sweetButton"); var lol = 1; coolButton.onclick = function () { if (lol === 1) { material.diffuseColor = new BABYLON.Color3(0.5, 1, 2); lol = 0; } else { material.diffuseColor = new BABYLON.Color3(0.5, 1, 0.5); lol = 1; } } // Apply the material Cube.material = material; }); window.addEventListener("resize",function(){ engine.resize(); }); </script>
  8. makugym

    Change material colour

    Thanks for answers it is working. I have one more question. I exported the file from Blender. How I can change colour of the Cube. Code from blender file {"producer":{"name":"Blender","version":"2.78 (sub 0)","exporter_version":"4.6.1","file":"szescian.babylon"}, "autoClear":true,"clearColor":[0.0509,0.0509,0.0509],"ambientColor":[0,0,0],"gravity":[0,-9.81,0], "materials":[{"name":"szescian.Material","id":"szescian.Material","ambient":[0.8,0.8,0.8],"diffuse":[0.64,0.64,0.64],"specular":[0.5,0.5,0.5],"emissive":[0,0,0],"specularPower":50,"alpha":1,"backFaceCulling":true,"checkReadyOnlyOnce":false}], "multiMaterials":[], "skeletons":[], "meshes":[{"name":"Cube","id":"Cube","materialId":"szescian.Material","billboardMode":0,"position":[0,1,0],"rotation":[0,0,0],"scaling":[1,1,1],"isVisible":true,"freezeWorldMatrix":false,"isEnabled":true,"checkCollisions":false,"receiveShadows":false ,"positions":[1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,-1,-1,1,-1] ,"normals":[0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,0.5773,-0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,0.5773,-0.5773,0.5773,0.5773,0.5773,-0.5773,-0.5773,-0.5773,-0.5773,0.5773,-0.5773] ,"indices":[0,1,2,3,4,5,5,0,2,4,6,0,6,3,1,2,3,5,0,6,1,3,7,4,5,4,0,4,7,6,6,7,3,2,1,3] ,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":8,"indexStart":0,"indexCount":36}] ,"instances":[]} ], "cameras":[{"name":"Camera","id":"Camera","position":[7.4811,5.3437,-6.5076],"rotation":[0.4615,-0.8149,0],"fov":0.8576,"minZ":0.1,"maxZ":100,"speed":1,"inertia":0.9,"checkCollisions":false,"applyGravity":false,"ellipsoid":[0.2,0.9,0.2],"cameraRigMode":0,"interaxial_distance":0.0637,"type":"FreeCamera"}],"activeCamera":"Camera", "lights":[{"name":"Lamp","id":"Lamp","type":0,"position":[4.0762,5.9039,1.0055],"intensity":1,"diffuse":[1,1,1],"specular":[1,1,1]}], "shadowGenerators":[] } Code from script <script> var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "szescian.babylon", engine, function(newScene) { var Scene = newScene; Scene.executeWhenReady(function(){ Scene.activeCamera.attachControl(canvas); engine.runRenderLoop(function(){ Scene.render(); }); }); window.addEventListener("resize",function(){ engine.resize(); }); </script>
  9. makugym

    Change material colour

    Hi everyone, I need help. Could someone write for me function 'myFunction' which changes the colour of the material. I don't know in which place I need add this. Commented function setTimeot change the colour. When I added function 'myFunction' in this place i have error 'myFunction is not defined'. Do you have good tutorials for the beginners? <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/> <title>Babylon - Getting Started</title> <!-- link to the last version of babylon --> <script src="js/babylon.2.5.js"></script> <link rel="stylesheet" href="css/style.css"> </head> <body> <canvas id="renderCanvas"></canvas> <div> <button onclick="myFunction()">Click me</button> </div> <script> window.addEventListener('DOMContentLoaded', function() { // your code here var canvas = document.getElementById('renderCanvas'); var engine = new BABYLON.Engine(canvas, true); var createScene = function() { // create a basic BJS Scene object var scene = new BABYLON.Scene(engine); // create a FreeCamera, and set its position to (x:0, y:5, z:-10) var camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0, 5,-10), scene); // target the camera to scene origin camera.setTarget(BABYLON.Vector3.Zero()); // attach the camera to the canvas camera.attachControl(canvas, false); // create a basic light, aiming 0,1,0 - meaning, to the sky var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0,1,0), scene); // create a built-in "sphere" shape; its constructor takes 4 params: name, subdivisions, radius, scene var sphere = BABYLON.Mesh.CreateSphere('sphere1', 16, 2, scene); // move the sphere upward 1/2 of its height sphere.position.y = 1; // create a built-in "ground" shape; its constructor takes 5 params: name, width, height, subdivisions and scene var ground = BABYLON.Mesh.CreateGround('ground1', 6, 6, 2, scene); // Define a material var material = new BABYLON.StandardMaterial("std", scene); material.diffuseColor = new BABYLON.Color3(0.5, 1, 0.5); //setTimeout(function(){ material.diffuseColor = new BABYLON.Color3(0.5, 1, 2); }, 3000); // Apply the material sphere.material = material; // return the created scene return scene; } var scene = createScene(); engine.runRenderLoop(function() { scene.render(); }); window.addEventListener('resize', function() { engine.resize(); }); }); </script> </body> </html>