@gjsify/webgl 0.0.2 → 0.0.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/lib/cjs/extensions/ext-blend-minmax.js +4 -23
- package/lib/cjs/extensions/ext-texture-filter-anisotropic.js +4 -23
- package/lib/cjs/extensions/oes-element-index-unit.js +4 -23
- package/lib/cjs/extensions/oes-standard-derivatives.js +4 -23
- package/lib/cjs/extensions/oes-texture-float-linear.js +4 -23
- package/lib/cjs/extensions/oes-texture-float.js +4 -23
- package/lib/cjs/extensions/stackgl-destroy-context.js +4 -23
- package/lib/cjs/extensions/stackgl-resize-drawing-buffer.js +4 -23
- package/lib/cjs/html-canvas-element.js +15 -34
- package/lib/cjs/index.js +18 -34
- package/lib/cjs/index.spec.js +51 -80
- package/lib/cjs/linkable.js +3 -22
- package/lib/cjs/test.js +3 -25
- package/lib/cjs/types/constructor.js +0 -15
- package/lib/cjs/types/extension.js +0 -15
- package/lib/cjs/types/index.js +5 -21
- package/lib/cjs/types/typed-array.js +0 -15
- package/lib/cjs/types/webgl-constants.js +0 -15
- package/lib/cjs/types/webgl-context-attribute-options.js +0 -15
- package/lib/cjs/utils.js +24 -53
- package/lib/cjs/webgl-active-info.js +3 -22
- package/lib/cjs/webgl-buffer.js +6 -25
- package/lib/cjs/webgl-context-attributes.js +4 -23
- package/lib/cjs/webgl-drawing-buffer-wrapper.js +3 -22
- package/lib/cjs/webgl-framebuffer.js +6 -25
- package/lib/cjs/webgl-program.js +6 -25
- package/lib/cjs/webgl-renderbuffer.js +6 -25
- package/lib/cjs/webgl-rendering-context.js +204 -216
- package/lib/cjs/webgl-shader-precision-format.js +4 -23
- package/lib/cjs/webgl-shader.js +6 -25
- package/lib/cjs/webgl-texture-unit.js +3 -22
- package/lib/cjs/webgl-texture.js +6 -25
- package/lib/cjs/webgl-uniform-location.js +4 -23
- package/lib/cjs/webgl-vertex-attribute.js +9 -28
- package/lib/types/html-canvas-element.d.ts +1 -0
- package/lib/types/webgl-rendering-context.d.ts +1 -0
- package/package.json +11 -11
- package/test.gjs.js +524 -559
- package/tmp/.tsbuildinfo +1 -1
- package/tsconfig.json +1 -1
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var ext_blend_minmax_exports = {};
|
|
19
|
-
__export(ext_blend_minmax_exports, {
|
|
20
|
-
EXTBlendMinMax: () => EXTBlendMinMax,
|
|
21
|
-
getEXTBlendMinMax: () => getEXTBlendMinMax
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(ext_blend_minmax_exports);
|
|
24
1
|
class EXTBlendMinMax {
|
|
25
2
|
constructor() {
|
|
26
3
|
this.MIN_EXT = 32775;
|
|
@@ -35,3 +12,7 @@ function getEXTBlendMinMax(context) {
|
|
|
35
12
|
}
|
|
36
13
|
return result;
|
|
37
14
|
}
|
|
15
|
+
export {
|
|
16
|
+
EXTBlendMinMax,
|
|
17
|
+
getEXTBlendMinMax
|
|
18
|
+
};
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var ext_texture_filter_anisotropic_exports = {};
|
|
19
|
-
__export(ext_texture_filter_anisotropic_exports, {
|
|
20
|
-
EXTTextureFilterAnisotropic: () => EXTTextureFilterAnisotropic,
|
|
21
|
-
getEXTTextureFilterAnisotropic: () => getEXTTextureFilterAnisotropic
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(ext_texture_filter_anisotropic_exports);
|
|
24
1
|
class EXTTextureFilterAnisotropic {
|
|
25
2
|
constructor() {
|
|
26
3
|
this.TEXTURE_MAX_ANISOTROPY_EXT = 34046;
|
|
@@ -35,3 +12,7 @@ function getEXTTextureFilterAnisotropic(context) {
|
|
|
35
12
|
}
|
|
36
13
|
return result;
|
|
37
14
|
}
|
|
15
|
+
export {
|
|
16
|
+
EXTTextureFilterAnisotropic,
|
|
17
|
+
getEXTTextureFilterAnisotropic
|
|
18
|
+
};
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var oes_element_index_unit_exports = {};
|
|
19
|
-
__export(oes_element_index_unit_exports, {
|
|
20
|
-
OESElementIndexUint: () => OESElementIndexUint,
|
|
21
|
-
getOESElementIndexUint: () => getOESElementIndexUint
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(oes_element_index_unit_exports);
|
|
24
1
|
class OESElementIndexUint {
|
|
25
2
|
}
|
|
26
3
|
function getOESElementIndexUint(context) {
|
|
@@ -31,3 +8,7 @@ function getOESElementIndexUint(context) {
|
|
|
31
8
|
}
|
|
32
9
|
return result;
|
|
33
10
|
}
|
|
11
|
+
export {
|
|
12
|
+
OESElementIndexUint,
|
|
13
|
+
getOESElementIndexUint
|
|
14
|
+
};
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var oes_standard_derivatives_exports = {};
|
|
19
|
-
__export(oes_standard_derivatives_exports, {
|
|
20
|
-
OESStandardDerivatives: () => OESStandardDerivatives,
|
|
21
|
-
getOESStandardDerivatives: () => getOESStandardDerivatives
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(oes_standard_derivatives_exports);
|
|
24
1
|
class OESStandardDerivatives {
|
|
25
2
|
constructor() {
|
|
26
3
|
this.FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 35723;
|
|
@@ -34,3 +11,7 @@ function getOESStandardDerivatives(context) {
|
|
|
34
11
|
}
|
|
35
12
|
return result;
|
|
36
13
|
}
|
|
14
|
+
export {
|
|
15
|
+
OESStandardDerivatives,
|
|
16
|
+
getOESStandardDerivatives
|
|
17
|
+
};
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var oes_texture_float_linear_exports = {};
|
|
19
|
-
__export(oes_texture_float_linear_exports, {
|
|
20
|
-
OESTextureFloatLinear: () => OESTextureFloatLinear,
|
|
21
|
-
getOESTextureFloatLinear: () => getOESTextureFloatLinear
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(oes_texture_float_linear_exports);
|
|
24
1
|
class OESTextureFloatLinear {
|
|
25
2
|
}
|
|
26
3
|
function getOESTextureFloatLinear(context) {
|
|
@@ -31,3 +8,7 @@ function getOESTextureFloatLinear(context) {
|
|
|
31
8
|
}
|
|
32
9
|
return result;
|
|
33
10
|
}
|
|
11
|
+
export {
|
|
12
|
+
OESTextureFloatLinear,
|
|
13
|
+
getOESTextureFloatLinear
|
|
14
|
+
};
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var oes_texture_float_exports = {};
|
|
19
|
-
__export(oes_texture_float_exports, {
|
|
20
|
-
OESTextureFloat: () => OESTextureFloat,
|
|
21
|
-
getOESTextureFloat: () => getOESTextureFloat
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(oes_texture_float_exports);
|
|
24
1
|
class OESTextureFloat {
|
|
25
2
|
}
|
|
26
3
|
function getOESTextureFloat(context) {
|
|
@@ -31,3 +8,7 @@ function getOESTextureFloat(context) {
|
|
|
31
8
|
}
|
|
32
9
|
return result;
|
|
33
10
|
}
|
|
11
|
+
export {
|
|
12
|
+
OESTextureFloat,
|
|
13
|
+
getOESTextureFloat
|
|
14
|
+
};
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var stackgl_destroy_context_exports = {};
|
|
19
|
-
__export(stackgl_destroy_context_exports, {
|
|
20
|
-
STACKGLDestroyContext: () => STACKGLDestroyContext,
|
|
21
|
-
getSTACKGLDestroyContext: () => getSTACKGLDestroyContext
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(stackgl_destroy_context_exports);
|
|
24
1
|
class STACKGLDestroyContext {
|
|
25
2
|
constructor(ctx) {
|
|
26
3
|
this.destroy = ctx.destroy.bind(ctx);
|
|
@@ -29,3 +6,7 @@ class STACKGLDestroyContext {
|
|
|
29
6
|
function getSTACKGLDestroyContext(ctx) {
|
|
30
7
|
return new STACKGLDestroyContext(ctx);
|
|
31
8
|
}
|
|
9
|
+
export {
|
|
10
|
+
STACKGLDestroyContext,
|
|
11
|
+
getSTACKGLDestroyContext
|
|
12
|
+
};
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var stackgl_resize_drawing_buffer_exports = {};
|
|
19
|
-
__export(stackgl_resize_drawing_buffer_exports, {
|
|
20
|
-
STACKGLResizeDrawingBuffer: () => STACKGLResizeDrawingBuffer,
|
|
21
|
-
getSTACKGLResizeDrawingBuffer: () => getSTACKGLResizeDrawingBuffer
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(stackgl_resize_drawing_buffer_exports);
|
|
24
1
|
class STACKGLResizeDrawingBuffer {
|
|
25
2
|
constructor(ctx) {
|
|
26
3
|
this.resize = ctx.resize.bind(ctx);
|
|
@@ -29,3 +6,7 @@ class STACKGLResizeDrawingBuffer {
|
|
|
29
6
|
function getSTACKGLResizeDrawingBuffer(ctx) {
|
|
30
7
|
return new STACKGLResizeDrawingBuffer(ctx);
|
|
31
8
|
}
|
|
9
|
+
export {
|
|
10
|
+
STACKGLResizeDrawingBuffer,
|
|
11
|
+
getSTACKGLResizeDrawingBuffer
|
|
12
|
+
};
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var html_canvas_element_exports = {};
|
|
19
|
-
__export(html_canvas_element_exports, {
|
|
20
|
-
GjsifyHTMLCanvasElement: () => GjsifyHTMLCanvasElement,
|
|
21
|
-
HTMLCanvasElement: () => GjsifyHTMLCanvasElement
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(html_canvas_element_exports);
|
|
24
|
-
var import_utils = require("@gjsify/utils");
|
|
25
|
-
var import_webgl_rendering_context = require("./webgl-rendering-context.js");
|
|
1
|
+
import { warnNotImplemented, notImplemented } from "@gjsify/utils";
|
|
2
|
+
import { GjsifyWebGLRenderingContext } from "./webgl-rendering-context.js";
|
|
26
3
|
class GjsifyHTMLCanvasElement {
|
|
27
4
|
constructor(gtkGlArea) {
|
|
28
5
|
this.gtkGlArea = gtkGlArea;
|
|
@@ -39,7 +16,7 @@ class GjsifyHTMLCanvasElement {
|
|
|
39
16
|
}
|
|
40
17
|
/** Sets the height of a canvas element on a document. */
|
|
41
18
|
set height(_height) {
|
|
42
|
-
|
|
19
|
+
warnNotImplemented("GjsifyHTMLCanvasElement.set_height");
|
|
43
20
|
}
|
|
44
21
|
/** Gets the width of a canvas element on a document. */
|
|
45
22
|
get width() {
|
|
@@ -47,13 +24,13 @@ class GjsifyHTMLCanvasElement {
|
|
|
47
24
|
}
|
|
48
25
|
/** Sets the width of a canvas element on a document. */
|
|
49
26
|
set width(_width) {
|
|
50
|
-
|
|
27
|
+
warnNotImplemented("GjsifyHTMLCanvasElement.set_width");
|
|
51
28
|
}
|
|
52
29
|
get clientWidth() {
|
|
53
30
|
return this.width;
|
|
54
31
|
}
|
|
55
32
|
captureStream(_frameRequestRate) {
|
|
56
|
-
|
|
33
|
+
notImplemented("HTMLCanvasElement.captureStream");
|
|
57
34
|
return new MediaStream();
|
|
58
35
|
}
|
|
59
36
|
getContext(contextId, options) {
|
|
@@ -62,28 +39,32 @@ class GjsifyHTMLCanvasElement {
|
|
|
62
39
|
if (this._webgl) {
|
|
63
40
|
return this._webgl;
|
|
64
41
|
}
|
|
65
|
-
this._webgl = new
|
|
42
|
+
this._webgl = new GjsifyWebGLRenderingContext(this, options);
|
|
66
43
|
return this._webgl;
|
|
67
44
|
default:
|
|
68
|
-
|
|
45
|
+
warnNotImplemented(`GjsifyHTMLCanvasElement.getContext("${contextId}")`);
|
|
69
46
|
}
|
|
70
47
|
return null;
|
|
71
48
|
}
|
|
72
49
|
toBlob(_callback, _type, _quality) {
|
|
73
|
-
|
|
50
|
+
notImplemented("HTMLCanvasElement.toBlob");
|
|
74
51
|
}
|
|
75
52
|
/**
|
|
76
53
|
* Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
|
|
77
54
|
* @param _type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
|
|
78
55
|
*/
|
|
79
56
|
toDataURL(_type, _quality) {
|
|
80
|
-
|
|
57
|
+
notImplemented("HTMLCanvasElement.toDataURL");
|
|
81
58
|
return "";
|
|
82
59
|
}
|
|
83
60
|
addEventListener(_type, _listener, _options) {
|
|
84
|
-
|
|
61
|
+
notImplemented("HTMLCanvasElement.addEventListener");
|
|
85
62
|
}
|
|
86
63
|
removeEventListener(_type, _listener, _options) {
|
|
87
|
-
|
|
64
|
+
notImplemented("HTMLCanvasElement.removeEventListener");
|
|
88
65
|
}
|
|
89
66
|
}
|
|
67
|
+
export {
|
|
68
|
+
GjsifyHTMLCanvasElement,
|
|
69
|
+
GjsifyHTMLCanvasElement as HTMLCanvasElement
|
|
70
|
+
};
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var import_gtk_4 = require("@girs/gtk-4.0");
|
|
20
|
-
__reExport(ts_exports, require("./html-canvas-element.js"), module.exports);
|
|
21
|
-
__reExport(ts_exports, require("./webgl-active-info.js"), module.exports);
|
|
22
|
-
__reExport(ts_exports, require("./webgl-buffer.js"), module.exports);
|
|
23
|
-
__reExport(ts_exports, require("./webgl-context-attributes.js"), module.exports);
|
|
24
|
-
__reExport(ts_exports, require("./webgl-drawing-buffer-wrapper.js"), module.exports);
|
|
25
|
-
__reExport(ts_exports, require("./webgl-framebuffer.js"), module.exports);
|
|
26
|
-
__reExport(ts_exports, require("./webgl-program.js"), module.exports);
|
|
27
|
-
__reExport(ts_exports, require("./webgl-renderbuffer.js"), module.exports);
|
|
28
|
-
__reExport(ts_exports, require("./webgl-rendering-context.js"), module.exports);
|
|
29
|
-
__reExport(ts_exports, require("./webgl-shader-precision-format.js"), module.exports);
|
|
30
|
-
__reExport(ts_exports, require("./webgl-shader.js"), module.exports);
|
|
31
|
-
__reExport(ts_exports, require("./webgl-texture-unit.js"), module.exports);
|
|
32
|
-
__reExport(ts_exports, require("./webgl-texture.js"), module.exports);
|
|
33
|
-
__reExport(ts_exports, require("./webgl-uniform-location.js"), module.exports);
|
|
34
|
-
__reExport(ts_exports, require("./webgl-vertex-attribute.js"), module.exports);
|
|
1
|
+
import "@girs/gjs";
|
|
2
|
+
import "@girs/gio-2.0";
|
|
3
|
+
import "@girs/gtk-4.0";
|
|
4
|
+
export * from "./html-canvas-element.js";
|
|
5
|
+
export * from "./webgl-active-info.js";
|
|
6
|
+
export * from "./webgl-buffer.js";
|
|
7
|
+
export * from "./webgl-context-attributes.js";
|
|
8
|
+
export * from "./webgl-drawing-buffer-wrapper.js";
|
|
9
|
+
export * from "./webgl-framebuffer.js";
|
|
10
|
+
export * from "./webgl-program.js";
|
|
11
|
+
export * from "./webgl-renderbuffer.js";
|
|
12
|
+
export * from "./webgl-rendering-context.js";
|
|
13
|
+
export * from "./webgl-shader-precision-format.js";
|
|
14
|
+
export * from "./webgl-shader.js";
|
|
15
|
+
export * from "./webgl-texture-unit.js";
|
|
16
|
+
export * from "./webgl-texture.js";
|
|
17
|
+
export * from "./webgl-uniform-location.js";
|
|
18
|
+
export * from "./webgl-vertex-attribute.js";
|