mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Create Mesh.js
This commit is contained in:
parent
ee7804f515
commit
3baa34bea5
1 changed files with 43 additions and 0 deletions
43
src/layer3d/Mesh.js
Normal file
43
src/layer3d/Mesh.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2020 Photon Storm Ltd.
|
||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
var Class = require('../utils/Class');
|
||||
var CONST = require('./const');
|
||||
var GameObject3D = require('./GameObject3D');
|
||||
|
||||
var Mesh = new Class({
|
||||
|
||||
Extends: GameObject3D,
|
||||
|
||||
initialize:
|
||||
|
||||
function Mesh (geometry, material)
|
||||
{
|
||||
GameObject3D.call(this);
|
||||
|
||||
/**
|
||||
* An instance of Geometry.
|
||||
* @type {Geometry}
|
||||
*/
|
||||
this.geometry = geometry;
|
||||
|
||||
/**
|
||||
* A material or an array of materials.
|
||||
* @type {Material}
|
||||
*/
|
||||
this.material = material;
|
||||
|
||||
/**
|
||||
* An array of weights typically from 0-1 that specify how much of the morph is applied.
|
||||
*/
|
||||
this.morphTargetInfluences = null;
|
||||
|
||||
this.type = CONST.OBJECT_TYPE.MESH;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
module.exports = Mesh;
|
Loading…
Add table
Reference in a new issue