Exemplo n.º 1
0
        public new static GLTFPointLight Deserialize(GLTFRoot root, JsonReader reader)
        {
            var node = new GLTFPointLight();

            while (reader.Read() && reader.TokenType == JsonToken.PropertyName)
            {
                var curProp = reader.Value.ToString();

                switch (curProp)
                {
                case "type":
                    node.type = reader.ReadAsString();
                    break;

                case "color":
                    node.color = reader.ReadAsRGBAColor();
                    break;

                case "range":
                    node.range = (float)reader.ReadAsDouble();
                    break;

                case "intensity":
                    node.intensity = (float)reader.ReadAsDouble();
                    break;

                case "name":
                    node.name = reader.ReadAsString();
                    break;
                }
            }

            return(node);
        }
Exemplo n.º 2
0
 public GLTFPointLight(GLTFPointLight node, GLTFRoot gltfRoot) : base(node, gltfRoot)
 {
     if (node == null)
     {
         return;
     }
 }