forked from dbkaplun/three-snapshot-serializer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bartozzz
committed
Oct 21, 2019
1 parent
16e1305
commit c47b6cd
Showing
17 changed files
with
6,762 additions
and
5,231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"targets": { | ||
"node": "8.9.4", | ||
"browsers": "last 2 versions" | ||
}, | ||
"useBuiltIns": true | ||
}], | ||
"stage-0" | ||
] | ||
"presets": ["@babel/preset-env"] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = createSerializer; | ||
|
||
var _three = require('three'); | ||
var _three = require("three"); | ||
|
||
var THREE = _interopRequireWildcard(_three); | ||
|
||
var _toJSON = require('./toJSON'); | ||
var _toJSON = require("./toJSON"); | ||
|
||
var _toJSON2 = _interopRequireDefault(_toJSON); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
|
||
function createSerializer(opts) { | ||
function createSerializer(options) { | ||
return { | ||
test: function test(obj) { | ||
return obj instanceof THREE.Object3D; | ||
test: function test(object) { | ||
return object instanceof _three.Object3D; | ||
}, | ||
print: function print(obj, serializer) { | ||
return serializer((0, _toJSON2.default)(obj, opts)); | ||
print: function print(object, serializer) { | ||
return serializer((0, _toJSON2.default)(object, options)); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.