You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {string} key - The key of the model data in the OBJ Cache to add to this Mesh.
270
+
* @param {string} [material] - An optional Wavefront mtl file, given as a string. Supports `Kd` diffuse rgb value formats. See `parseOBJMaterial` method for details.
265
271
* @param {number} [scale=1] - An amount to scale the model data by. Use this if the model has exported too small, or large, to see.
266
272
* @param {number} [x=0] - Offset the model x position by this amount.
267
273
* @param {number} [y=0] - Offset the model y position by this amount.
268
274
* @param {number} [z=0] - Offset the model z position by this amount.
269
275
*
270
276
* @return {this} This Mesh Game Object.
271
277
*/
272
-
addOBJ: function(key,scale,x,y,z)
278
+
addOBJ: function(key,material,scale,x,y,z)
273
279
{
274
280
vardata=this.scene.sys.cache.obj.get(key);
275
281
276
282
if(data)
277
283
{
278
-
this.addModel(data,scale,x,y,z);
284
+
this.addModel(data,material,scale,x,y,z);
279
285
}
280
286
281
287
returnthis;
@@ -456,20 +462,26 @@ var Mesh = new Class({
456
462
* @since 3.50.0
457
463
*
458
464
* @param {Phaser.Types.Geom.Mesh.OBJData} data - The parsed OBJ model data.
465
+
* @param {string} [material] - An optional Wavefront mtl file, given as a string. Supports `Kd` diffuse rgb value formats. See `parseOBJMaterial` method for details.
459
466
* @param {number} [scale=1] - An amount to scale the model data by. Use this if the model has exported too small, or large, to see.
460
467
* @param {number} [x=0] - Offset the model x position by this amount.
461
468
* @param {number} [y=0] - Offset the model y position by this amount.
462
469
* @param {number} [z=0] - Offset the model z position by this amount.
0 commit comments