fix bug bulitin default texture (#9916)

This commit is contained in:
Greg1129
2022-01-04 17:05:11 +08:00
committed by GitHub
parent 8e906c79a8
commit fd5ca96299
+4 -4
View File
@@ -53,10 +53,6 @@ class BuiltinResMgr {
const greyValueView = new Uint8Array(len * len * numChannels);
const whiteValueView = new Uint8Array(len * len * numChannels);
const normalValueView = new Uint8Array(len * len * numChannels);
const defaultValueView = new Uint8Array(len * len * numChannels);
const defaultSize = 16;
const halfDefaultSize = defaultSize / 2;
let offset = 0;
for (let i = 0; i < len * len; i++) {
@@ -88,6 +84,10 @@ class BuiltinResMgr {
offset += numChannels;
}
const defaultSize = 16;
const halfDefaultSize = defaultSize / 2;
const defaultValueView = new Uint8Array(defaultSize * defaultSize * numChannels);
offset = 0;
for (let i = 0; i < defaultSize * defaultSize; i++) {
defaultValueView[offset] = 221;