@galacean/engine 1.1.0-beta.46 → 1.1.0-beta.47
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/browser.js +27 -24
- package/dist/browser.min.js +1 -1
- package/dist/main.js +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
- package/dist/.DS_Store +0 -0
package/dist/browser.js
CHANGED
|
@@ -36028,7 +36028,7 @@
|
|
|
36028
36028
|
var cap = this.capabilityList;
|
|
36029
36029
|
var isWebGL2 = this.rhi.isWebGL2;
|
|
36030
36030
|
var requireExtension = this.rhi.requireExtension.bind(this.rhi);
|
|
36031
|
-
var shaderVertexID = exports.GLCapabilityType.shaderVertexID, standardDerivatives = exports.GLCapabilityType.standardDerivatives, shaderTextureLod = exports.GLCapabilityType.shaderTextureLod, elementIndexUint = exports.GLCapabilityType.elementIndexUint, depthTexture = exports.GLCapabilityType.depthTexture, vertexArrayObject = exports.GLCapabilityType.vertexArrayObject, instancedArrays = exports.GLCapabilityType.instancedArrays, multipleSample = exports.GLCapabilityType.multipleSample, drawBuffers = exports.GLCapabilityType.drawBuffers, astc = exports.GLCapabilityType.astc, astc_webkit = exports.GLCapabilityType.astc_webkit, etc = exports.GLCapabilityType.etc, etc_webkit = exports.GLCapabilityType.etc_webkit, etc1 = exports.GLCapabilityType.etc1, etc1_webkit = exports.GLCapabilityType.etc1_webkit, pvrtc = exports.GLCapabilityType.pvrtc, pvrtc_webkit = exports.GLCapabilityType.pvrtc_webkit, s3tc = exports.GLCapabilityType.s3tc, s3tc_webkit = exports.GLCapabilityType.s3tc_webkit, bptc = exports.GLCapabilityType.bptc, textureFloat = exports.GLCapabilityType.textureFloat, textureHalfFloat = exports.GLCapabilityType.textureHalfFloat, textureFloatLinear = exports.GLCapabilityType.textureFloatLinear, textureHalfFloatLinear = exports.GLCapabilityType.textureHalfFloatLinear, WEBGL_colorBufferFloat = exports.GLCapabilityType.WEBGL_colorBufferFloat, colorBufferFloat = exports.GLCapabilityType.colorBufferFloat, colorBufferHalfFloat = exports.GLCapabilityType.colorBufferHalfFloat, textureFilterAnisotropic = exports.GLCapabilityType.textureFilterAnisotropic;
|
|
36031
|
+
var shaderVertexID = exports.GLCapabilityType.shaderVertexID, standardDerivatives = exports.GLCapabilityType.standardDerivatives, shaderTextureLod = exports.GLCapabilityType.shaderTextureLod, elementIndexUint = exports.GLCapabilityType.elementIndexUint, depthTexture = exports.GLCapabilityType.depthTexture, vertexArrayObject = exports.GLCapabilityType.vertexArrayObject, instancedArrays = exports.GLCapabilityType.instancedArrays, multipleSample = exports.GLCapabilityType.multipleSample, drawBuffers = exports.GLCapabilityType.drawBuffers, blendMinMax = exports.GLCapabilityType.blendMinMax, astc = exports.GLCapabilityType.astc, astc_webkit = exports.GLCapabilityType.astc_webkit, etc = exports.GLCapabilityType.etc, etc_webkit = exports.GLCapabilityType.etc_webkit, etc1 = exports.GLCapabilityType.etc1, etc1_webkit = exports.GLCapabilityType.etc1_webkit, pvrtc = exports.GLCapabilityType.pvrtc, pvrtc_webkit = exports.GLCapabilityType.pvrtc_webkit, s3tc = exports.GLCapabilityType.s3tc, s3tc_webkit = exports.GLCapabilityType.s3tc_webkit, bptc = exports.GLCapabilityType.bptc, textureFloat = exports.GLCapabilityType.textureFloat, textureHalfFloat = exports.GLCapabilityType.textureHalfFloat, textureFloatLinear = exports.GLCapabilityType.textureFloatLinear, textureHalfFloatLinear = exports.GLCapabilityType.textureHalfFloatLinear, WEBGL_colorBufferFloat = exports.GLCapabilityType.WEBGL_colorBufferFloat, colorBufferFloat = exports.GLCapabilityType.colorBufferFloat, colorBufferHalfFloat = exports.GLCapabilityType.colorBufferHalfFloat, textureFilterAnisotropic = exports.GLCapabilityType.textureFilterAnisotropic;
|
|
36032
36032
|
cap.set(shaderVertexID, isWebGL2);
|
|
36033
36033
|
cap.set(standardDerivatives, isWebGL2 || !!requireExtension(standardDerivatives));
|
|
36034
36034
|
cap.set(shaderTextureLod, isWebGL2 || !!requireExtension(shaderTextureLod));
|
|
@@ -36038,6 +36038,7 @@
|
|
|
36038
36038
|
cap.set(instancedArrays, isWebGL2 || !!requireExtension(instancedArrays));
|
|
36039
36039
|
cap.set(multipleSample, isWebGL2);
|
|
36040
36040
|
cap.set(drawBuffers, isWebGL2 || !!requireExtension(drawBuffers));
|
|
36041
|
+
cap.set(blendMinMax, isWebGL2 || !!requireExtension(blendMinMax));
|
|
36041
36042
|
cap.set(textureFloat, isWebGL2 || !!requireExtension(textureFloat));
|
|
36042
36043
|
cap.set(textureHalfFloat, isWebGL2 || !!requireExtension(textureHalfFloat));
|
|
36043
36044
|
cap.set(textureFloatLinear, !!requireExtension(textureFloatLinear));
|
|
@@ -36078,9 +36079,13 @@
|
|
|
36078
36079
|
}
|
|
36079
36080
|
};
|
|
36080
36081
|
_proto._compatibleAllInterface = function _compatibleAllInterface() {
|
|
36081
|
-
var depthTexture = exports.GLCapabilityType.depthTexture, vertexArrayObject = exports.GLCapabilityType.vertexArrayObject, instancedArrays = exports.GLCapabilityType.instancedArrays, drawBuffers = exports.GLCapabilityType.drawBuffers, textureFilterAnisotropic = exports.GLCapabilityType.textureFilterAnisotropic, textureHalfFloat = exports.GLCapabilityType.textureHalfFloat, colorBufferHalfFloat = exports.GLCapabilityType.colorBufferHalfFloat, WEBGL_colorBufferFloat = exports.GLCapabilityType.WEBGL_colorBufferFloat;
|
|
36082
|
+
var depthTexture = exports.GLCapabilityType.depthTexture, vertexArrayObject = exports.GLCapabilityType.vertexArrayObject, instancedArrays = exports.GLCapabilityType.instancedArrays, drawBuffers = exports.GLCapabilityType.drawBuffers, textureFilterAnisotropic = exports.GLCapabilityType.textureFilterAnisotropic, textureHalfFloat = exports.GLCapabilityType.textureHalfFloat, colorBufferHalfFloat = exports.GLCapabilityType.colorBufferHalfFloat, WEBGL_colorBufferFloat = exports.GLCapabilityType.WEBGL_colorBufferFloat, blendMinMax = exports.GLCapabilityType.blendMinMax;
|
|
36082
36083
|
var isWebGL2 = this.rhi.isWebGL2;
|
|
36083
36084
|
if (!isWebGL2) {
|
|
36085
|
+
this._compatibleInterface(blendMinMax, {
|
|
36086
|
+
MIN: "MIN_EXT",
|
|
36087
|
+
MAX: "MAX_EXT"
|
|
36088
|
+
});
|
|
36084
36089
|
this._compatibleInterface(depthTexture, {
|
|
36085
36090
|
UNSIGNED_INT_24_8: "UNSIGNED_INT_24_8_WEBGL"
|
|
36086
36091
|
});
|
|
@@ -40003,7 +40008,7 @@
|
|
|
40003
40008
|
};
|
|
40004
40009
|
/**
|
|
40005
40010
|
* Parse the glb format.
|
|
40006
|
-
*/ GLTFUtils.parseGLB = function parseGLB(context,
|
|
40011
|
+
*/ GLTFUtils.parseGLB = function parseGLB(context, originBuffer) {
|
|
40007
40012
|
var UINT32_LENGTH = 4;
|
|
40008
40013
|
var GLB_HEADER_MAGIC = 0x46546c67; // 'glTF'
|
|
40009
40014
|
var GLB_HEADER_LENGTH = 12;
|
|
@@ -40011,7 +40016,7 @@
|
|
|
40011
40016
|
JSON: 0x4e4f534a,
|
|
40012
40017
|
BIN: 0x004e4942
|
|
40013
40018
|
};
|
|
40014
|
-
var dataView = new DataView(
|
|
40019
|
+
var dataView = new DataView(originBuffer);
|
|
40015
40020
|
// read header
|
|
40016
40021
|
var header = {
|
|
40017
40022
|
magic: dataView.getUint32(0, true),
|
|
@@ -40019,8 +40024,9 @@
|
|
|
40019
40024
|
length: dataView.getUint32(2 * UINT32_LENGTH, true)
|
|
40020
40025
|
};
|
|
40021
40026
|
if (header.magic !== GLB_HEADER_MAGIC) {
|
|
40022
|
-
|
|
40023
|
-
|
|
40027
|
+
return {
|
|
40028
|
+
originBuffer: originBuffer
|
|
40029
|
+
};
|
|
40024
40030
|
}
|
|
40025
40031
|
// read main data
|
|
40026
40032
|
var chunkLength = dataView.getUint32(GLB_HEADER_LENGTH, true);
|
|
@@ -40030,7 +40036,7 @@
|
|
|
40030
40036
|
console.error("Invalid glb chunk type. Expected 0x4E4F534A, found 0x" + chunkType.toString(16));
|
|
40031
40037
|
return null;
|
|
40032
40038
|
}
|
|
40033
|
-
var glTFData = new Uint8Array(
|
|
40039
|
+
var glTFData = new Uint8Array(originBuffer, GLB_HEADER_LENGTH + 2 * UINT32_LENGTH, chunkLength);
|
|
40034
40040
|
var glTF = JSON.parse(Utils.decodeText(glTFData));
|
|
40035
40041
|
// read all buffers
|
|
40036
40042
|
var buffers = [];
|
|
@@ -40044,7 +40050,7 @@
|
|
|
40044
40050
|
return null;
|
|
40045
40051
|
}
|
|
40046
40052
|
var currentOffset = byteOffset + 2 * UINT32_LENGTH;
|
|
40047
|
-
var buffer =
|
|
40053
|
+
var buffer = originBuffer.slice(currentOffset, currentOffset + chunkLength);
|
|
40048
40054
|
buffers.push(buffer);
|
|
40049
40055
|
restoreGLBBufferSlice.push(new Vector2(currentOffset, chunkLength));
|
|
40050
40056
|
byteOffset += chunkLength + 2 * UINT32_LENGTH;
|
|
@@ -41440,23 +41446,20 @@
|
|
|
41440
41446
|
var requestConfig = {
|
|
41441
41447
|
type: "arraybuffer"
|
|
41442
41448
|
};
|
|
41443
|
-
|
|
41444
|
-
contentRestorer.isGLB = isGLB;
|
|
41445
|
-
var promise = isGLB ? request(url, requestConfig).then(function(glb) {
|
|
41449
|
+
return request(url, requestConfig).then(function(buffer) {
|
|
41446
41450
|
restoreBufferRequests.push(new BufferRequestInfo(url, requestConfig));
|
|
41447
|
-
return GLTFUtils.parseGLB(context,
|
|
41448
|
-
}).then(function(
|
|
41449
|
-
var
|
|
41450
|
-
|
|
41451
|
-
|
|
41452
|
-
|
|
41453
|
-
|
|
41451
|
+
return GLTFUtils.parseGLB(context, buffer);
|
|
41452
|
+
}).then(function(result) {
|
|
41453
|
+
var _result;
|
|
41454
|
+
if ((_result = result) == null ? void 0 : _result.glTF) {
|
|
41455
|
+
contentRestorer.isGLB = true;
|
|
41456
|
+
context.buffers = result.buffers;
|
|
41457
|
+
return result.glTF;
|
|
41458
|
+
} else {
|
|
41459
|
+
contentRestorer.isGLB = false;
|
|
41460
|
+
return JSON.parse(Utils.decodeText(new Uint8Array(result.originBuffer)));
|
|
41461
|
+
}
|
|
41454
41462
|
});
|
|
41455
|
-
return promise;
|
|
41456
|
-
};
|
|
41457
|
-
_proto._isGLB = function _isGLB(url) {
|
|
41458
|
-
var index = url.lastIndexOf(".");
|
|
41459
|
-
return url.substring(index + 1, index + 4) === "glb";
|
|
41460
41463
|
};
|
|
41461
41464
|
return GLTFSchemaParser;
|
|
41462
41465
|
}(GLTFParser);
|
|
@@ -44090,7 +44093,7 @@
|
|
|
44090
44093
|
], GALACEAN_animation_event);
|
|
44091
44094
|
|
|
44092
44095
|
//@ts-ignore
|
|
44093
|
-
var version = "1.1.0-beta.
|
|
44096
|
+
var version = "1.1.0-beta.47";
|
|
44094
44097
|
console.log("Galacean engine version: " + version);
|
|
44095
44098
|
for(var key in CoreObjects){
|
|
44096
44099
|
Loader.registerClass(key, CoreObjects[key]);
|