Ejemplo n.º 1
0
 public static RedistributionLicense0x FromGltf(VrmMeta self)
 {
     return(new RedistributionLicense0x
     {
         License = (DistributionLicenseType)self.licenseName,
         OtherLicenseUrl = self.otherLicenseUrl,
     });
 }
Ejemplo n.º 2
0
 public static AvatarPermission0x FromGltf(VrmMeta self)
 {
     return(new AvatarPermission0x
     {
         AvatarUsage = (AvatarUsageType)self.allowedUserName,
         IsAllowedViolentUsage = self.violentUssageName == VrmUssageLicense.Allow ? true : false,
         IsAllowedSexualUsage = self.sexualUssageName == VrmUssageLicense.Allow ? true : false,
         OtherPermissionUrl = self.otherPermissionUrl,
         IsAllowedCommercialUsage = self.commercialUssageName == VrmUssageLicense.Allow ? true : false,
     });
 }
Ejemplo n.º 3
0
        public static Meta FromGltf(this VrmMeta self, List <Texture> textures)
        {
            var meta = new Meta
            {
                Name                  = self.title,
                Version               = self.version,
                Author                = self.author,
                ContactInformation    = self.contactInformation,
                Reference             = self.reference,
                AvatarPermission      = AvatarPermission0x.FromGltf(self),
                RedistributionLicense = RedistributionLicense0x.FromGltf(self),
            };

            if (self.texture >= 0 && self.texture < textures.Count)
            {
                var texture = textures[self.texture] as ImageTexture;
                if (texture != null)
                {
                    meta.Thumbnail = (textures[self.texture] as ImageTexture).Image;
                }
            }

            return(meta);
        }