UNPKG

wonder.js

Version:
32 lines (27 loc) 1.46 kB
'use strict'; var CopyTypeArrayService$Wonderjs = require("../../../primitive/copy/CopyTypeArrayService.js"); var MutableHashMapService$WonderCommonlib = require("wonder-commonlib/lib/js/src/MutableHashMapService.js"); var MutableSparseMapService$WonderCommonlib = require("wonder-commonlib/lib/js/src/MutableSparseMapService.js"); function create(param) { return /* record */[ /* index */0, /* noMaterialShaderIndexMap */MutableHashMapService$WonderCommonlib.createEmpty(/* () */0), /* shaderLibShaderIndexMap */MutableHashMapService$WonderCommonlib.createEmpty(/* () */0), /* materialsMap */MutableSparseMapService$WonderCommonlib.createEmpty(/* () */0) ]; } function deepCopyForRestore(param) { var index = param[/* index */0]; var noMaterialShaderIndexMap = param[/* noMaterialShaderIndexMap */1]; var shaderLibShaderIndexMap = param[/* shaderLibShaderIndexMap */2]; var materialsMap = param[/* materialsMap */3]; return /* record */[ /* index */index, /* noMaterialShaderIndexMap */MutableHashMapService$WonderCommonlib.copy(noMaterialShaderIndexMap), /* shaderLibShaderIndexMap */MutableHashMapService$WonderCommonlib.copy(shaderLibShaderIndexMap), /* materialsMap */CopyTypeArrayService$Wonderjs.deepCopyMutableSparseMapOfArray(materialsMap) ]; } exports.create = create; exports.deepCopyForRestore = deepCopyForRestore; /* No side effect */