mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
27 lines
842 B
JavaScript
27 lines
842 B
JavaScript
import BaseSerializer from '../BaseSerializer';
|
|
import MaterialSerializer from './MaterialSerializer';
|
|
|
|
/**
|
|
* MeshDepthMaterialSerializer
|
|
* @author tengge / https://github.com/tengge1
|
|
*/
|
|
function MeshDepthMaterialSerializer() {
|
|
BaseSerializer.call(this);
|
|
}
|
|
|
|
MeshDepthMaterialSerializer.prototype = Object.create(BaseSerializer.prototype);
|
|
MeshDepthMaterialSerializer.prototype.constructor = MeshDepthMaterialSerializer;
|
|
|
|
MeshDepthMaterialSerializer.prototype.toJSON = function (obj) {
|
|
return MaterialSerializer.prototype.toJSON.call(this, obj);
|
|
};
|
|
|
|
MeshDepthMaterialSerializer.prototype.fromJSON = function (json, parent) {
|
|
var obj = parent === undefined ? new THREE.MeshDepthMaterial() : parent;
|
|
|
|
MaterialSerializer.prototype.fromJSON.call(this, json, obj);
|
|
|
|
return obj;
|
|
};
|
|
|
|
export default MeshDepthMaterialSerializer; |