@luma.gl/engine 9.2.3 → 9.2.5
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/dist/dist.dev.js +15 -10
- package/dist/dist.min.js +1 -1
- package/dist/factories/pipeline-factory.d.ts.map +1 -1
- package/dist/factories/pipeline-factory.js +6 -6
- package/dist/factories/pipeline-factory.js.map +1 -1
- package/dist/factories/shader-factory.d.ts.map +1 -1
- package/dist/factories/shader-factory.js +4 -4
- package/dist/factories/shader-factory.js.map +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +2 -2
- package/package.json +2 -2
- package/src/factories/pipeline-factory.ts +8 -6
- package/src/factories/shader-factory.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luma.gl/engine",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.5",
|
|
4
4
|
"description": "3D Engine Components for luma.gl",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@probe.gl/log": "^4.0.8",
|
|
50
50
|
"@probe.gl/stats": "^4.0.8"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "a8efd26edd0c61c7bb29ea700c6c38f544f60326"
|
|
53
53
|
}
|
|
@@ -69,12 +69,13 @@ export class PipelineFactory {
|
|
|
69
69
|
pipeline.hash = hash;
|
|
70
70
|
cache[hash] = {pipeline, useCount: 1};
|
|
71
71
|
if (this.debug) {
|
|
72
|
-
log.
|
|
72
|
+
log.log(3, `${this}: ${pipeline} created, count=${cache[hash].useCount}`)();
|
|
73
73
|
}
|
|
74
74
|
} else {
|
|
75
75
|
cache[hash].useCount++;
|
|
76
76
|
if (this.debug) {
|
|
77
|
-
log.
|
|
77
|
+
log.log(
|
|
78
|
+
3,
|
|
78
79
|
`${this}: ${cache[hash].pipeline} reused, count=${cache[hash].useCount}, (id=${props.id})`
|
|
79
80
|
)();
|
|
80
81
|
}
|
|
@@ -103,12 +104,13 @@ export class PipelineFactory {
|
|
|
103
104
|
pipeline.hash = hash;
|
|
104
105
|
cache[hash] = {pipeline, useCount: 1};
|
|
105
106
|
if (this.debug) {
|
|
106
|
-
log.
|
|
107
|
+
log.log(3, `${this}: ${pipeline} created, count=${cache[hash].useCount}`)();
|
|
107
108
|
}
|
|
108
109
|
} else {
|
|
109
110
|
cache[hash].useCount++;
|
|
110
111
|
if (this.debug) {
|
|
111
|
-
log.
|
|
112
|
+
log.log(
|
|
113
|
+
3,
|
|
112
114
|
`${this}: ${cache[hash].pipeline} reused, count=${cache[hash].useCount}, (id=${props.id})`
|
|
113
115
|
)();
|
|
114
116
|
}
|
|
@@ -130,13 +132,13 @@ export class PipelineFactory {
|
|
|
130
132
|
if (cache[hash].useCount === 0) {
|
|
131
133
|
this._destroyPipeline(pipeline);
|
|
132
134
|
if (this.debug) {
|
|
133
|
-
log.
|
|
135
|
+
log.log(3, `${this}: ${pipeline} released and destroyed`)();
|
|
134
136
|
}
|
|
135
137
|
} else if (cache[hash].useCount < 0) {
|
|
136
138
|
log.error(`${this}: ${pipeline} released, useCount < 0, resetting`)();
|
|
137
139
|
cache[hash].useCount = 0;
|
|
138
140
|
} else if (this.debug) {
|
|
139
|
-
log.
|
|
141
|
+
log.log(3, `${this}: ${pipeline} released, count=${cache[hash].useCount}`)();
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
144
|
|
|
@@ -53,12 +53,15 @@ export class ShaderFactory {
|
|
|
53
53
|
});
|
|
54
54
|
this._cache[key] = cacheEntry = {shader, useCount: 1};
|
|
55
55
|
if (this.debug) {
|
|
56
|
-
log.
|
|
56
|
+
log.log(3, `${this}: Created new shader ${shader.id}`)();
|
|
57
57
|
}
|
|
58
58
|
} else {
|
|
59
59
|
cacheEntry.useCount++;
|
|
60
60
|
if (this.debug) {
|
|
61
|
-
log.
|
|
61
|
+
log.log(
|
|
62
|
+
3,
|
|
63
|
+
`${this}: Reusing shader ${cacheEntry.shader.id} count=${cacheEntry.useCount}`
|
|
64
|
+
)();
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
|
|
@@ -81,13 +84,13 @@ export class ShaderFactory {
|
|
|
81
84
|
delete this._cache[key];
|
|
82
85
|
cacheEntry.shader.destroy();
|
|
83
86
|
if (this.debug) {
|
|
84
|
-
log.
|
|
87
|
+
log.log(3, `${this}: Releasing shader ${shader.id}, destroyed`)();
|
|
85
88
|
}
|
|
86
89
|
}
|
|
87
90
|
} else if (cacheEntry.useCount < 0) {
|
|
88
91
|
throw new Error(`ShaderFactory: Shader ${shader.id} released too many times`);
|
|
89
92
|
} else if (this.debug) {
|
|
90
|
-
log.
|
|
93
|
+
log.log(3, `${this}: Releasing shader ${shader.id} count=${cacheEntry.useCount}`)();
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
}
|