mage-engine 3.17.3 → 3.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/mage.js +121 -71
  2. package/package.json +1 -1
package/dist/mage.js CHANGED
@@ -57203,7 +57203,7 @@ function applyMiddleware() {
57203
57203
 
57204
57204
  var thunk = createThunkMiddleware();
57205
57205
  thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
57206
- var version = "3.17.3";
57206
+ var version = "3.17.4";
57207
57207
  var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
57208
57208
  var main = "dist/mage.js";
57209
57209
  var author$1 = {
@@ -60303,10 +60303,10 @@ var Element = /*#__PURE__*/function (_Entity) {
60303
60303
 
60304
60304
  var _super = _createSuper(Element);
60305
60305
 
60306
- function Element(geometry, material) {
60306
+ function Element() {
60307
60307
  var _this;
60308
60308
 
60309
- var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
60309
+ var _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
60310
60310
 
60311
60311
  _classCallCheck(this, Element);
60312
60312
 
@@ -60517,7 +60517,10 @@ var Element = /*#__PURE__*/function (_Entity) {
60517
60517
  });
60518
60518
 
60519
60519
  var _options$name = _options.name,
60520
- _name = _options$name === void 0 ? "default_".concat(Math.random()) : _options$name;
60520
+ _name = _options$name === void 0 ? "default_".concat(Math.random()) : _options$name,
60521
+ geometry = _options.geometry,
60522
+ material = _options.material,
60523
+ _body = _options.body;
60521
60524
 
60522
60525
  _this.textures = {};
60523
60526
  _this.opacity = 1;
@@ -60529,7 +60532,8 @@ var Element = /*#__PURE__*/function (_Entity) {
60529
60532
 
60530
60533
  _this.setBody({
60531
60534
  geometry: geometry,
60532
- material: material
60535
+ material: material,
60536
+ body: _body
60533
60537
  });
60534
60538
 
60535
60539
  _this.colliders = [];
@@ -61156,7 +61160,7 @@ var Element = /*#__PURE__*/function (_Entity) {
61156
61160
  color2: color2,
61157
61161
  name: "GridHelper_".concat(Math.random())
61158
61162
  };
61159
- _this = _super.call(this, null, null, options);
61163
+ _this = _super.call(this, options);
61160
61164
  var body = new GridHelper(size, division, color1, color2);
61161
61165
 
61162
61166
  _this.setBody({
@@ -61188,7 +61192,7 @@ var Element = /*#__PURE__*/function (_Entity) {
61188
61192
 
61189
61193
  _classCallCheck(this, Cube);
61190
61194
 
61191
- _this = _super.call(this, null, null, options);
61195
+ _this = _super.call(this, options);
61192
61196
  var geometry = new BoxGeometry(side, side, side);
61193
61197
  var material = new MeshBasicMaterial(_objectSpread2$1({
61194
61198
  color: color,
@@ -61220,7 +61224,7 @@ var Element = /*#__PURE__*/function (_Entity) {
61220
61224
 
61221
61225
  _classCallCheck(this, Sphere);
61222
61226
 
61223
- _this = _super.call(this, null, null, options);
61227
+ _this = _super.call(this, options);
61224
61228
  var segments = 32;
61225
61229
  var geometry = new SphereGeometry(radius, segments, segments);
61226
61230
  var material = new MeshBasicMaterial(_objectSpread2$1({
@@ -61255,7 +61259,7 @@ var Element = /*#__PURE__*/function (_Entity) {
61255
61259
 
61256
61260
  _classCallCheck(this, Cylinder);
61257
61261
 
61258
- _this = _super.call(this, null, null, options);
61262
+ _this = _super.call(this, options);
61259
61263
  var segments = 32;
61260
61264
  var geometry = new CylinderGeometry(radiusTop, radiusBottom, height, segments);
61261
61265
  var material = new MeshBasicMaterial(_objectSpread2$1({
@@ -61291,7 +61295,7 @@ var Line = /*#__PURE__*/function (_Element) {
61291
61295
 
61292
61296
  _classCallCheck(this, Line);
61293
61297
 
61294
- _this = _super.call(this, null, null, options);
61298
+ _this = _super.call(this, options);
61295
61299
 
61296
61300
  _defineProperty$1(_assertThisInitialized(_this), "updatePoints", function (points) {
61297
61301
  var vectors = points.map(function (_ref) {
@@ -61425,7 +61429,7 @@ var Plane = /*#__PURE__*/function (_Element) {
61425
61429
 
61426
61430
  _classCallCheck(this, Plane);
61427
61431
 
61428
- _this = _super.call(this, null, null, options);
61432
+ _this = _super.call(this, options);
61429
61433
  var _options$color = options.color,
61430
61434
  color = _options$color === void 0 ? 0xfffffff : _options$color,
61431
61435
  _options$transparent = options.transparent,
@@ -61485,7 +61489,7 @@ var Plane = /*#__PURE__*/function (_Element) {
61485
61489
 
61486
61490
  _classCallCheck(this, Box);
61487
61491
 
61488
- _this = _super.call(this, null, null, options);
61492
+ _this = _super.call(this, options);
61489
61493
  var geometry = new BoxGeometry(width, height, depth);
61490
61494
  var material = new MeshBasicMaterial(_objectSpread2$1({
61491
61495
  color: color,
@@ -61525,7 +61529,7 @@ var Sprite = /*#__PURE__*/function (_Element) {
61525
61529
 
61526
61530
  _classCallCheck(this, Sprite);
61527
61531
 
61528
- _this = _super.call(this, null, null, options);
61532
+ _this = _super.call(this, options);
61529
61533
 
61530
61534
  var _options$anisotropy = options.anisotropy,
61531
61535
  anisotropy = _options$anisotropy === void 0 ? 1 : _options$anisotropy,
@@ -72549,10 +72553,9 @@ var Models = function Models() {
72549
72553
  model = SkeletonUtils.clone(scene);
72550
72554
  }
72551
72555
 
72552
- var element = new Element(null, null, elementOptions);
72553
- element.setBody({
72556
+ var element = new Element(_objectSpread2$1({
72554
72557
  body: prepareModel(model)
72555
- });
72558
+ }, elementOptions));
72556
72559
  element.setEntityType(ENTITY_TYPES.MODEL);
72557
72560
 
72558
72561
  if (hasAnimations(animations)) {
@@ -73684,13 +73687,21 @@ var MeshLoader = /*#__PURE__*/function (_Loader) {
73684
73687
  }
73685
73688
  }, {
73686
73689
  key: "loadMesh",
73687
- value: function loadMesh(parsedMesh, scripts, texture, elementOptions) {
73690
+ value: function loadMesh(_ref2, scripts, texture, elementOptions) {
73691
+ var geometry = _ref2.geometry,
73692
+ material = _ref2.material,
73693
+ position = _ref2.position,
73694
+ rotation = _ref2.rotation,
73695
+ scale = _ref2.scale;
73688
73696
  var _this$options$scriptE = this.options.scriptEnabled,
73689
73697
  scriptEnabled = _this$options$scriptE === void 0 ? true : _this$options$scriptE;
73690
- var element = new Element(parsedMesh.geometry, parsedMesh.material, elementOptions);
73691
- element.setPosition(_objectSpread2$1({}, parsedMesh.position));
73692
- element.setRotation(_objectSpread2$1({}, parsedMesh.rotation));
73693
- element.setScale(_objectSpread2$1({}, parsedMesh.scale));
73698
+ var element = new Element(_objectSpread2$1({
73699
+ geometry: geometry,
73700
+ material: material
73701
+ }, elementOptions));
73702
+ element.setPosition(_objectSpread2$1({}, position));
73703
+ element.setRotation(_objectSpread2$1({}, rotation));
73704
+ element.setScale(_objectSpread2$1({}, scale));
73694
73705
 
73695
73706
  if (scripts && scripts.length) {
73696
73707
  element.addScripts(scripts.names, scripts.options, scriptEnabled);
@@ -74028,7 +74039,10 @@ var SunLight = /*#__PURE__*/function (_Light) {
74028
74039
  color: 0xeeeeee,
74029
74040
  wireframe: true
74030
74041
  });
74031
- var target = new Element(geometry, material);
74042
+ var target = new Element({
74043
+ geometry: geometry,
74044
+ material: material
74045
+ });
74032
74046
  target.position(initialPosition);
74033
74047
  return target;
74034
74048
  }
@@ -74439,11 +74453,11 @@ var LightLoader$1 = new LightLoader();var Pass = /*#__PURE__*/function () {
74439
74453
 
74440
74454
  _createClass(Pass, [{
74441
74455
  key: "setSize",
74442
- value: function setSize(width, height) {}
74456
+ value: function setSize() {}
74443
74457
  }, {
74444
74458
  key: "render",
74445
- value: function render(renderer, writeBuffer, readBuffer, delta, maskActive) {
74446
- console.error('Pass: .render() must be implemented in derived pass.');
74459
+ value: function render() {
74460
+ console.error('THREE.Pass: .render() must be implemented in derived pass.');
74447
74461
  }
74448
74462
  }]);
74449
74463
 
@@ -74498,7 +74512,7 @@ var FullScreenQuad = /*#__PURE__*/function () {
74498
74512
  _classCallCheck(this, ShaderPass);
74499
74513
 
74500
74514
  _this = _super.call(this);
74501
- _this.textureID = textureID !== undefined ? textureID : "tDiffuse";
74515
+ _this.textureID = textureID !== undefined ? textureID : 'tDiffuse';
74502
74516
 
74503
74517
  if (shader instanceof ShaderMaterial) {
74504
74518
  _this.uniforms = shader.uniforms;
@@ -74519,7 +74533,9 @@ var FullScreenQuad = /*#__PURE__*/function () {
74519
74533
 
74520
74534
  _createClass(ShaderPass, [{
74521
74535
  key: "render",
74522
- value: function render(renderer, writeBuffer, readBuffer) {
74536
+ value: function render(renderer, writeBuffer, readBuffer
74537
+ /*, deltaTime, maskActive */
74538
+ ) {
74523
74539
  if (this.uniforms[this.textureID]) {
74524
74540
  this.uniforms[this.textureID].value = readBuffer.texture;
74525
74541
  }
@@ -74540,21 +74556,23 @@ var FullScreenQuad = /*#__PURE__*/function () {
74540
74556
 
74541
74557
  return ShaderPass;
74542
74558
  }(Pass);/**
74543
- * @author alteredq / http://alteredqualia.com/
74544
- *
74545
74559
  * Full-screen textured quad shader
74546
74560
  */
74547
74561
  var CopyShader = {
74548
74562
  uniforms: {
74549
- "tDiffuse": {
74563
+ 'tDiffuse': {
74550
74564
  value: null
74551
74565
  },
74552
- "opacity": {
74566
+ 'opacity': {
74553
74567
  value: 1.0
74554
74568
  }
74555
74569
  },
74556
- vertexShader: ["varying vec2 vUv;", "void main() {", " vUv = uv;", " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", "}"].join("\n"),
74557
- fragmentShader: ["uniform float opacity;", "uniform sampler2D tDiffuse;", "varying vec2 vUv;", "void main() {", " vec4 texel = texture2D( tDiffuse, vUv );", " gl_FragColor = opacity * texel;", "}"].join("\n")
74570
+ vertexShader:
74571
+ /* glsl */
74572
+ "\n\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",
74573
+ fragmentShader:
74574
+ /* glsl */
74575
+ "\n\n uniform float opacity;\n\n uniform sampler2D tDiffuse;\n\n varying vec2 vUv;\n\n void main() {\n gl_FragColor = texture2D( tDiffuse, vUv );\n gl_FragColor.a *= opacity;\n }"
74558
74576
  };var MaskPass = /*#__PURE__*/function (_Pass) {
74559
74577
  _inherits(MaskPass, _Pass);
74560
74578
 
@@ -74576,7 +74594,9 @@ var CopyShader = {
74576
74594
 
74577
74595
  _createClass(MaskPass, [{
74578
74596
  key: "render",
74579
- value: function render(renderer, writeBuffer, readBuffer) {
74597
+ value: function render(renderer, writeBuffer, readBuffer
74598
+ /*, deltaTime, maskActive */
74599
+ ) {
74580
74600
  var context = renderer.getContext();
74581
74601
  var state = renderer.state; // don't update color or depth
74582
74602
 
@@ -74638,7 +74658,9 @@ var CopyShader = {
74638
74658
 
74639
74659
  _createClass(ClearMaskPass, [{
74640
74660
  key: "render",
74641
- value: function render(renderer, writeBuffer, readBuffer, delta, maskActive) {
74661
+ value: function render(renderer
74662
+ /*, writeBuffer, readBuffer, deltaTime, maskActive */
74663
+ ) {
74642
74664
  renderer.state.buffers.stencil.setLocked(false);
74643
74665
  renderer.state.buffers.stencil.setTest(false);
74644
74666
  }
@@ -74660,16 +74682,11 @@ var CopyShader = {
74660
74682
  this.renderer = renderer;
74661
74683
 
74662
74684
  if (renderTarget === undefined) {
74663
- var parameters = {
74664
- minFilter: LinearFilter,
74665
- magFilter: LinearFilter,
74666
- format: RGBAFormat
74667
- };
74668
74685
  var size = renderer.getSize(new Vector2());
74669
74686
  this._pixelRatio = renderer.getPixelRatio();
74670
74687
  this._width = size.width;
74671
74688
  this._height = size.height;
74672
- renderTarget = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio, parameters);
74689
+ renderTarget = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio);
74673
74690
  renderTarget.texture.name = 'EffectComposer.rt1';
74674
74691
  } else {
74675
74692
  this._pixelRatio = 1;
@@ -74686,11 +74703,11 @@ var CopyShader = {
74686
74703
  this.passes = []; // dependencies
74687
74704
 
74688
74705
  if (CopyShader === undefined) {
74689
- console.error('EffectComposer relies on CopyShader');
74706
+ console.error('THREE.EffectComposer relies on CopyShader');
74690
74707
  }
74691
74708
 
74692
74709
  if (ShaderPass === undefined) {
74693
- console.error('EffectComposer relies on ShaderPass');
74710
+ console.error('THREE.EffectComposer relies on ShaderPass');
74694
74711
  }
74695
74712
 
74696
74713
  this.copyPass = new ShaderPass(CopyShader);
@@ -74746,12 +74763,9 @@ var CopyShader = {
74746
74763
 
74747
74764
  var currentRenderTarget = this.renderer.getRenderTarget();
74748
74765
  var maskActive = false;
74749
- var pass,
74750
- i,
74751
- il = this.passes.length;
74752
74766
 
74753
- for (i = 0; i < il; i++) {
74754
- pass = this.passes[i];
74767
+ for (var i = 0, il = this.passes.length; i < il; i++) {
74768
+ var pass = this.passes[i];
74755
74769
  if (pass.enabled === false) continue;
74756
74770
  pass.renderToScreen = this.renderToScreen && this.isLastEnabledPass(i);
74757
74771
  pass.render(this.renderer, this.writeBuffer, this.readBuffer, deltaTime, maskActive);
@@ -74828,13 +74842,9 @@ var CopyShader = {
74828
74842
 
74829
74843
  var _super = _createSuper(RenderPass);
74830
74844
 
74831
- function RenderPass(scene, camera) {
74845
+ function RenderPass(scene, camera, overrideMaterial, clearColor, clearAlpha) {
74832
74846
  var _this;
74833
74847
 
74834
- var overrideMaterial = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
74835
- var clearColor = arguments.length > 3 ? arguments[3] : undefined;
74836
- var clearAlpha = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
74837
-
74838
74848
  _classCallCheck(this, RenderPass);
74839
74849
 
74840
74850
  _this = _super.call(this);
@@ -74842,7 +74852,7 @@ var CopyShader = {
74842
74852
  _this.camera = camera;
74843
74853
  _this.overrideMaterial = overrideMaterial;
74844
74854
  _this.clearColor = clearColor;
74845
- _this.clearAlpha = clearAlpha;
74855
+ _this.clearAlpha = clearAlpha !== undefined ? clearAlpha : 0;
74846
74856
  _this.clear = true;
74847
74857
  _this.clearDepth = false;
74848
74858
  _this.needsSwap = false;
@@ -74852,7 +74862,9 @@ var CopyShader = {
74852
74862
 
74853
74863
  _createClass(RenderPass, [{
74854
74864
  key: "render",
74855
- value: function render(renderer, writeBuffer, readBuffer) {
74865
+ value: function render(renderer, writeBuffer, readBuffer
74866
+ /*, deltaTime, maskActive */
74867
+ ) {
74856
74868
  var oldAutoClear = renderer.autoClear;
74857
74869
  renderer.autoClear = false;
74858
74870
  var oldClearAlpha, oldOverrideMaterial;
@@ -75319,6 +75331,9 @@ var PALETTES = {
75319
75331
  FRENCH: FRENCH_PALETTE
75320
75332
  };var MAX_EDGE_THICKNESS = 4;
75321
75333
  var MAX_EDGE_GLOW = 4;
75334
+ var DEFAULT_EDGE_GLOW = 0.0;
75335
+ var DEFAULT_EDGE_THICKNES = 1.0;
75336
+ var DEFAULT_EDGE_STRENGTH = 10.0;
75322
75337
  var BlurDirectionX = new Vector2(1.0, 0.0);
75323
75338
  var BlurDirectionY = new Vector2(0.0, 1.0);
75324
75339
 
@@ -75337,15 +75352,17 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
75337
75352
 
75338
75353
  var _ref$resolution = _ref.resolution,
75339
75354
  resolution = _ref$resolution === void 0 ? {} : _ref$resolution,
75340
- selectedObjects = _ref.selectedObjects,
75355
+ _ref$selectedObjects = _ref.selectedObjects,
75356
+ selectedObjects = _ref$selectedObjects === void 0 ? [] : _ref$selectedObjects,
75341
75357
  _ref$visibleEdgeColor = _ref.visibleEdgeColor,
75342
75358
  visibleEdgeColor = _ref$visibleEdgeColor === void 0 ? PALETTES.BASE.WHITE : _ref$visibleEdgeColor,
75343
75359
  _ref$hiddenEdgeColor = _ref.hiddenEdgeColor,
75344
- hiddenEdgeColor = _ref$hiddenEdgeColor === void 0 ? PALETTES.BASE.BLACK : _ref$hiddenEdgeColor;
75360
+ hiddenEdgeColor = _ref$hiddenEdgeColor === void 0 ? PALETTES.BASE.WHITE : _ref$hiddenEdgeColor;
75345
75361
 
75346
75362
  _classCallCheck(this, SelectiveOutline);
75347
75363
 
75348
75364
  _this = _super.call(this);
75365
+ _this.isPass = true;
75349
75366
 
75350
75367
  var _config$screen = Config$1.screen(),
75351
75368
  height = _config$screen.h,
@@ -75357,13 +75374,13 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
75357
75374
  resolutionY = _resolution$y === void 0 ? height : _resolution$y;
75358
75375
  _this.renderScene = Scene$1.getScene();
75359
75376
  _this.renderCamera = Scene$1.getCameraBody();
75360
- _this.selectedObjects = selectedObjects !== undefined ? selectedObjects : [];
75361
- _this.visibleEdgeColor = visibleEdgeColor;
75362
- _this.hiddenEdgeColor = hiddenEdgeColor;
75363
- _this.edgeGlow = 0.0;
75377
+ _this.selectedObjects = selectedObjects;
75378
+ _this.visibleEdgeColor = new Color$1(visibleEdgeColor);
75379
+ _this.hiddenEdgeColor = new Color$1(hiddenEdgeColor);
75380
+ _this.edgeGlow = DEFAULT_EDGE_GLOW;
75364
75381
  _this.usePatternTexture = false;
75365
- _this.edgeThickness = 1.0;
75366
- _this.edgeStrength = 3.0;
75382
+ _this.edgeThickness = DEFAULT_EDGE_THICKNES;
75383
+ _this.edgeStrength = DEFAULT_EDGE_STRENGTH;
75367
75384
  _this.downSampleRatio = 2;
75368
75385
  _this.pulsePeriod = 0;
75369
75386
  _this._visibilityCache = new Map();
@@ -75449,6 +75466,36 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
75449
75466
  return o.getBody();
75450
75467
  });
75451
75468
  }
75469
+ }, {
75470
+ key: "setVisibleEdgeColor",
75471
+ value: function setVisibleEdgeColor() {
75472
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PALETTES.BASE.WHITE;
75473
+ this.visibleEdgeColor = new Color$1(color);
75474
+ }
75475
+ }, {
75476
+ key: "setHiddenEdgeColor",
75477
+ value: function setHiddenEdgeColor() {
75478
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PALETTES.BASE.WHITE;
75479
+ this.hiddenEdgeColor = new Color$1(color);
75480
+ }
75481
+ }, {
75482
+ key: "setEdgeGlow",
75483
+ value: function setEdgeGlow() {
75484
+ var glow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_EDGE_GLOW;
75485
+ this.edgeGlow = glow;
75486
+ }
75487
+ }, {
75488
+ key: "setEdgeStrength",
75489
+ value: function setEdgeStrength() {
75490
+ var strength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_EDGE_STRENGTH;
75491
+ this.edgeStrength = strength;
75492
+ }
75493
+ }, {
75494
+ key: "setEdgeThickness",
75495
+ value: function setEdgeThickness() {
75496
+ var thickness = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_EDGE_THICKNES;
75497
+ this.edgeThickness = thickness;
75498
+ }
75452
75499
  }, {
75453
75500
  key: "dispose",
75454
75501
  value: function dispose() {
@@ -75617,8 +75664,8 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
75617
75664
  this.fsQuad.material = this.edgeDetectionMaterial;
75618
75665
  this.edgeDetectionMaterial.uniforms['maskTexture'].value = this.renderTargetMaskDownSampleBuffer.texture;
75619
75666
  this.edgeDetectionMaterial.uniforms['texSize'].value.set(this.renderTargetMaskDownSampleBuffer.width, this.renderTargetMaskDownSampleBuffer.height);
75620
- this.edgeDetectionMaterial.uniforms['visibleEdgeColor'].value = this.tempPulseColor1;
75621
- this.edgeDetectionMaterial.uniforms['hiddenEdgeColor'].value = this.tempPulseColor2;
75667
+ this.edgeDetectionMaterial.uniforms['visibleEdgeColor'].value.set(this.tempPulseColor1.getHex());
75668
+ this.edgeDetectionMaterial.uniforms['hiddenEdgeColor'].value.set(this.tempPulseColor2.getHex());
75622
75669
  renderer.setRenderTarget(this.renderTargetEdgeBuffer1);
75623
75670
  renderer.clear();
75624
75671
  this.fsQuad.render(renderer); // 4. Apply Blur on Half res
@@ -75701,10 +75748,10 @@ var SelectiveOutline = /*#__PURE__*/function (_Pass) {
75701
75748
  value: new Vector2(0.5, 0.5)
75702
75749
  },
75703
75750
  'visibleEdgeColor': {
75704
- value: new Vector3$1(1.0, 1.0, 1.0)
75751
+ value: new Color$1(1.0, 1.0, 1.0)
75705
75752
  },
75706
75753
  'hiddenEdgeColor': {
75707
- value: new Vector3$1(1.0, 1.0, 1.0)
75754
+ value: new Color$1(1.0, 1.0, 1.0)
75708
75755
  }
75709
75756
  },
75710
75757
  vertexShader: "varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }",
@@ -86706,7 +86753,10 @@ var SpotLight = /*#__PURE__*/function (_Light) {
86706
86753
  color: 0xeeeeee,
86707
86754
  wireframe: true
86708
86755
  });
86709
- var target = new Element(geometry, material);
86756
+ var target = new Element({
86757
+ geometry: geometry,
86758
+ material: material
86759
+ });
86710
86760
  target.position(initialPosition);
86711
86761
  return target;
86712
86762
  }
@@ -88135,7 +88185,7 @@ var Water = /*#__PURE__*/function (_Element) {
88135
88185
 
88136
88186
  _classCallCheck(this, Water);
88137
88187
 
88138
- _this = _super.call(this, null, null, options);
88188
+ _this = _super.call(this, options);
88139
88189
 
88140
88190
  _defineProperty$1(_assertThisInitialized(_this), "update", function (dt) {
88141
88191
  _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(Water.prototype)), "update", _thisSuper).call(_thisSuper, dt);
@@ -88285,7 +88335,7 @@ var Sky = /*#__PURE__*/function (_Element) {
88285
88335
 
88286
88336
  _classCallCheck(this, Sky);
88287
88337
 
88288
- _this = _super.call(this, null, null, options);
88338
+ _this = _super.call(this, options);
88289
88339
  var _options$scale = options.scale,
88290
88340
  scale = _options$scale === void 0 ? DEFAULT_SCALE : _options$scale,
88291
88341
  _options$turbidity = options.turbidity,
@@ -88393,7 +88443,7 @@ var Skybox = /*#__PURE__*/function (_Element) {
88393
88443
  texture = _options$texture === void 0 ? 'skybox' : _options$texture,
88394
88444
  rest = _objectWithoutProperties(options, _excluded);
88395
88445
 
88396
- _this = _super.call(this, null, null, _objectSpread2$1({
88446
+ _this = _super.call(this, _objectSpread2$1({
88397
88447
  name: name,
88398
88448
  texture: texture
88399
88449
  }, rest));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mage-engine",
3
- "version": "3.17.3",
3
+ "version": "3.17.4",
4
4
  "description": "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.",
5
5
  "main": "dist/mage.js",
6
6
  "author": {