mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-02-01 16:08:17 +00:00
BufferGeometry序列化器
This commit is contained in:
parent
26d33bbed3
commit
2e36315c7d
@ -0,0 +1,49 @@
|
||||
import BaseSerializer from '../BaseSerializer';
|
||||
|
||||
/**
|
||||
* BufferGeometry序列化器
|
||||
*/
|
||||
function BufferGeometrySerializer() {
|
||||
BaseSerializer.call(this);
|
||||
}
|
||||
|
||||
BufferGeometrySerializer.prototype = Object.create(BaseSerializer.prototype);
|
||||
BufferGeometrySerializer.prototype.constructor = BufferGeometrySerializer;
|
||||
|
||||
BufferGeometrySerializer.prototype.toJSON = function (obj) {
|
||||
var json = BaseSerializer.prototype.toJSON.call(this, obj);
|
||||
|
||||
json.boundingBox = obj.boundingBox;
|
||||
json.boundingSphere = obj.boundingSphere;
|
||||
json.colors = obj.colors;
|
||||
json.faces = obj.faces;
|
||||
json.faceVertexUvs = obj.faceVertexUvs;
|
||||
json.id = obj.id;
|
||||
json.isGeometry = obj.isGeometry;
|
||||
json.lineDistances = obj.lineDistances;
|
||||
json.morphTargets = obj.morphTargets;
|
||||
json.morphNormals = obj.morphNormals;
|
||||
json.name = geometry.name;
|
||||
json.skinWeights = obj.skinWeights;
|
||||
json.skinIndices = obj.skinIndices;
|
||||
json.uuid = obj.uuid;
|
||||
json.vertices = obj.vertices;
|
||||
json.verticesNeedUpdate = obj.verticesNeedUpdate;
|
||||
json.elementsNeedUpdate = obj.elementsNeedUpdate;
|
||||
json.uvsNeedUpdate = obj.uvsNeedUpdate;
|
||||
json.normalsNeedUpdate = obj.normalsNeedUpdate;
|
||||
json.colorsNeedUpdate = obj.colorsNeedUpdate;
|
||||
json.groupsNeedUpdate = obj.groupsNeedUpdate;
|
||||
json.lineDistancesNeedUpdate = obj.lineDistancesNeedUpdate;
|
||||
|
||||
json.type = geometry.type;
|
||||
json.userData = geometry.userData;
|
||||
|
||||
return json;
|
||||
};
|
||||
|
||||
BufferGeometrySerializer.prototype.fromJSON = function (json, parent) {
|
||||
|
||||
};
|
||||
|
||||
export default BufferGeometrySerializer;
|
||||
Loading…
x
Reference in New Issue
Block a user