コード例 #1
0
ファイル: GLTFExporter.cs プロジェクト: JiphuTzu/GLTFuma
        public GLTFExporter(GLTFRoot gltf, IMaterialExporter materialExporter, IMeshExporter meshExporter, IAnimationExporter animationExporter)
        {
            this.gltf          = gltf;
            _materialExporter  = materialExporter ?? new MaterialExporter();
            _meshExporter      = meshExporter ?? new MeshExporter();
            _animationExporter = animationExporter ?? new AnimationExporter();

            this.gltf.extensionsUsed.AddRange(extensionUsed);

            this.gltf.asset = new GLTFAsset
            {
                generator = "GLTFumaExporter",
                version   = "2.0",
            };
        }
コード例 #2
0
ファイル: gltfExporter.cs プロジェクト: vrm-c/UniVRM
        public gltfExporter(ExportingGltfData data, GltfExportSettings settings, IProgress <ExportProgress> progress = null,
                            IAnimationExporter animationExporter = null)
        {
            _data = data;

            _gltf.extensionsUsed.AddRange(ExtensionUsed);

            _gltf.asset = new glTFAssets
            {
                generator = "UniGLTF-" + UniGLTFVersion.VERSION,
                version   = "2.0",
            };

            m_settings = settings;
            if (m_settings == null)
            {
                // default
                m_settings = new GltfExportSettings();
            }

            m_animationExporter = animationExporter;
        }
コード例 #3
0
        public VRMExporter(ExportingGltfData data, GltfExportSettings exportSettings, IAnimationExporter animationExporter = null) : base(
            data, exportSettings, animationExporter: animationExporter)
        {
            if (exportSettings == null || exportSettings.InverseAxis != Vrm0xSpecificationInverseAxis)
            {
                throw new Exception($"VRM specification requires InverseAxis settings as {Vrm0xSpecificationInverseAxis}");
            }

            _gltf.extensionsUsed.Add(glTF_VRM_extensions.ExtensionName);
        }