Separate Byte4.cs and UShort4.cs

This commit is contained in:
ousttrue
2021-10-26 14:11:06 +09:00
parent 81c6c743db
commit 767aeeb9bd
5 changed files with 65 additions and 43 deletions

View File

@@ -1,46 +1,11 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
using System.IO;
using UniJSON;
namespace UniGLTF
{
[Serializable, StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Byte4
{
public readonly byte x;
public readonly byte y;
public readonly byte z;
public readonly byte w;
public Byte4(byte _x, byte _y, byte _z, byte _w)
{
x = _x;
y = _y;
z = _z;
w = _w;
}
}
[Serializable, StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct UShort4
{
public readonly ushort x;
public readonly ushort y;
public readonly ushort z;
public readonly ushort w;
public UShort4(ushort _x, ushort _y, ushort _z, ushort _w)
{
x = _x;
y = _y;
z = _z;
w = _w;
}
}
public static class glTFExtensions
{
struct ComponentVec
@@ -239,14 +204,6 @@ namespace UniGLTF
return index;
}
static Utf8String s_extensions = Utf8String.From("extensions");
static bool UsedExtension(this glTF self, string key)

View File

@@ -0,0 +1,21 @@
using System;
using System.Runtime.InteropServices;
namespace UniGLTF
{
[Serializable, StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Byte4
{
public readonly byte x;
public readonly byte y;
public readonly byte z;
public readonly byte w;
public Byte4(byte _x, byte _y, byte _z, byte _w)
{
x = _x;
y = _y;
z = _z;
w = _w;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7d396586954b6d34a84d9af8638e492e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
using System;
using System.Runtime.InteropServices;
namespace UniGLTF
{
[Serializable, StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct UShort4
{
public readonly ushort x;
public readonly ushort y;
public readonly ushort z;
public readonly ushort w;
public UShort4(ushort _x, ushort _y, ushort _z, ushort _w)
{
x = _x;
y = _y;
z = _z;
w = _w;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b1f199669bb47f747865a96bcd7bcbfb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: