Ejemplo n.º 1
0
        static UniGLTF.Extensions.VRMC_vrm.ExpressionPreset ToPreset(ListTreeNode <JsonValue> json)
        {
            switch (json.GetString().ToLower())
            {
            case "unknown": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.custom);

            // https://github.com/vrm-c/vrm-specification/issues/185
            case "neutral": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.neutral);

            case "a": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.aa);

            case "i": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.ih);

            case "u": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.ou);

            case "e": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.ee);

            case "o": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.oh);

            case "blink": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.blink);

            case "blink_l": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.blinkLeft);

            case "blink_r": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.blinkRight);

            // https://github.com/vrm-c/vrm-specification/issues/163
            case "joy": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.happy);

            case "angry": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.angry);

            case "sorrow": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.sad);

            case "fun": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.relaxed);

            case "lookup": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.lookUp);

            case "lookdown": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.lookDown);

            case "lookleft": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.lookLeft);

            case "lookright": return(UniGLTF.Extensions.VRMC_vrm.ExpressionPreset.lookRight);
            }

            throw new NotImplementedException();
        }