コード例 #1
0
        public void MeshCopyTest()
        {
            var path    = AliciaPath;
            var context = new VRMImporterContext();

            context.ParseGlb(File.ReadAllBytes(path));
            context.Load();
            context.ShowMeshes();
            context.EnableUpdateWhenOffscreen();

            foreach (var mesh in context.Meshes)
            {
                var src = mesh.Mesh;
                var dst = src.Copy(true);
                MeshTests.MeshEquals(src, dst);
            }
        }
コード例 #2
0
        public void MeshCopyTest()
        {
            var path = AliciaPath;
            var data = new GlbFileParser(path).Parse();

            using (var context = new VRMImporterContext(new VRMData(data)))
                using (var loaded = context.Load())
                {
                    loaded.ShowMeshes();
                    loaded.EnableUpdateWhenOffscreen();
                    foreach (var mesh in context.Meshes)
                    {
                        var src = mesh.Mesh;
                        var dst = src.Copy(true);
                        MeshTests.MeshEquals(src, dst);
                    }
                }
        }