iv-3d-lib
Version:
A reusable ThreeJS library providing features for Ivee 3D Editor.
35 lines • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bird = void 0;
// import THREE = require('./libs/three');
const THREE = require("three");
class Bird extends THREE.BufferGeometry {
// var scope = this;
// THREE.Geometry.call(this);
constructor() {
super();
this.v = (x, y, z) => {
super.vertices.push(new THREE.Vector3(x, y, z));
};
this.f3 = (a, b, c) => {
super.faces.push(new THREE.Face3(a, b, c));
};
this.v(5, 0, 0);
this.v(-5, -2, 1);
this.v(-5, 0, 0);
this.v(-5, -2, -1);
this.v(0, 2, -6);
this.v(0, 2, 6);
this.v(2, 0, 0);
this.v(-3, 0, 0);
this.f3(0, 2, 1);
// this.f3(0, 3, 2);
this.f3(4, 7, 6);
this.f3(5, 6, 7);
super.computeFaceNormals();
}
}
exports.Bird = Bird;
// Bird.prototype = Object.create(THREE.Geometry.prototype);
// Bird.prototype.constructor = Bird;
//# sourceMappingURL=bird.js.map