@galacean/engine-loader 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +193 -212
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +193 -212
- package/dist/module.js +193 -213
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
- package/types/GLTFContentRestorer.d.ts +7 -6
- package/types/gltf/GLTFUtils.d.ts +2 -7
- package/types/gltf/parser/GLTFMeshParser.d.ts +11 -6
- package/types/gltf/parser/GLTFParser.d.ts +1 -1
- package/types/gltf/parser/GLTFParserContext.d.ts +7 -6
- package/types/gltf/parser/index.d.ts +2 -1
- package/types/PrimitiveMeshLoader.d.ts +0 -1
- package/types/gltf/GLTFParser.d.ts +0 -9
- package/types/gltf/GLTFPipeline.d.ts +0 -23
- package/types/gltf/GLTFUtil.d.ts +0 -53
- package/types/gltf/Schema.d.ts +0 -814
- package/types/gltf/extensions/EXT_meshopt_compression.d.ts +0 -13
- package/types/gltf/extensions/ExtensionParser.d.ts +0 -8
- package/types/gltf/extensions/KHR_materials_anisotropy.d.ts +0 -1
- package/types/gltf/extensions/MeshoptDecoder.d.ts +0 -8
- package/types/gltf/extensions/Schema.d.ts +0 -142
- package/types/gltf/parser/AnimationParser.d.ts +0 -7
- package/types/gltf/parser/BufferParser.d.ts +0 -7
- package/types/gltf/parser/EntityParser.d.ts +0 -9
- package/types/gltf/parser/MaterialParser.d.ts +0 -8
- package/types/gltf/parser/MeshParser.d.ts +0 -13
- package/types/gltf/parser/Parser.d.ts +0 -21
- package/types/gltf/parser/ParserContext.d.ts +0 -46
- package/types/gltf/parser/SceneParser.d.ts +0 -11
- package/types/gltf/parser/SkinParser.d.ts +0 -6
- package/types/gltf/parser/TextureParser.d.ts +0 -8
- package/types/gltf/parser/Validator.d.ts +0 -5
- package/types/ktx2/BinomialLLCTranscoder/BinomialLLCTranscoder.d.ts +0 -13
- package/types/ktx2/BinomialLLCTranscoder/TranscodeWorkerCode.d.ts +0 -33
- package/types/ktx2/KhronosTranscoder/KhronosTranscoder.d.ts +0 -17
- package/types/ktx2/KhronosTranscoder/TranscoderWorkerCode.d.ts +0 -34
- package/types/ktx2/TranscodeResult.d.ts +0 -10
- package/types/ktx2/constants.d.ts +0 -7
- package/types/ktx2/zstddec.d.ts +0 -62
- package/types/resource-deserialize/resources/parser/HierarchyParser.d.ts +0 -36
- package/types/resource-deserialize/resources/parser/ParserContext.d.ts +0 -29
- package/types/resource-deserialize/resources/prefab/PrefabDesign.d.ts +0 -70
- package/types/resource-deserialize/resources/prefab/PrefabParser.d.ts +0 -14
- package/types/resource-deserialize/resources/prefab/PrefabParserContext.d.ts +0 -5
- package/types/resource-deserialize/resources/prefab/ReflectionParser.d.ts +0 -14
package/dist/miniprogram.js
CHANGED
|
@@ -1600,7 +1600,7 @@ var TextureWrapMode;
|
|
|
1600
1600
|
var glTFItems = this.glTF[glTFSchemaMap[type]];
|
|
1601
1601
|
if (glTFItems && (index === undefined || glTFItems[index])) {
|
|
1602
1602
|
if (index === undefined) {
|
|
1603
|
-
resource = type ===
|
|
1603
|
+
resource = type === 8 ? glTFItems.map(function(_, index) {
|
|
1604
1604
|
return _this.get(type, index);
|
|
1605
1605
|
}) : Promise.all(glTFItems.map(function(_, index) {
|
|
1606
1606
|
return _this.get(type, index);
|
|
@@ -1622,11 +1622,11 @@ var TextureWrapMode;
|
|
|
1622
1622
|
_this.glTF = json;
|
|
1623
1623
|
return Promise.all([
|
|
1624
1624
|
_this.get(1),
|
|
1625
|
-
_this.get(4),
|
|
1626
1625
|
_this.get(5),
|
|
1627
1626
|
_this.get(6),
|
|
1628
|
-
_this.get(
|
|
1627
|
+
_this.get(7),
|
|
1629
1628
|
_this.get(9),
|
|
1629
|
+
_this.get(10),
|
|
1630
1630
|
_this.get(2)
|
|
1631
1631
|
]).then(function() {
|
|
1632
1632
|
var glTFResource = _this.glTFResource;
|
|
@@ -1664,7 +1664,7 @@ var TextureWrapMode;
|
|
|
1664
1664
|
var _this = this;
|
|
1665
1665
|
var glTFResourceKey = glTFResourceMap[type];
|
|
1666
1666
|
if (!glTFResourceKey) return;
|
|
1667
|
-
if (type ===
|
|
1667
|
+
if (type === 8) {
|
|
1668
1668
|
var _this_glTFResource, _glTFResourceKey;
|
|
1669
1669
|
((_this_glTFResource = this.glTFResource)[_glTFResourceKey = glTFResourceKey] || (_this_glTFResource[_glTFResourceKey] = []))[index] = resource;
|
|
1670
1670
|
} else {
|
|
@@ -1672,7 +1672,7 @@ var TextureWrapMode;
|
|
|
1672
1672
|
resource.then(function(item) {
|
|
1673
1673
|
var _this_glTFResource, _glTFResourceKey;
|
|
1674
1674
|
((_this_glTFResource = _this.glTFResource)[_glTFResourceKey = glTFResourceKey] || (_this_glTFResource[_glTFResourceKey] = []))[index] = item;
|
|
1675
|
-
if (type ===
|
|
1675
|
+
if (type === 7) {
|
|
1676
1676
|
for(var i = 0, length = item.length; i < length; i++){
|
|
1677
1677
|
var mesh = item[i];
|
|
1678
1678
|
// @ts-ignore
|
|
@@ -1712,17 +1712,18 @@ exports.GLTFParserType = void 0;
|
|
|
1712
1712
|
GLTFParserType[GLTFParserType["Validator"] = 1] = "Validator";
|
|
1713
1713
|
GLTFParserType[GLTFParserType["Scene"] = 2] = "Scene";
|
|
1714
1714
|
GLTFParserType[GLTFParserType["Buffer"] = 3] = "Buffer";
|
|
1715
|
-
GLTFParserType[GLTFParserType["
|
|
1716
|
-
GLTFParserType[GLTFParserType["
|
|
1717
|
-
GLTFParserType[GLTFParserType["
|
|
1718
|
-
GLTFParserType[GLTFParserType["
|
|
1719
|
-
GLTFParserType[GLTFParserType["
|
|
1720
|
-
GLTFParserType[GLTFParserType["
|
|
1715
|
+
GLTFParserType[GLTFParserType["BufferView"] = 4] = "BufferView";
|
|
1716
|
+
GLTFParserType[GLTFParserType["Texture"] = 5] = "Texture";
|
|
1717
|
+
GLTFParserType[GLTFParserType["Material"] = 6] = "Material";
|
|
1718
|
+
GLTFParserType[GLTFParserType["Mesh"] = 7] = "Mesh";
|
|
1719
|
+
GLTFParserType[GLTFParserType["Entity"] = 8] = "Entity";
|
|
1720
|
+
GLTFParserType[GLTFParserType["Skin"] = 9] = "Skin";
|
|
1721
|
+
GLTFParserType[GLTFParserType["Animation"] = 10] = "Animation";
|
|
1721
1722
|
})(exports.GLTFParserType || (exports.GLTFParserType = {}));
|
|
1722
1723
|
var _obj;
|
|
1723
|
-
var glTFSchemaMap = (_obj = {}, _obj[2] = "scenes", _obj[3] = "buffers", _obj[
|
|
1724
|
+
var glTFSchemaMap = (_obj = {}, _obj[2] = "scenes", _obj[3] = "buffers", _obj[5] = "textures", _obj[6] = "materials", _obj[7] = "meshes", _obj[8] = "nodes", _obj[9] = "skins", _obj[10] = "animations", _obj[4] = "bufferViews", _obj);
|
|
1724
1725
|
var _obj1;
|
|
1725
|
-
var glTFResourceMap = (_obj1 = {}, _obj1[2] = "sceneRoots", _obj1[
|
|
1726
|
+
var glTFResourceMap = (_obj1 = {}, _obj1[2] = "sceneRoots", _obj1[5] = "textures", _obj1[6] = "materials", _obj1[7] = "meshes", _obj1[8] = "entities", _obj1[9] = "skins", _obj1[10] = "animations", _obj1);
|
|
1726
1727
|
function registerGLTFParser(pipeline) {
|
|
1727
1728
|
return function(Parser) {
|
|
1728
1729
|
var parser = new Parser();
|
|
@@ -1827,113 +1828,68 @@ function registerGLTFParser(pipeline) {
|
|
|
1827
1828
|
};
|
|
1828
1829
|
GLTFUtils.getAccessorBuffer = function getAccessorBuffer(context, bufferViews, accessor) {
|
|
1829
1830
|
var componentType = accessor.componentType;
|
|
1830
|
-
var
|
|
1831
|
-
var
|
|
1832
|
-
var
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
var
|
|
1838
|
-
var
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1831
|
+
var TypedArray = GLTFUtils.getComponentType(componentType);
|
|
1832
|
+
var dataElementSize = GLTFUtils.getAccessorTypeSize(accessor.type);
|
|
1833
|
+
var dataElementBytes = TypedArray.BYTES_PER_ELEMENT;
|
|
1834
|
+
var elementStride = dataElementSize * dataElementBytes;
|
|
1835
|
+
var accessorCount = accessor.count;
|
|
1836
|
+
var promise;
|
|
1837
|
+
if (accessor.bufferView !== undefined) {
|
|
1838
|
+
var bufferViewIndex = accessor.bufferView;
|
|
1839
|
+
var bufferView = bufferViews[bufferViewIndex];
|
|
1840
|
+
promise = context.get(exports.GLTFParserType.BufferView, accessor.bufferView).then(function(bufferViewData) {
|
|
1841
|
+
var bufferIndex = bufferView.buffer;
|
|
1842
|
+
var _bufferViewData_byteOffset;
|
|
1843
|
+
var bufferByteOffset = (_bufferViewData_byteOffset = bufferViewData.byteOffset) != null ? _bufferViewData_byteOffset : 0;
|
|
1844
|
+
var _accessor_byteOffset;
|
|
1845
|
+
var byteOffset = (_accessor_byteOffset = accessor.byteOffset) != null ? _accessor_byteOffset : 0;
|
|
1846
|
+
var bufferStride = bufferView.byteStride;
|
|
1847
|
+
var bufferInfo;
|
|
1848
|
+
// According to the glTF official documentation only byteStride not undefined is allowed
|
|
1849
|
+
if (bufferStride !== undefined && bufferStride !== elementStride) {
|
|
1850
|
+
var bufferSlice = Math.floor(byteOffset / bufferStride);
|
|
1851
|
+
var bufferCacheKey = bufferViewIndex + ":" + componentType + ":" + bufferSlice + ":" + accessorCount;
|
|
1852
|
+
var accessorBufferCache = context.accessorBufferCache;
|
|
1853
|
+
bufferInfo = accessorBufferCache[bufferCacheKey];
|
|
1854
|
+
if (!bufferInfo) {
|
|
1855
|
+
var offset = bufferByteOffset + bufferSlice * bufferStride;
|
|
1856
|
+
var count = accessorCount * (bufferStride / dataElementBytes);
|
|
1857
|
+
var data = new TypedArray(bufferViewData.buffer, offset, count);
|
|
1858
|
+
accessorBufferCache[bufferCacheKey] = bufferInfo = new BufferInfo(data, true, bufferStride);
|
|
1859
|
+
bufferInfo.restoreInfo = new BufferDataRestoreInfo(new RestoreDataAccessor(bufferIndex, TypedArray, offset, count));
|
|
1860
|
+
}
|
|
1861
|
+
} else {
|
|
1862
|
+
var offset1 = bufferByteOffset + byteOffset;
|
|
1863
|
+
var count1 = accessorCount * dataElementSize;
|
|
1864
|
+
var data1 = new TypedArray(bufferViewData.buffer, offset1, count1);
|
|
1865
|
+
bufferInfo = new BufferInfo(data1, false, elementStride);
|
|
1866
|
+
bufferInfo.restoreInfo = new BufferDataRestoreInfo(new RestoreDataAccessor(bufferIndex, TypedArray, offset1, count1));
|
|
1859
1867
|
}
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
return bufferInfo
|
|
1871
|
-
|
|
1868
|
+
return bufferInfo;
|
|
1869
|
+
});
|
|
1870
|
+
} else {
|
|
1871
|
+
var count = accessorCount * dataElementSize;
|
|
1872
|
+
var data = new TypedArray(count);
|
|
1873
|
+
var bufferInfo = new BufferInfo(data, false, elementStride);
|
|
1874
|
+
bufferInfo.restoreInfo = new BufferDataRestoreInfo(new RestoreDataAccessor(undefined, TypedArray, undefined, count));
|
|
1875
|
+
promise = Promise.resolve(bufferInfo);
|
|
1876
|
+
}
|
|
1877
|
+
return accessor.sparse ? promise.then(function(bufferInfo) {
|
|
1878
|
+
return GLTFUtils.processingSparseData(context, accessor, bufferInfo).then(function() {
|
|
1879
|
+
return bufferInfo;
|
|
1880
|
+
});
|
|
1881
|
+
}) : promise;
|
|
1872
1882
|
};
|
|
1873
|
-
GLTFUtils.bufferToVector3Array = function bufferToVector3Array(
|
|
1874
|
-
var
|
|
1875
|
-
var
|
|
1876
|
-
var
|
|
1877
|
-
var
|
|
1883
|
+
GLTFUtils.bufferToVector3Array = function bufferToVector3Array(buffer, byteOffset, count, normalized, componentType) {
|
|
1884
|
+
var baseOffset = byteOffset / buffer.BYTES_PER_ELEMENT;
|
|
1885
|
+
var stride = buffer.length / count;
|
|
1886
|
+
var vertices = new Array(count);
|
|
1887
|
+
var factor = normalized ? GLTFUtils.getNormalizedComponentScale(componentType) : 1;
|
|
1878
1888
|
for(var i = 0; i < count; i++){
|
|
1879
|
-
var index =
|
|
1880
|
-
|
|
1889
|
+
var index = baseOffset + i * stride;
|
|
1890
|
+
vertices[i] = new miniprogram$1.Vector3(buffer[index] * factor, buffer[index + 1] * factor, buffer[index + 2] * factor);
|
|
1881
1891
|
}
|
|
1882
|
-
return
|
|
1883
|
-
};
|
|
1884
|
-
/**
|
|
1885
|
-
* @deprecated
|
|
1886
|
-
* Get accessor data.
|
|
1887
|
-
*/ GLTFUtils.getAccessorData = function getAccessorData(glTF, accessor, buffers) {
|
|
1888
|
-
var bufferViews = glTF.bufferViews;
|
|
1889
|
-
var _accessor_bufferView;
|
|
1890
|
-
var bufferView = bufferViews[(_accessor_bufferView = accessor.bufferView) != null ? _accessor_bufferView : 0];
|
|
1891
|
-
var arrayBuffer = buffers[bufferView.buffer];
|
|
1892
|
-
var accessorByteOffset = accessor.hasOwnProperty("byteOffset") ? accessor.byteOffset : 0;
|
|
1893
|
-
var bufferViewByteOffset = bufferView.hasOwnProperty("byteOffset") ? bufferView.byteOffset : 0;
|
|
1894
|
-
var byteOffset = accessorByteOffset + bufferViewByteOffset;
|
|
1895
|
-
var accessorTypeSize = GLTFUtils.getAccessorTypeSize(accessor.type);
|
|
1896
|
-
var length = accessorTypeSize * accessor.count;
|
|
1897
|
-
var _bufferView_byteStride;
|
|
1898
|
-
var byteStride = (_bufferView_byteStride = bufferView.byteStride) != null ? _bufferView_byteStride : 0;
|
|
1899
|
-
var arrayType = GLTFUtils.getComponentType(accessor.componentType);
|
|
1900
|
-
var uint8Array;
|
|
1901
|
-
if (byteStride) {
|
|
1902
|
-
var accessorByteSize = accessorTypeSize * arrayType.BYTES_PER_ELEMENT;
|
|
1903
|
-
uint8Array = new Uint8Array(accessor.count * accessorByteSize);
|
|
1904
|
-
var originalBufferView = new Uint8Array(arrayBuffer, bufferViewByteOffset, bufferView.byteLength);
|
|
1905
|
-
for(var i = 0; i < accessor.count; i++){
|
|
1906
|
-
for(var j = 0; j < accessorByteSize; j++){
|
|
1907
|
-
uint8Array[i * accessorByteSize + j] = originalBufferView[i * byteStride + accessorByteOffset + j];
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
} else {
|
|
1911
|
-
uint8Array = new Uint8Array(arrayBuffer.slice(byteOffset, byteOffset + length * arrayType.BYTES_PER_ELEMENT));
|
|
1912
|
-
}
|
|
1913
|
-
var typedArray = new arrayType(uint8Array.buffer);
|
|
1914
|
-
if (accessor.sparse) {
|
|
1915
|
-
var _accessor_sparse = accessor.sparse, count = _accessor_sparse.count, indices = _accessor_sparse.indices, values = _accessor_sparse.values;
|
|
1916
|
-
var indicesBufferView = bufferViews[indices.bufferView];
|
|
1917
|
-
var valuesBufferView = bufferViews[values.bufferView];
|
|
1918
|
-
var indicesArrayBuffer = buffers[indicesBufferView.buffer];
|
|
1919
|
-
var valuesArrayBuffer = buffers[valuesBufferView.buffer];
|
|
1920
|
-
var _indices_byteOffset, _indicesBufferView_byteOffset;
|
|
1921
|
-
var indicesByteOffset = ((_indices_byteOffset = indices.byteOffset) != null ? _indices_byteOffset : 0) + ((_indicesBufferView_byteOffset = indicesBufferView.byteOffset) != null ? _indicesBufferView_byteOffset : 0);
|
|
1922
|
-
var indicesByteLength = indicesBufferView.byteLength;
|
|
1923
|
-
var _values_byteOffset, _valuesBufferView_byteOffset;
|
|
1924
|
-
var valuesByteOffset = ((_values_byteOffset = values.byteOffset) != null ? _values_byteOffset : 0) + ((_valuesBufferView_byteOffset = valuesBufferView.byteOffset) != null ? _valuesBufferView_byteOffset : 0);
|
|
1925
|
-
var valuesByteLength = valuesBufferView.byteLength;
|
|
1926
|
-
var indicesType = GLTFUtils.getComponentType(indices.componentType);
|
|
1927
|
-
var indicesArray = new indicesType(indicesArrayBuffer, indicesByteOffset, indicesByteLength / indicesType.BYTES_PER_ELEMENT);
|
|
1928
|
-
var valuesArray = new arrayType(valuesArrayBuffer, valuesByteOffset, valuesByteLength / arrayType.BYTES_PER_ELEMENT);
|
|
1929
|
-
for(var i1 = 0; i1 < count; i1++){
|
|
1930
|
-
var replaceIndex = indicesArray[i1];
|
|
1931
|
-
for(var j1 = 0; j1 < accessorTypeSize; j1++){
|
|
1932
|
-
typedArray[replaceIndex * accessorTypeSize + j1] = valuesArray[i1 * accessorTypeSize + j1];
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
return typedArray;
|
|
1892
|
+
return vertices;
|
|
1937
1893
|
};
|
|
1938
1894
|
GLTFUtils.getBufferViewData = function getBufferViewData(bufferView, buffers) {
|
|
1939
1895
|
var _bufferView_byteOffset = bufferView.byteOffset, byteOffset = _bufferView_byteOffset === void 0 ? 0 : _bufferView_byteOffset;
|
|
@@ -1942,40 +1898,43 @@ function registerGLTFParser(pipeline) {
|
|
|
1942
1898
|
};
|
|
1943
1899
|
/**
|
|
1944
1900
|
* Get accessor data.
|
|
1945
|
-
*/ GLTFUtils.processingSparseData = function processingSparseData(
|
|
1901
|
+
*/ GLTFUtils.processingSparseData = function processingSparseData(context, accessor, bufferInfo) {
|
|
1946
1902
|
var restoreInfo = bufferInfo.restoreInfo;
|
|
1903
|
+
var bufferViews = context.glTF.bufferViews;
|
|
1947
1904
|
var accessorTypeSize = GLTFUtils.getAccessorTypeSize(accessor.type);
|
|
1948
1905
|
var TypedArray = GLTFUtils.getComponentType(accessor.componentType);
|
|
1949
1906
|
var data = bufferInfo.data.slice();
|
|
1950
1907
|
var _accessor_sparse = accessor.sparse, count = _accessor_sparse.count, indices = _accessor_sparse.indices, values = _accessor_sparse.values;
|
|
1951
1908
|
var indicesBufferView = bufferViews[indices.bufferView];
|
|
1952
1909
|
var valuesBufferView = bufferViews[values.bufferView];
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
var
|
|
1974
|
-
|
|
1975
|
-
|
|
1910
|
+
return Promise.all([
|
|
1911
|
+
context.get(exports.GLTFParserType.BufferView, indices.bufferView),
|
|
1912
|
+
context.get(exports.GLTFParserType.BufferView, values.bufferView)
|
|
1913
|
+
]).then(function(param) {
|
|
1914
|
+
var indicesUint8Array = param[0], valuesUin8Array = param[1];
|
|
1915
|
+
var _indices_byteOffset, _indicesUint8Array_byteOffset;
|
|
1916
|
+
var indicesByteOffset = ((_indices_byteOffset = indices.byteOffset) != null ? _indices_byteOffset : 0) + ((_indicesUint8Array_byteOffset = indicesUint8Array.byteOffset) != null ? _indicesUint8Array_byteOffset : 0);
|
|
1917
|
+
var indicesByteLength = indicesUint8Array.byteLength;
|
|
1918
|
+
var _values_byteOffset, _valuesUin8Array_byteOffset;
|
|
1919
|
+
var valuesByteOffset = ((_values_byteOffset = values.byteOffset) != null ? _values_byteOffset : 0) + ((_valuesUin8Array_byteOffset = valuesUin8Array.byteOffset) != null ? _valuesUin8Array_byteOffset : 0);
|
|
1920
|
+
var valuesByteLength = valuesUin8Array.byteLength;
|
|
1921
|
+
restoreInfo.typeSize = accessorTypeSize;
|
|
1922
|
+
restoreInfo.sparseCount = count;
|
|
1923
|
+
var IndexTypeArray = GLTFUtils.getComponentType(indices.componentType);
|
|
1924
|
+
var indexLength = indicesByteLength / IndexTypeArray.BYTES_PER_ELEMENT;
|
|
1925
|
+
var indicesArray = new IndexTypeArray(indicesUint8Array.buffer, indicesByteOffset, indexLength);
|
|
1926
|
+
restoreInfo.sparseIndices = new RestoreDataAccessor(indicesBufferView.buffer, IndexTypeArray, indicesByteOffset, indexLength);
|
|
1927
|
+
var valueLength = valuesByteLength / TypedArray.BYTES_PER_ELEMENT;
|
|
1928
|
+
var valuesArray = new TypedArray(valuesUin8Array.buffer, valuesByteOffset, valueLength);
|
|
1929
|
+
restoreInfo.sparseValues = new RestoreDataAccessor(valuesBufferView.buffer, TypedArray, valuesByteOffset, valueLength);
|
|
1930
|
+
for(var i = 0; i < count; i++){
|
|
1931
|
+
var replaceIndex = indicesArray[i];
|
|
1932
|
+
for(var j = 0; j < accessorTypeSize; j++){
|
|
1933
|
+
data[replaceIndex * accessorTypeSize + j] = valuesArray[i * accessorTypeSize + j];
|
|
1934
|
+
}
|
|
1976
1935
|
}
|
|
1977
|
-
|
|
1978
|
-
|
|
1936
|
+
bufferInfo.data = data;
|
|
1937
|
+
});
|
|
1979
1938
|
};
|
|
1980
1939
|
GLTFUtils.getIndexFormat = function getIndexFormat(type) {
|
|
1981
1940
|
switch(type){
|
|
@@ -3241,16 +3200,16 @@ exports.KTX2Transcoder = void 0;
|
|
|
3241
3200
|
var frame = restoreInfo.blendShape.frames[0];
|
|
3242
3201
|
var position = restoreInfo.position;
|
|
3243
3202
|
var positionData = _this._getBufferData(buffers, position.buffer);
|
|
3244
|
-
frame.deltaPositions = GLTFUtils.bufferToVector3Array(positionData, position.
|
|
3203
|
+
frame.deltaPositions = GLTFUtils.bufferToVector3Array(positionData, position.byteOffset, position.count, position.normalized, position.componentType);
|
|
3245
3204
|
if (restoreInfo.normal) {
|
|
3246
3205
|
var normal = restoreInfo.normal;
|
|
3247
3206
|
var normalData = _this._getBufferData(buffers, normal.buffer);
|
|
3248
|
-
frame.deltaNormals = GLTFUtils.bufferToVector3Array(normalData, normal.
|
|
3207
|
+
frame.deltaNormals = GLTFUtils.bufferToVector3Array(normalData, normal.byteOffset, normal.count, normal.normalized, normal.componentType);
|
|
3249
3208
|
}
|
|
3250
3209
|
if (restoreInfo.tangent) {
|
|
3251
3210
|
var tangent = restoreInfo.tangent;
|
|
3252
3211
|
var tangentData = _this._getBufferData(buffers, tangent.buffer);
|
|
3253
|
-
frame.deltaTangents = GLTFUtils.bufferToVector3Array(tangentData, tangent.
|
|
3212
|
+
frame.deltaTangents = GLTFUtils.bufferToVector3Array(tangentData, tangent.byteOffset, tangent.count, tangent.normalized, tangent.componentType);
|
|
3254
3213
|
}
|
|
3255
3214
|
}
|
|
3256
3215
|
mesh.uploadData(true);
|
|
@@ -3262,8 +3221,13 @@ exports.KTX2Transcoder = void 0;
|
|
|
3262
3221
|
};
|
|
3263
3222
|
_proto._getBufferData = function _getBufferData(buffers, restoreInfo) {
|
|
3264
3223
|
var main = restoreInfo.main;
|
|
3265
|
-
var
|
|
3266
|
-
|
|
3224
|
+
var data;
|
|
3225
|
+
if (main) {
|
|
3226
|
+
var buffer = buffers[main.bufferIndex];
|
|
3227
|
+
data = new main.TypedArray(buffer, main.byteOffset, main.length);
|
|
3228
|
+
} else {
|
|
3229
|
+
data = new main.TypedArray(main.length);
|
|
3230
|
+
}
|
|
3267
3231
|
var sparseCount = restoreInfo.sparseCount;
|
|
3268
3232
|
if (sparseCount) {
|
|
3269
3233
|
var sparseIndex = restoreInfo.sparseIndices;
|
|
@@ -3336,11 +3300,12 @@ exports.KTX2Transcoder = void 0;
|
|
|
3336
3300
|
};
|
|
3337
3301
|
/**
|
|
3338
3302
|
* @internal
|
|
3339
|
-
*/ var BlendShapeDataRestoreInfo = function BlendShapeDataRestoreInfo(buffer,
|
|
3303
|
+
*/ var BlendShapeDataRestoreInfo = function BlendShapeDataRestoreInfo(buffer, byteOffset, count, normalized, componentType) {
|
|
3340
3304
|
this.buffer = buffer;
|
|
3341
|
-
this.stride = stride;
|
|
3342
3305
|
this.byteOffset = byteOffset;
|
|
3343
3306
|
this.count = count;
|
|
3307
|
+
this.normalized = normalized;
|
|
3308
|
+
this.componentType = componentType;
|
|
3344
3309
|
};
|
|
3345
3310
|
|
|
3346
3311
|
/**
|
|
@@ -3936,7 +3901,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
|
|
|
3936
3901
|
resolve(mesh);
|
|
3937
3902
|
} else {
|
|
3938
3903
|
mesh.then(function(mesh) {
|
|
3939
|
-
|
|
3904
|
+
resolve(mesh);
|
|
3940
3905
|
});
|
|
3941
3906
|
}
|
|
3942
3907
|
} else {
|
|
@@ -3944,35 +3909,20 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
|
|
|
3944
3909
|
var meshRestoreInfo = new ModelMeshRestoreInfo();
|
|
3945
3910
|
meshRestoreInfo.mesh = mesh1;
|
|
3946
3911
|
context.contentRestorer.meshes.push(meshRestoreInfo);
|
|
3947
|
-
exports.GLTFMeshParser._parseMeshFromGLTFPrimitive(context, mesh1, meshRestoreInfo, meshInfo, gltfPrimitive, glTF,
|
|
3948
|
-
return null;
|
|
3949
|
-
}, function(attributeName, shapeIndex) {
|
|
3950
|
-
var shapeAccessorIdx = gltfPrimitive.targets[shapeIndex];
|
|
3951
|
-
var attributeAccessorIdx = shapeAccessorIdx[attributeName];
|
|
3952
|
-
if (attributeAccessorIdx) {
|
|
3953
|
-
var accessor = glTF.accessors[attributeAccessorIdx];
|
|
3954
|
-
return GLTFUtils.getAccessorBuffer(context, context.glTF.bufferViews, accessor);
|
|
3955
|
-
} else {
|
|
3956
|
-
return null;
|
|
3957
|
-
}
|
|
3958
|
-
}, function() {
|
|
3959
|
-
var indexAccessor = glTF.accessors[gltfPrimitive.indices];
|
|
3960
|
-
return context.get(exports.GLTFParserType.Buffer).then(function(buffers) {
|
|
3961
|
-
return GLTFUtils.getAccessorData(glTF, indexAccessor, buffers);
|
|
3962
|
-
});
|
|
3963
|
-
}, context.params.keepMeshData).then(resolve);
|
|
3912
|
+
exports.GLTFMeshParser._parseMeshFromGLTFPrimitive(context, mesh1, meshRestoreInfo, meshInfo, gltfPrimitive, glTF, context.params.keepMeshData).then(resolve);
|
|
3964
3913
|
}
|
|
3965
3914
|
});
|
|
3966
3915
|
};
|
|
3967
3916
|
var meshInfo = context.glTF.meshes[index];
|
|
3968
|
-
var glTF = context.glTF,
|
|
3917
|
+
var glTF = context.glTF, glTFResource = context.glTFResource;
|
|
3918
|
+
var engine = glTFResource.engine;
|
|
3969
3919
|
var primitivePromises = new Array();
|
|
3970
3920
|
for(var i = 0, length = meshInfo.primitives.length; i < length; i++)_loop(i);
|
|
3971
3921
|
return Promise.all(primitivePromises);
|
|
3972
3922
|
};
|
|
3973
3923
|
/**
|
|
3974
3924
|
* @internal
|
|
3975
|
-
*/ GLTFMeshParser1._parseMeshFromGLTFPrimitive = function _parseMeshFromGLTFPrimitive(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, gltf,
|
|
3925
|
+
*/ GLTFMeshParser1._parseMeshFromGLTFPrimitive = function _parseMeshFromGLTFPrimitive(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, gltf, keepMeshData) {
|
|
3976
3926
|
var _loop = function(attribute) {
|
|
3977
3927
|
var accessor = accessors[attributes[attribute]];
|
|
3978
3928
|
var promise = GLTFUtils.getAccessorBuffer(context, gltf.bufferViews, accessor).then(function(accessorBuffer) {
|
|
@@ -4043,6 +3993,7 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
|
|
|
4043
3993
|
});
|
|
4044
3994
|
promises.push(promise);
|
|
4045
3995
|
};
|
|
3996
|
+
var _this = this;
|
|
4046
3997
|
var accessors = gltf.accessors;
|
|
4047
3998
|
var attributes = gltfPrimitive.attributes, targets = gltfPrimitive.targets, indices = gltfPrimitive.indices, mode = gltfPrimitive.mode;
|
|
4048
3999
|
var engine = mesh.engine;
|
|
@@ -4067,61 +4018,68 @@ exports.GLTFMeshParser = (_GLTFMeshParser = /*#__PURE__*/ function(GLTFParser1)
|
|
|
4067
4018
|
}
|
|
4068
4019
|
// BlendShapes
|
|
4069
4020
|
if (targets) {
|
|
4070
|
-
promises.push(exports.GLTFMeshParser._createBlendShape(mesh, meshRestoreInfo, gltfMesh,
|
|
4021
|
+
promises.push(exports.GLTFMeshParser._createBlendShape(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, targets, _this._getBlendShapeData));
|
|
4071
4022
|
}
|
|
4072
4023
|
return Promise.all(promises).then(function() {
|
|
4073
4024
|
mesh.uploadData(!keepMeshData);
|
|
4074
|
-
return
|
|
4025
|
+
return mesh;
|
|
4075
4026
|
});
|
|
4076
4027
|
});
|
|
4077
4028
|
};
|
|
4029
|
+
GLTFMeshParser1._getBlendShapeData = function _getBlendShapeData(context, glTF, accessor) {
|
|
4030
|
+
return GLTFUtils.getAccessorBuffer(context, glTF.bufferViews, accessor).then(function(bufferInfo) {
|
|
4031
|
+
var buffer = bufferInfo.data;
|
|
4032
|
+
var _accessor_byteOffset;
|
|
4033
|
+
var byteOffset = bufferInfo.interleaved ? ((_accessor_byteOffset = accessor.byteOffset) != null ? _accessor_byteOffset : 0) % bufferInfo.stride : 0;
|
|
4034
|
+
var count = accessor.count, normalized = accessor.normalized, componentType = accessor.componentType;
|
|
4035
|
+
var vertices = GLTFUtils.bufferToVector3Array(buffer, byteOffset, count, normalized, componentType);
|
|
4036
|
+
var restoreInfo = new BlendShapeDataRestoreInfo(bufferInfo.restoreInfo, byteOffset, count, normalized, componentType);
|
|
4037
|
+
return {
|
|
4038
|
+
vertices: vertices,
|
|
4039
|
+
restoreInfo: restoreInfo
|
|
4040
|
+
};
|
|
4041
|
+
});
|
|
4042
|
+
};
|
|
4078
4043
|
/**
|
|
4079
4044
|
* @internal
|
|
4080
|
-
*/ GLTFMeshParser1._createBlendShape = function _createBlendShape(mesh, meshRestoreInfo, glTFMesh,
|
|
4081
|
-
var _loop = function(i
|
|
4045
|
+
*/ GLTFMeshParser1._createBlendShape = function _createBlendShape(context, mesh, meshRestoreInfo, glTFMesh, gltfPrimitive, glTFTargets, getBlendShapeData) {
|
|
4046
|
+
var _loop = function(i) {
|
|
4047
|
+
var blendShapeData = {};
|
|
4048
|
+
blendShapeCollection[i] = blendShapeData;
|
|
4082
4049
|
var name = blendShapeNames ? blendShapeNames[i] : "blendShape" + i;
|
|
4050
|
+
var targets = gltfPrimitive.targets[i];
|
|
4051
|
+
var normalTarget = targets["NORMAL"];
|
|
4052
|
+
var tangentTarget = targets["TANGENT"];
|
|
4053
|
+
var hasNormal = normalTarget !== undefined;
|
|
4054
|
+
var hasTangent = tangentTarget !== undefined;
|
|
4083
4055
|
var promise = Promise.all([
|
|
4084
|
-
getBlendShapeData("POSITION"
|
|
4085
|
-
getBlendShapeData(
|
|
4086
|
-
getBlendShapeData(
|
|
4087
|
-
]).then(function(
|
|
4088
|
-
var
|
|
4089
|
-
var
|
|
4090
|
-
var tanBufferInfo = infos[2];
|
|
4091
|
-
var target = glTFTargets[i];
|
|
4092
|
-
var posAccessor;
|
|
4093
|
-
var norAccessor;
|
|
4094
|
-
var tanAccessor;
|
|
4095
|
-
var positions = null;
|
|
4096
|
-
if (posBufferInfo) {
|
|
4097
|
-
posAccessor = accessors[target["POSITION"]];
|
|
4098
|
-
var _posAccessor_byteOffset;
|
|
4099
|
-
positions = GLTFUtils.bufferToVector3Array(posBufferInfo.data, posBufferInfo.stride, (_posAccessor_byteOffset = posAccessor.byteOffset) != null ? _posAccessor_byteOffset : 0, posAccessor.count);
|
|
4100
|
-
}
|
|
4101
|
-
var normals = null;
|
|
4102
|
-
if (norBufferInfo) {
|
|
4103
|
-
norAccessor = accessors[target["NORMAL"]];
|
|
4104
|
-
var _norAccessor_byteOffset;
|
|
4105
|
-
normals = GLTFUtils.bufferToVector3Array(norBufferInfo.data, norBufferInfo.stride, (_norAccessor_byteOffset = norAccessor.byteOffset) != null ? _norAccessor_byteOffset : 0, norAccessor.count);
|
|
4106
|
-
}
|
|
4107
|
-
var tangents = null;
|
|
4108
|
-
if (tanBufferInfo) {
|
|
4109
|
-
tanAccessor = accessors[target["NORMAL"]];
|
|
4110
|
-
var _tanAccessor_byteOffset;
|
|
4111
|
-
tangents = GLTFUtils.bufferToVector3Array(tanBufferInfo.data, tanBufferInfo.stride, (_tanAccessor_byteOffset = tanAccessor.byteOffset) != null ? _tanAccessor_byteOffset : 0, tanAccessor.count);
|
|
4112
|
-
}
|
|
4056
|
+
getBlendShapeData(context, glTF, accessors[targets["POSITION"]]),
|
|
4057
|
+
hasNormal ? getBlendShapeData(context, glTF, accessors[normalTarget]) : null,
|
|
4058
|
+
hasTangent ? getBlendShapeData(context, glTF, accessors[tangentTarget]) : null
|
|
4059
|
+
]).then(function(vertices) {
|
|
4060
|
+
var _tangentData;
|
|
4061
|
+
var positionData = vertices[0], normalData = vertices[1], tangentData = vertices[2];
|
|
4113
4062
|
var blendShape = new miniprogram.BlendShape(name);
|
|
4114
|
-
blendShape.addFrame(1.0,
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
meshRestoreInfo.blendShapes.push(new BlendShapeRestoreInfo(blendShape, new BlendShapeDataRestoreInfo(posBufferInfo.restoreInfo, posBufferInfo.stride, (_posAccessor_byteOffset1 = posAccessor.byteOffset) != null ? _posAccessor_byteOffset1 : 0, posAccessor.count), norBufferInfo ? new BlendShapeDataRestoreInfo(norBufferInfo.restoreInfo, norBufferInfo.stride, (_norAccessor_byteOffset1 = norAccessor.byteOffset) != null ? _norAccessor_byteOffset1 : 0, norAccessor.count) : null, tanBufferInfo ? new BlendShapeDataRestoreInfo(tanBufferInfo.restoreInfo, tanBufferInfo.stride, (_tanAccessor_byteOffset1 = tanAccessor.byteOffset) != null ? _tanAccessor_byteOffset1 : 0, tanAccessor.count) : null));
|
|
4063
|
+
blendShape.addFrame(1.0, positionData.vertices, hasNormal ? normalData.vertices : null, hasTangent ? tangentData.vertices : null);
|
|
4064
|
+
blendShapeData.blendShape = blendShape;
|
|
4065
|
+
blendShapeData.restoreInfo = new BlendShapeRestoreInfo(blendShape, positionData.restoreInfo, hasNormal ? normalData.restoreInfo : null, hasTangent ? (_tangentData = tangentData) == null ? void 0 : _tangentData.restoreInfo : null);
|
|
4118
4066
|
});
|
|
4119
4067
|
promises.push(promise);
|
|
4120
4068
|
};
|
|
4069
|
+
var glTF = context.glTF;
|
|
4070
|
+
var accessors = glTF.accessors;
|
|
4121
4071
|
var blendShapeNames = glTFMesh.extras ? glTFMesh.extras.targetNames : null;
|
|
4122
4072
|
var promises = new Array();
|
|
4123
|
-
|
|
4124
|
-
|
|
4073
|
+
var blendShapeCount = glTFTargets.length;
|
|
4074
|
+
var blendShapeCollection = new Array(blendShapeCount);
|
|
4075
|
+
for(var i = 0; i < blendShapeCount; i++)_loop(i);
|
|
4076
|
+
return Promise.all(promises).then(function() {
|
|
4077
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(blendShapeCollection), _step; !(_step = _iterator()).done;){
|
|
4078
|
+
var blendShape = _step.value;
|
|
4079
|
+
mesh.addBlendShape(blendShape.blendShape);
|
|
4080
|
+
meshRestoreInfo.blendShapes.push(blendShape.restoreInfo);
|
|
4081
|
+
}
|
|
4082
|
+
});
|
|
4125
4083
|
};
|
|
4126
4084
|
return GLTFMeshParser1;
|
|
4127
4085
|
}(GLTFParser), function() {
|
|
@@ -4502,6 +4460,25 @@ exports.GLTFValidator = __decorate([
|
|
|
4502
4460
|
registerGLTFParser(exports.GLTFParserType.Validator)
|
|
4503
4461
|
], exports.GLTFValidator);
|
|
4504
4462
|
|
|
4463
|
+
exports.GLTFBufferViewParser = /*#__PURE__*/ function(GLTFParser1) {
|
|
4464
|
+
_inherits(GLTFBufferViewParser, GLTFParser1);
|
|
4465
|
+
function GLTFBufferViewParser() {
|
|
4466
|
+
return GLTFParser1.apply(this, arguments);
|
|
4467
|
+
}
|
|
4468
|
+
var _proto = GLTFBufferViewParser.prototype;
|
|
4469
|
+
_proto.parse = function parse(context, index) {
|
|
4470
|
+
var bufferView = context.glTF.bufferViews[index];
|
|
4471
|
+
var extensions = bufferView.extensions, _bufferView_byteOffset = bufferView.byteOffset, byteOffset = _bufferView_byteOffset === void 0 ? 0 : _bufferView_byteOffset, byteLength = bufferView.byteLength, bufferIndex = bufferView.buffer;
|
|
4472
|
+
return extensions ? GLTFParser.executeExtensionsCreateAndParse(extensions, context, bufferView) : context.get(exports.GLTFParserType.Buffer, bufferIndex).then(function(buffer) {
|
|
4473
|
+
return new Uint8Array(buffer, byteOffset, byteLength);
|
|
4474
|
+
});
|
|
4475
|
+
};
|
|
4476
|
+
return GLTFBufferViewParser;
|
|
4477
|
+
}(GLTFParser);
|
|
4478
|
+
exports.GLTFBufferViewParser = __decorate([
|
|
4479
|
+
registerGLTFParser(exports.GLTFParserType.BufferView)
|
|
4480
|
+
], exports.GLTFBufferViewParser);
|
|
4481
|
+
|
|
4505
4482
|
var GLTFLoader = /*#__PURE__*/ function(Loader1) {
|
|
4506
4483
|
_inherits(GLTFLoader, Loader1);
|
|
4507
4484
|
function GLTFLoader() {
|
|
@@ -5749,14 +5726,17 @@ var KHR_draco_mesh_compression = (_KHR_draco_mesh_compression = /*#__PURE__*/ fu
|
|
|
5749
5726
|
var buffer = GLTFUtils.getBufferViewData(bufferViews[bufferViewIndex], buffers);
|
|
5750
5727
|
return KHR_draco_mesh_compression._decoder.decode(buffer, taskConfig).then(function(decodedGeometry) {
|
|
5751
5728
|
var mesh = new miniprogram.ModelMesh(engine, glTFMesh.name);
|
|
5752
|
-
|
|
5729
|
+
var meshRestoreInfo = new ModelMeshRestoreInfo();
|
|
5730
|
+
meshRestoreInfo.mesh = mesh;
|
|
5731
|
+
context.contentRestorer.meshes.push(meshRestoreInfo);
|
|
5732
|
+
return _this._parseMeshFromGLTFPrimitiveDraco(context, mesh, meshRestoreInfo, glTFMesh, glTFPrimitive, glTF, function(attributeSemantic) {
|
|
5753
5733
|
for(var j = 0; j < decodedGeometry.attributes.length; j++){
|
|
5754
5734
|
if (decodedGeometry.attributes[j].name === attributeSemantic) {
|
|
5755
5735
|
return decodedGeometry.attributes[j].array;
|
|
5756
5736
|
}
|
|
5757
5737
|
}
|
|
5758
5738
|
return null;
|
|
5759
|
-
}, function(
|
|
5739
|
+
}, function() {
|
|
5760
5740
|
throw "BlendShape animation is not supported when using draco.";
|
|
5761
5741
|
}, function() {
|
|
5762
5742
|
return decodedGeometry.index.array;
|
|
@@ -5769,7 +5749,7 @@ var KHR_draco_mesh_compression = (_KHR_draco_mesh_compression = /*#__PURE__*/ fu
|
|
|
5769
5749
|
KHR_draco_mesh_compression._decoder = new miniprogram$3.DRACODecoder();
|
|
5770
5750
|
}
|
|
5771
5751
|
};
|
|
5772
|
-
_proto._parseMeshFromGLTFPrimitiveDraco = function _parseMeshFromGLTFPrimitiveDraco(mesh, gltfMesh, gltfPrimitive, gltf, getVertexBufferData, getBlendShapeData, getIndexBufferData, keepMeshData) {
|
|
5752
|
+
_proto._parseMeshFromGLTFPrimitiveDraco = function _parseMeshFromGLTFPrimitiveDraco(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, gltf, getVertexBufferData, getBlendShapeData, getIndexBufferData, keepMeshData) {
|
|
5773
5753
|
var attributes = gltfPrimitive.attributes, targets = gltfPrimitive.targets, indices = gltfPrimitive.indices, mode = gltfPrimitive.mode;
|
|
5774
5754
|
var vertexCount;
|
|
5775
5755
|
var accessors = gltf.accessors;
|
|
@@ -5865,7 +5845,7 @@ var KHR_draco_mesh_compression = (_KHR_draco_mesh_compression = /*#__PURE__*/ fu
|
|
|
5865
5845
|
mesh.addSubMesh(0, vertexCount, mode);
|
|
5866
5846
|
}
|
|
5867
5847
|
// BlendShapes
|
|
5868
|
-
targets && exports.GLTFMeshParser._createBlendShape(mesh,
|
|
5848
|
+
targets && exports.GLTFMeshParser._createBlendShape(context, mesh, meshRestoreInfo, gltfMesh, gltfPrimitive, targets, getBlendShapeData);
|
|
5869
5849
|
mesh.uploadData(!keepMeshData);
|
|
5870
5850
|
return Promise.resolve(mesh);
|
|
5871
5851
|
};
|
|
@@ -6205,6 +6185,7 @@ GALACEAN_animation_event = __decorate([
|
|
|
6205
6185
|
registerGLTFExtension("GALACEAN_animation_event", exports.GLTFExtensionMode.AdditiveParse)
|
|
6206
6186
|
], GALACEAN_animation_event);
|
|
6207
6187
|
|
|
6188
|
+
exports.BufferInfo = BufferInfo;
|
|
6208
6189
|
exports.ComponentMap = ComponentMap;
|
|
6209
6190
|
exports.GLTFExtensionParser = GLTFExtensionParser;
|
|
6210
6191
|
exports.GLTFParser = GLTFParser;
|