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

            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);
        }
Ejemplo n.º 2
0
 public GLTFDirectionalLight(GLTFDirectionalLight node, GLTFRoot gltfRoot) : base(node, gltfRoot)
 {
     if (node == null)
     {
         return;
     }
 }