web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
995 B

  1. "use strict";
  2. exports.__esModule = true;
  3. var _defineProperty = require("../core-js/object/define-property");
  4. var _defineProperty2 = _interopRequireDefault(_defineProperty);
  5. var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor");
  6. var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
  7. var _getOwnPropertyNames = require("../core-js/object/get-own-property-names");
  8. var _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. exports.default = function (obj, defaults) {
  11. var keys = (0, _getOwnPropertyNames2.default)(defaults);
  12. for (var i = 0; i < keys.length; i++) {
  13. var key = keys[i];
  14. var value = (0, _getOwnPropertyDescriptor2.default)(defaults, key);
  15. if (value && value.configurable && obj[key] === undefined) {
  16. (0, _defineProperty2.default)(obj, key, value);
  17. }
  18. }
  19. return obj;
  20. };