fcfanLocal.three.ts 488 B

123456789101112131415161718192021222324252627
  1. import * as THREE from 'three';
  2. class fcFan {
  3. model;
  4. modelName = 'jbfj_fc';
  5. group = null;
  6. constructor(model) {
  7. this.model = model;
  8. }
  9. mountedThree() {
  10. return new Promise((resolve) => {
  11. this.model.setModel(this.modelName).then((gltf) => {
  12. this.group = gltf.scene;
  13. this.group.position.set(-0.056, -0.007, 3.494)
  14. resolve(null);
  15. });
  16. });
  17. }
  18. destroy() {
  19. this.model = null;
  20. this.group = null;
  21. }
  22. }
  23. export default fcFan;