| 1234567891011121314151617181920212223242526272829303132 |
- import * as THREE from 'three';
- class fcFan {
- model;
- modelName = 'jbfj-fc';
- group: THREE.Object3D | null = null;
- constructor(model) {
- this.model = model;
- }
- mountedThree() {
- return new Promise((resolve) => {
- this.model.setGLTFModel([this.modelName]).then((gltf) => {
- this.group = gltf[0];
- if (this.group) {
- this.group.name = this.modelName;
- this.group.position.set(-0.056, -0.007, 3.494);
- }
- resolve(null);
- });
- });
- }
- destroy() {
- this.model.clearGroup(this.group);
- this.model = null;
- this.group = null;
- }
- }
- export default fcFan;
|