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.

25 lines
908 B

  1. var setPrototypeOf = require("./setPrototypeOf.js");
  2. var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
  3. function _construct(Parent, args, Class) {
  4. if (isNativeReflectConstruct()) {
  5. module.exports = _construct = Reflect.construct;
  6. module.exports["default"] = module.exports, module.exports.__esModule = true;
  7. } else {
  8. module.exports = _construct = function _construct(Parent, args, Class) {
  9. var a = [null];
  10. a.push.apply(a, args);
  11. var Constructor = Function.bind.apply(Parent, a);
  12. var instance = new Constructor();
  13. if (Class) setPrototypeOf(instance, Class.prototype);
  14. return instance;
  15. };
  16. module.exports["default"] = module.exports, module.exports.__esModule = true;
  17. }
  18. return _construct.apply(null, arguments);
  19. }
  20. module.exports = _construct;
  21. module.exports["default"] = module.exports, module.exports.__esModule = true;