@onerjs/serializers 8.27.6 → 8.27.7
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/glTF/2.0/glTFExporter.js +2 -2
- package/glTF/2.0/glTFExporter.js.map +1 -1
- package/glTF/2.0/glTFMaterialExporter.js +6 -13
- package/glTF/2.0/glTFMaterialExporter.js.map +1 -1
- package/glTF/2.0/glTFUtilities.d.ts +11 -8
- package/glTF/2.0/glTFUtilities.js +19 -13
- package/glTF/2.0/glTFUtilities.js.map +1 -1
- package/package.json +3 -3
package/glTF/2.0/glTFExporter.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Engine } from "@onerjs/core/Engines/engine.js";
|
|
|
9
9
|
import { EngineStore } from "@onerjs/core/Engines/engineStore.js";
|
|
10
10
|
import { GLTFMaterialExporter } from "./glTFMaterialExporter.js";
|
|
11
11
|
import { GLTFData } from "./glTFData.js";
|
|
12
|
-
import { ConvertToRightHandedPosition, ConvertToRightHandedRotation, DataArrayToUint8Array, GetAccessorType, GetAttributeType, GetMinMax, GetPrimitiveMode, IsTriangleFillMode, IsChildCollapsible, FloatsNeed16BitInteger, IsStandardVertexAttribute,
|
|
12
|
+
import { ConvertToRightHandedPosition, ConvertToRightHandedRotation, DataArrayToUint8Array, GetAccessorType, GetAttributeType, GetMinMax, GetPrimitiveMode, IsTriangleFillMode, IsChildCollapsible, FloatsNeed16BitInteger, IsStandardVertexAttribute, IndicesArrayToTypedSubarray, GetVertexBufferInfo, CollapseChildIntoParent, Rotate180Y, DefaultTranslation, DefaultScale, DefaultRotation, ConvertToRightHandedTransformMatrix, } from "./glTFUtilities.js";
|
|
13
13
|
import { IsNoopNode } from "../../exportUtils.js";
|
|
14
14
|
import { BufferManager } from "./bufferManager.js";
|
|
15
15
|
import { Camera } from "@onerjs/core/Cameras/camera.js";
|
|
@@ -1075,7 +1075,7 @@ export class GLTFExporter {
|
|
|
1075
1075
|
if (indicesToExport) {
|
|
1076
1076
|
let accessorIndex = state.getIndicesAccessor(indices, start, count, offset, flip);
|
|
1077
1077
|
if (accessorIndex === undefined) {
|
|
1078
|
-
const bytes =
|
|
1078
|
+
const bytes = IndicesArrayToTypedSubarray(indicesToExport, start, count, is32Bits);
|
|
1079
1079
|
const bufferView = this._bufferManager.createBufferView(bytes);
|
|
1080
1080
|
const componentType = is32Bits ? 5125 /* AccessorComponentType.UNSIGNED_INT */ : 5123 /* AccessorComponentType.UNSIGNED_SHORT */;
|
|
1081
1081
|
this._accessors.push(this._bufferManager.createAccessor(bufferView, "SCALAR" /* AccessorType.SCALAR */, componentType, count, 0));
|