cione-comp-lib
Version:
`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`
41 lines (40 loc) • 1.04 kB
JavaScript
import Renderable from "./Renderable.mjs";
import glenum from "./core/glenum.mjs";
var Mesh = Renderable.extend({
skeleton: null,
joints: null
}, function() {
if (!this.joints) {
this.joints = [];
}
}, {
offsetMatrix: null,
isInstancedMesh: function() {
return false;
},
isSkinnedMesh: function() {
return !!(this.skeleton && this.joints && this.joints.length > 0);
},
clone: function() {
var mesh = Renderable.prototype.clone.call(this);
mesh.skeleton = this.skeleton;
if (this.joints) {
mesh.joints = this.joints.slice();
}
return mesh;
}
});
Mesh.POINTS = glenum.POINTS;
Mesh.LINES = glenum.LINES;
Mesh.LINE_LOOP = glenum.LINE_LOOP;
Mesh.LINE_STRIP = glenum.LINE_STRIP;
Mesh.TRIANGLES = glenum.TRIANGLES;
Mesh.TRIANGLE_STRIP = glenum.TRIANGLE_STRIP;
Mesh.TRIANGLE_FAN = glenum.TRIANGLE_FAN;
Mesh.BACK = glenum.BACK;
Mesh.FRONT = glenum.FRONT;
Mesh.FRONT_AND_BACK = glenum.FRONT_AND_BACK;
Mesh.CW = glenum.CW;
Mesh.CCW = glenum.CCW;
var Mesh$1 = Mesh;
export { Mesh$1 as default };