mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
GlobeSerializer
This commit is contained in:
parent
cdcf8b3919
commit
1e15a6ef5e
29
ShadowEditor.Web/src/serialization/gis/GlobeSerializer.js
Normal file
29
ShadowEditor.Web/src/serialization/gis/GlobeSerializer.js
Normal file
@ -0,0 +1,29 @@
|
||||
import BaseSerializer from '../BaseSerializer';
|
||||
import Object3DSerializer from './Object3DSerializer';
|
||||
|
||||
/**
|
||||
* GlobeSerializer
|
||||
* @author tengge / https://github.com/tengge1
|
||||
*/
|
||||
function GlobeSerializer() {
|
||||
BaseSerializer.call(this);
|
||||
}
|
||||
|
||||
GlobeSerializer.prototype = Object.create(BaseSerializer.prototype);
|
||||
GlobeSerializer.prototype.constructor = GlobeSerializer;
|
||||
|
||||
GlobeSerializer.prototype.toJSON = function (obj) {
|
||||
var json = Object3DSerializer.prototype.toJSON.call(this, obj);
|
||||
|
||||
return json;
|
||||
};
|
||||
|
||||
GlobeSerializer.prototype.fromJSON = function (json, parent) {
|
||||
var obj = parent === undefined ? new THREE.Bone() : parent;
|
||||
|
||||
Object3DSerializer.prototype.fromJSON.call(this, json, obj);
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
export default GlobeSerializer;
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 MiB |
Loading…
x
Reference in New Issue
Block a user