public new static GLTFSpotLight Deserialize(GLTFRoot root, JsonReader reader) { var node = new GLTFSpotLight(); 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); }
public GLTFSpotLight(GLTFSpotLight node, GLTFRoot gltfRoot) : base(node, gltfRoot) { if (node == null) { return; } innerConeAngle = node.innerConeAngle; outerConeAngle = node.outerConeAngle; }