ohzi-core 6.3.3 → 6.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohzi-core",
3
- "version": "6.3.3",
3
+ "version": "6.3.4",
4
4
  "description": "OHZI Core Library",
5
5
  "source": "src/index.js",
6
6
  "module": "build/index.module.js",
package/src/Graphics.js CHANGED
@@ -25,18 +25,20 @@ class Graphics
25
25
  this.canvas_context = undefined;
26
26
  this.context_attributes = undefined;
27
27
 
28
- this.context_attributes = context_attributes || {
28
+ this.context_attributes = {
29
29
  alpha: true,
30
30
  depth: true,
31
31
  desynchronized: false,
32
32
  stencil: false,
33
33
  antialias: false,
34
34
  premultipliedAlpha: true,
35
- preserveDrawingBuffer: false,
35
+ preserveDrawingBuffer: true,
36
36
  powerPreference: 'high-performance',
37
37
  logarithmicDepthBuffer: false
38
38
  };
39
39
 
40
+ Object.assign(this.context_attributes, context_attributes);
41
+
40
42
  if (context_attributes.force_webgl2)
41
43
  {
42
44
  this.canvas_context = canvas.getContext('webgl2', this.context_attributes) ||
@@ -57,6 +59,7 @@ class Graphics
57
59
  canvas: canvas,
58
60
  context: this.canvas_context
59
61
  });
62
+
60
63
  this._renderer.autoClear = false;
61
64
 
62
65
  this._renderer.setPixelRatio(1);