Skip to content

Commit 3baa34b

Browse files
committed
Create Mesh.js
1 parent ee7804f commit 3baa34b

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

src/layer3d/Mesh.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* @author Richard Davey <rich@photonstorm.com>
3+
* @copyright 2020 Photon Storm Ltd.
4+
* @license {@link https://opensource.org/licenses/MIT|MIT License}
5+
*/
6+
7+
var Class = require('../utils/Class');
8+
var CONST = require('./const');
9+
var GameObject3D = require('./GameObject3D');
10+
11+
var Mesh = new Class({
12+
13+
Extends: GameObject3D,
14+
15+
initialize:
16+
17+
function Mesh (geometry, material)
18+
{
19+
GameObject3D.call(this);
20+
21+
/**
22+
* An instance of Geometry.
23+
* @type {Geometry}
24+
*/
25+
this.geometry = geometry;
26+
27+
/**
28+
* A material or an array of materials.
29+
* @type {Material}
30+
*/
31+
this.material = material;
32+
33+
/**
34+
* An array of weights typically from 0-1 that specify how much of the morph is applied.
35+
*/
36+
this.morphTargetInfluences = null;
37+
38+
this.type = CONST.OBJECT_TYPE.MESH;
39+
}
40+
41+
});
42+
43+
module.exports = Mesh;

0 commit comments

Comments
 (0)