@tolokoban/tgd 2.0.135 → 2.0.136
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/README.md +9 -0
- package/lib/dist/context/context.d.ts +2 -1
- package/lib/dist/context/context.d.ts.map +1 -1
- package/lib/dist/context/context.js +4 -8
- package/lib/dist/context/extensions.d.ts +174 -0
- package/lib/dist/context/extensions.d.ts.map +1 -0
- package/lib/dist/context/extensions.js +41 -0
- package/lib/dist/controller/camera/orbit.js +3 -3
- package/lib/dist/dataset/dataset.d.ts +2 -0
- package/lib/dist/dataset/dataset.d.ts.map +1 -1
- package/lib/dist/dataset/dataset.js +16 -1
- package/lib/dist/filter/filter.d.ts +5 -4
- package/lib/dist/filter/filter.d.ts.map +1 -1
- package/lib/dist/filter/filter.js +7 -4
- package/lib/dist/geometry/geometry.d.ts +2 -0
- package/lib/dist/geometry/geometry.d.ts.map +1 -1
- package/lib/dist/geometry/geometry.js +16 -2
- package/lib/dist/geometry/tools/index.d.ts +1 -0
- package/lib/dist/geometry/tools/index.d.ts.map +1 -1
- package/lib/dist/geometry/tools/index.js +2 -1
- package/lib/dist/geometry/tools/join.d.ts +8 -0
- package/lib/dist/geometry/tools/join.d.ts.map +1 -0
- package/lib/dist/geometry/tools/join.js +134 -0
- package/lib/dist/input/pointer.d.ts.map +1 -1
- package/lib/dist/input/pointer.js +6 -5
- package/lib/dist/painter/filter/filter.d.ts +1 -0
- package/lib/dist/painter/filter/filter.d.ts.map +1 -1
- package/lib/dist/painter/filter/filter.js +29 -3
- package/lib/dist/painter/framebuffer.d.ts.map +1 -1
- package/lib/dist/painter/framebuffer.js +2 -3
- package/lib/dist/painter/overlay/overlay.d.ts.map +1 -1
- package/lib/dist/painter/overlay/overlay.js +8 -10
- package/lib/dist/painter/particles/particles.d.ts +4 -1
- package/lib/dist/painter/particles/particles.d.ts.map +1 -1
- package/lib/dist/painter/particles/particles.js +27 -6
- package/lib/dist/painter/program.js +4 -19
- package/lib/dist/texture/texture-depth.d.ts +2 -2
- package/lib/dist/texture/texture-depth.d.ts.map +1 -1
- package/lib/dist/texture/texture-depth.js +11 -13
- package/lib/dist/texture/texture2d.d.ts +11 -7
- package/lib/dist/texture/texture2d.d.ts.map +1 -1
- package/lib/dist/texture/texture2d.js +141 -79
- package/lib/dist/types/elements.d.ts +1 -0
- package/lib/dist/types/elements.d.ts.map +1 -1
- package/lib/dist/types/elements.js +10 -1
- package/lib/dist/utils/index.d.ts +1 -0
- package/lib/dist/utils/index.d.ts.map +1 -1
- package/lib/dist/utils/index.js +2 -1
- package/lib/dist/utils/texture.d.ts +5 -0
- package/lib/dist/utils/texture.d.ts.map +1 -0
- package/lib/dist/utils/texture.js +17 -0
- package/lib/dist/version.d.ts +1 -1
- package/lib/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TgdTexture2D, TgdTextureCube } from "./../texture/index.js";
|
|
2
|
+
export function tgdTextureRecordToUniforms(textures) {
|
|
3
|
+
const uniforms = {};
|
|
4
|
+
for (const name of Object.keys(textures)) {
|
|
5
|
+
uniforms[name] = tgdTextureResolveGLSLType(textures[name]);
|
|
6
|
+
}
|
|
7
|
+
return uniforms;
|
|
8
|
+
}
|
|
9
|
+
export function tgdTextureResolveGLSLType(texture) {
|
|
10
|
+
if (texture instanceof TgdTexture2D)
|
|
11
|
+
return "sampler2D";
|
|
12
|
+
if (texture instanceof TgdTextureCube)
|
|
13
|
+
return "samplerCube";
|
|
14
|
+
console.error("[resolveTextureType] Don't know the type of this texture:", texture);
|
|
15
|
+
throw new Error("[resolveTextureType] Don't know the type of this texture!");
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dHVyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy90ZXh0dXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsY0FBYyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBRzNELE1BQU0sVUFBVSwwQkFBMEIsQ0FBQyxRQUF1RDtJQUM5RixNQUFNLFFBQVEsR0FBcUMsRUFBRSxDQUFBO0lBQ3JELEtBQUssTUFBTSxJQUFJLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDO1FBQ3ZDLFFBQVEsQ0FBQyxJQUFJLENBQUMsR0FBRyx5QkFBeUIsQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQTtJQUM5RCxDQUFDO0lBQ0QsT0FBTyxRQUFRLENBQUE7QUFDbkIsQ0FBQztBQUVELE1BQU0sVUFBVSx5QkFBeUIsQ0FBQyxPQUFzQztJQUM1RSxJQUFJLE9BQU8sWUFBWSxZQUFZO1FBQUUsT0FBTyxXQUFXLENBQUE7SUFFdkQsSUFBSSxPQUFPLFlBQVksY0FBYztRQUFFLE9BQU8sYUFBYSxDQUFBO0lBRTNELE9BQU8sQ0FBQyxLQUFLLENBQUMsMkRBQTJELEVBQUUsT0FBTyxDQUFDLENBQUE7SUFDbkYsTUFBTSxJQUFJLEtBQUssQ0FBQywyREFBMkQsQ0FBQyxDQUFBO0FBQ2hGLENBQUMifQ==
|
package/lib/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "2.0.
|
|
1
|
+
export declare const version = "2.0.136";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = "2.0.
|
|
1
|
+
export const version = "2.0.136";
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxTQUFTLENBQUEifQ==
|