@zephyr3d/device 0.1.0

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 (40) hide show
  1. package/dist/base_types.js +602 -0
  2. package/dist/base_types.js.map +1 -0
  3. package/dist/builder/ast.js +2135 -0
  4. package/dist/builder/ast.js.map +1 -0
  5. package/dist/builder/base.js +477 -0
  6. package/dist/builder/base.js.map +1 -0
  7. package/dist/builder/builtinfunc.js +4101 -0
  8. package/dist/builder/builtinfunc.js.map +1 -0
  9. package/dist/builder/constructors.js +173 -0
  10. package/dist/builder/constructors.js.map +1 -0
  11. package/dist/builder/errors.js +148 -0
  12. package/dist/builder/errors.js.map +1 -0
  13. package/dist/builder/programbuilder.js +2323 -0
  14. package/dist/builder/programbuilder.js.map +1 -0
  15. package/dist/builder/reflection.js +60 -0
  16. package/dist/builder/reflection.js.map +1 -0
  17. package/dist/builder/types.js +1563 -0
  18. package/dist/builder/types.js.map +1 -0
  19. package/dist/device.js +515 -0
  20. package/dist/device.js.map +1 -0
  21. package/dist/gpuobject.js +2047 -0
  22. package/dist/gpuobject.js.map +1 -0
  23. package/dist/helpers/drawtext.js +187 -0
  24. package/dist/helpers/drawtext.js.map +1 -0
  25. package/dist/helpers/font.js +189 -0
  26. package/dist/helpers/font.js.map +1 -0
  27. package/dist/helpers/glyphmanager.js +121 -0
  28. package/dist/helpers/glyphmanager.js.map +1 -0
  29. package/dist/helpers/textureatlas.js +170 -0
  30. package/dist/helpers/textureatlas.js.map +1 -0
  31. package/dist/index.d.ts +3873 -0
  32. package/dist/index.js +16 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/timer.js +38 -0
  35. package/dist/timer.js.map +1 -0
  36. package/dist/uniformdata.js +147 -0
  37. package/dist/uniformdata.js.map +1 -0
  38. package/dist/vertexdata.js +135 -0
  39. package/dist/vertexdata.js.map +1 -0
  40. package/package.json +69 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"programbuilder.js","sources":[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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Reflection interface for program builder
3
+ * @public
4
+ */ class PBReflection {
5
+ /** @internal */ _builder;
6
+ /** @internal */ _tagList;
7
+ /** @internal */ _attribList;
8
+ constructor(builder){
9
+ this._builder = builder;
10
+ this._tagList = {};
11
+ this._attribList = {};
12
+ }
13
+ /** Gets all the vertex attributes that was used by the program */ get vertexAttributes() {
14
+ return this._builder.getVertexAttributes();
15
+ }
16
+ /**
17
+ * Check if specified vertex attribute was used by the program
18
+ * @param attrib - The vertex attribute to check
19
+ */ hasVertexAttribute(attrib) {
20
+ return this.vertexAttributes.indexOf(attrib) >= 0;
21
+ }
22
+ /**
23
+ * Clear all contents
24
+ */ clear() {
25
+ this._tagList = {};
26
+ this._attribList = {};
27
+ }
28
+ tag(arg0, arg1) {
29
+ if (typeof arg0 === 'string') {
30
+ if (arg1 === undefined) {
31
+ return this.getTag(arg0);
32
+ } else {
33
+ this.addTag(arg0, arg1);
34
+ }
35
+ } else {
36
+ for (const k of Object.keys(arg0)){
37
+ this.addTag(k, arg0[k]);
38
+ }
39
+ }
40
+ }
41
+ /**
42
+ * Gets the variable which is the vertex attribute of specified semantic
43
+ * @param attrib - The vertex semantic
44
+ */ attribute(attrib) {
45
+ return this._attribList[attrib] || null;
46
+ }
47
+ /** @internal */ setAttrib(attrib, exp) {
48
+ this._attribList[attrib] = exp;
49
+ }
50
+ /** @internal */ addTag(name, exp) {
51
+ this._tagList[name] = exp;
52
+ }
53
+ /** @internal */ getTag(name) {
54
+ const getter = this._tagList[name];
55
+ return getter ? getter(this._builder.getGlobalScope()) : null;
56
+ }
57
+ }
58
+
59
+ export { PBReflection };
60
+ //# sourceMappingURL=reflection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reflection.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}