@woosh/meep-engine 2.110.9 → 2.110.11
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/build/meep.cjs +23 -1
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +23 -1
- package/editor/ecs/component/editors/Sampler2DEditor.js +9 -9
- package/editor/ecs/component/editors/three/BufferGeometryEditor.js +4 -4
- package/editor/ecs/component/editors/three/MaterialEditor.js +3 -3
- package/editor/ecs/component/editors/three/MeshEditor.js +4 -4
- package/editor/ecs/component/editors/three/TextureEditor.js +1 -1
- package/editor/tools/paint/TerrainPaintTool.js +7 -7
- package/editor/tools/paint/TerrainTexturePaintTool.js +5 -5
- package/editor/view/ecs/components/GridObstacleController.js +6 -6
- package/editor/view/ecs/components/TerrainController.js +2 -2
- package/package.json +1 -1
- package/samples/terrain/editor.js +2 -2
- package/src/core/UUID.js +1 -1
- package/src/core/color/kelvin/prototype_kelvin_to_rgb.js +3 -3
- package/src/core/geom/2d/aabb/AABB2.d.ts.map +1 -1
- package/src/core/geom/2d/aabb/AABB2.js +27 -1
- package/src/core/geom/3d/normal/octahedron/prototype.js +1 -1
- package/src/core/geom/3d/tetrahedra/compute_tetrahedron_volume.d.ts +9 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedron_volume.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedron_volume.js +18 -0
- package/src/core/geom/3d/tetrahedra/delaunay/compute_delaunay_tetrahedral_mesh.spec.js +17 -3
- package/src/core/geom/3d/tetrahedra/delaunay/tetrahedral_mesh_build_from_grid.spec.js +25 -2
- package/src/core/geom/3d/tetrahedra/is_tetrahedron_degenerate.d.ts +9 -0
- package/src/core/geom/3d/tetrahedra/is_tetrahedron_degenerate.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/is_tetrahedron_degenerate.js +21 -0
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.d.ts +2 -1
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.js +2 -1
- package/src/core/geom/3d/tetrahedra/triangle/prototype.js +1 -1
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.d.ts +2 -10
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +24 -31
- package/src/core/geom/mat3/m3_cm_invert.d.ts +7 -0
- package/src/core/geom/mat3/m3_cm_invert.d.ts.map +1 -0
- package/src/core/geom/mat3/m3_cm_invert.js +45 -0
- package/src/core/geom/vec2/v2_matrix3_cm_multiply.d.ts +10 -0
- package/src/core/geom/vec2/v2_matrix3_cm_multiply.d.ts.map +1 -0
- package/src/core/geom/vec2/v2_matrix3_cm_multiply.js +20 -0
- package/src/core/geom/vec2/v2_matrix3_rm_multiply.d.ts +10 -0
- package/src/core/geom/vec2/v2_matrix3_rm_multiply.d.ts.map +1 -0
- package/src/core/geom/vec2/v2_matrix3_rm_multiply.js +21 -0
- package/src/core/math/spline/spline_hermite3.js +2 -1
- package/src/core/math/spline/spline_hermite3_to_bezier.d.ts +12 -0
- package/src/core/math/spline/spline_hermite3_to_bezier.d.ts.map +1 -0
- package/src/core/math/spline/spline_hermite3_to_bezier.js +24 -0
- package/src/core/process/task/Task.d.ts.map +1 -1
- package/src/core/process/task/Task.js +2 -0
- package/src/core/process/task/util/actionTask.d.ts +2 -2
- package/src/core/process/task/util/actionTask.d.ts.map +1 -1
- package/src/core/process/task/util/actionTask.js +5 -2
- package/src/core/process/task/util/ignoreFailureTask.d.ts +8 -0
- package/src/core/process/task/util/ignoreFailureTask.d.ts.map +1 -0
- package/src/core/process/task/util/{wrapTaskIgnoreFailure.js → ignoreFailureTask.js} +9 -4
- package/src/core/process/task/util/task_tree_compute_leaf_tasks.d.ts +1 -1
- package/src/core/process/task/util/task_tree_compute_leaf_tasks.js +1 -1
- package/src/engine/animation/clip/AnimationTrack.js +1 -1
- package/src/engine/animation/curve/AnimationCurve.d.ts +11 -0
- package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
- package/src/engine/animation/curve/AnimationCurve.js +51 -4
- package/src/engine/animation/curve/draw/build_curve_editor.d.ts.map +1 -1
- package/src/engine/animation/curve/draw/build_curve_editor.js +15 -9
- package/src/engine/animation/curve/view/AnimationCurveView.d.ts +47 -0
- package/src/engine/animation/curve/view/AnimationCurveView.d.ts.map +1 -0
- package/src/engine/animation/curve/view/AnimationCurveView.js +343 -0
- package/src/engine/animation/curve/view/prototype.d.ts +2 -0
- package/src/engine/animation/curve/view/prototype.d.ts.map +1 -0
- package/src/engine/animation/curve/view/prototype.js +86 -0
- package/src/engine/asset/loaders/image/png/prototypePNG.js +1 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js +1 -1
- package/src/engine/ecs/guid/UUID.d.ts +10 -3
- package/src/engine/ecs/guid/UUID.d.ts.map +1 -1
- package/src/engine/ecs/guid/UUID.js +17 -5
- package/src/engine/ecs/guid/UUID.spec.js +7 -0
- package/src/engine/ecs/guid/UUIDSerializationAdapter.spec.d.ts +2 -0
- package/src/engine/ecs/guid/UUIDSerializationAdapter.spec.d.ts.map +1 -0
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +2 -2
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +1 -1
- package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.js +3 -3
- package/src/engine/graphics/texture/sampler/debug/debug_draw_sampler.js +1 -1
- package/src/engine/graphics/texture/sampler/downloadSamplerAsPNG.js +2 -2
- package/src/engine/graphics/texture/sampler/sampler2d_to_data_url.d.ts +8 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_data_url.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_data_url.js +22 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_data_url.spec.d.ts +2 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_data_url.spec.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/{convertSampler2D2DataURL.spec.js → sampler2d_to_data_url.spec.js} +2 -2
- package/src/engine/graphics/texture/sampler/{Sampler2D2Canvas.d.ts → sampler2d_to_html_canvas.d.ts} +3 -3
- package/src/engine/graphics/texture/sampler/sampler2d_to_html_canvas.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/{Sampler2D2Canvas.js → sampler2d_to_html_canvas.js} +7 -7
- package/src/engine/graphics/texture/sampler/util/drawSamplerHTML.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/util/drawSamplerHTML.js +3 -3
- package/src/engine/graphics/texture/sprite/prototypeSpriteCutoutGeometry.js +1 -1
- package/src/engine/scene/transitionToScene.js +3 -3
- package/src/generation/filtering/numeric/util/visualise_filters_as_grid.js +3 -3
- package/src/misc/makeMatcapSelectionOption.js +2 -2
- package/src/view/elements/DropDownSelectionView.js +1 -1
- package/src/view/elements/tiles2d/Tile.d.ts +1 -1
- package/src/view/elements/tiles2d/Tile.d.ts.map +1 -1
- package/src/view/elements/tiles2d/Tile.js +2 -1
- package/src/core/process/task/util/wrapTaskIgnoreFailure.d.ts +0 -8
- package/src/core/process/task/util/wrapTaskIgnoreFailure.d.ts.map +0 -1
- package/src/engine/ecs/guid/GUIDSerializationAdapter.spec.d.ts +0 -2
- package/src/engine/ecs/guid/GUIDSerializationAdapter.spec.d.ts.map +0 -1
- package/src/engine/graphics/texture/sampler/Sampler2D2Canvas.d.ts.map +0 -1
- package/src/engine/graphics/texture/sampler/convertSampler2D2DataURL.d.ts +0 -7
- package/src/engine/graphics/texture/sampler/convertSampler2D2DataURL.d.ts.map +0 -1
- package/src/engine/graphics/texture/sampler/convertSampler2D2DataURL.js +0 -23
- package/src/engine/graphics/texture/sampler/convertSampler2D2DataURL.spec.d.ts +0 -2
- package/src/engine/graphics/texture/sampler/convertSampler2D2DataURL.spec.d.ts.map +0 -1
- /package/src/engine/ecs/guid/{GUIDSerializationAdapter.spec.js → UUIDSerializationAdapter.spec.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampler2d_to_data_url.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/sampler2d_to_data_url.spec.js"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { convertSampler2D2DataURL } from "./convertSampler2D2DataURL.js";
|
|
2
1
|
import { Sampler2D } from "./Sampler2D.js";
|
|
2
|
+
import { sampler2d_to_data_url } from "./sampler2d_to_data_url.js";
|
|
3
3
|
|
|
4
4
|
// currently does not run in Node.js context due to reliance on HTMLCanvasElement that is absent in Node.js
|
|
5
5
|
test.skip("result is a data URL", () => {
|
|
6
|
-
const result =
|
|
6
|
+
const result = sampler2d_to_data_url(Sampler2D.uint8(4, 1, 1));
|
|
7
7
|
|
|
8
8
|
expect(typeof result).toBe('string');
|
|
9
9
|
expect(result.startsWith("data://")).toBe(true);
|
package/src/engine/graphics/texture/sampler/{Sampler2D2Canvas.d.ts → sampler2d_to_html_canvas.d.ts}
RENAMED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export default convertSampler2D2Canvas;
|
|
2
1
|
/**
|
|
3
2
|
*
|
|
4
3
|
* @param {Sampler2D} sampler
|
|
@@ -7,6 +6,7 @@ export default convertSampler2D2Canvas;
|
|
|
7
6
|
* @param {HTMLCanvasElement} [canvas] if no canvas is supplied, a new one will be created
|
|
8
7
|
* @returns {HTMLCanvasElement} canvas
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
export function sampler2d_to_html_canvas(sampler: Sampler2D, scale?: number, offset?: number, canvas?: HTMLCanvasElement): HTMLCanvasElement;
|
|
10
|
+
export default sampler2d_to_html_canvas;
|
|
11
11
|
import { Sampler2D } from "./Sampler2D.js";
|
|
12
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=sampler2d_to_html_canvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampler2d_to_html_canvas.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/sampler2d_to_html_canvas.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,kDANW,SAAS,4CAGT,iBAAiB,GACf,iBAAiB,CA2E7B;;0BApFyB,gBAAgB"}
|
package/src/engine/graphics/texture/sampler/{Sampler2D2Canvas.js → sampler2d_to_html_canvas.js}
RENAMED
|
@@ -9,14 +9,14 @@ import { sampler2d_write_to_canvas_raw } from "./sampler2d_write_to_canvas_raw.j
|
|
|
9
9
|
* @param {HTMLCanvasElement} [canvas] if no canvas is supplied, a new one will be created
|
|
10
10
|
* @returns {HTMLCanvasElement} canvas
|
|
11
11
|
*/
|
|
12
|
-
function
|
|
12
|
+
export function sampler2d_to_html_canvas(
|
|
13
|
+
sampler,
|
|
14
|
+
scale = 255,
|
|
15
|
+
offset = 0,
|
|
16
|
+
canvas= document.createElement("canvas")
|
|
17
|
+
) {
|
|
13
18
|
const source_data = sampler.data;
|
|
14
19
|
|
|
15
|
-
//generate canvas
|
|
16
|
-
if (canvas === undefined) {
|
|
17
|
-
canvas = document.createElement("canvas");
|
|
18
|
-
}
|
|
19
|
-
|
|
20
20
|
const converted_sampler = Sampler2D.uint8clamped(4, sampler.width, sampler.height);
|
|
21
21
|
|
|
22
22
|
const width = sampler.width;
|
|
@@ -84,4 +84,4 @@ function convertSampler2D2Canvas(sampler, scale = 255, offset = 0, canvas) {
|
|
|
84
84
|
return canvas;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export default
|
|
87
|
+
export default sampler2d_to_html_canvas;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawSamplerHTML.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/util/drawSamplerHTML.js"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,4CARW,WAAW,WACX,SAAS,KACT,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QACN,MAAM,QA6BhB;
|
|
1
|
+
{"version":3,"file":"drawSamplerHTML.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/util/drawSamplerHTML.js"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,4CARW,WAAW,WACX,SAAS,KACT,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QACN,MAAM,QA6BhB;0BAzCyB,iBAAiB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Sampler2D } from "../Sampler2D.js";
|
|
2
1
|
import { sampler2d_scale } from "../resize/sampler2d_scale.js";
|
|
3
|
-
import
|
|
2
|
+
import { Sampler2D } from "../Sampler2D.js";
|
|
3
|
+
import sampler2d_to_html_canvas from "../sampler2d_to_html_canvas.js";
|
|
4
4
|
import { typedArrayConstructorByInstance } from "../typedArrayConstructorByInstance.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -33,7 +33,7 @@ export function drawSamplerHTML(parentNode, sampler, x, y, scale, offset, size)
|
|
|
33
33
|
|
|
34
34
|
sampler2d_scale(sampler, target);
|
|
35
35
|
|
|
36
|
-
const c =
|
|
36
|
+
const c = sampler2d_to_html_canvas(target, scale, offset);
|
|
37
37
|
c.style.zIndex = 1000;
|
|
38
38
|
c.style.position = "absolute";
|
|
39
39
|
c.style.left = `${x}px`;
|
|
@@ -13,7 +13,7 @@ import ViewportPositionSystem from "../../../ecs/gui/position/ViewportPositionSy
|
|
|
13
13
|
import { EngineHarness } from "../../../EngineHarness.js";
|
|
14
14
|
import { canvas2d_draw_path } from "../../canvas/canvas2d_draw_path.js";
|
|
15
15
|
import { Sampler2D } from "../sampler/Sampler2D.js";
|
|
16
|
-
import sampler2D2Canvas from "../sampler/
|
|
16
|
+
import sampler2D2Canvas from "../sampler/sampler2d_to_html_canvas.js";
|
|
17
17
|
import { make_edge_condition_channel_threshold } from "../sampler/search/make_edge_condition_channel_threshold.js";
|
|
18
18
|
import { sampler2d_find_pixels } from "../sampler/search/sampler2d_find_pixels.js";
|
|
19
19
|
|
|
@@ -6,7 +6,7 @@ import TaskGroup from "../../core/process/task/TaskGroup.js";
|
|
|
6
6
|
import TaskState from "../../core/process/task/TaskState.js";
|
|
7
7
|
import { actionTask } from "../../core/process/task/util/actionTask.js";
|
|
8
8
|
import { delayTask } from "../../core/process/task/util/delayTask.js";
|
|
9
|
-
import {
|
|
9
|
+
import { ignoreFailureTask } from "../../core/process/task/util/ignoreFailureTask.js";
|
|
10
10
|
import { TaskLoadingScreen } from "../../view/task/TaskLoadingScreen.js";
|
|
11
11
|
import { loadVisibleTerrainTiles } from "../ecs/terrain/util/loadVisibleTerrainTiles.js";
|
|
12
12
|
import { compileAllMaterials } from "../graphics/ecs/compileAllMaterials.js";
|
|
@@ -43,7 +43,7 @@ export function transitionToScene({
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
//wait for visible terrain tiles to be loaded
|
|
46
|
-
const tWaitForVisibleTerrainTiles =
|
|
46
|
+
const tWaitForVisibleTerrainTiles = ignoreFailureTask(loadVisibleTerrainTiles({
|
|
47
47
|
em: engine.entityManager,
|
|
48
48
|
ecd: scene.dataset
|
|
49
49
|
}));
|
|
@@ -51,7 +51,7 @@ export function transitionToScene({
|
|
|
51
51
|
|
|
52
52
|
tWaitForVisibleTerrainTiles.addDependencies(tasks);
|
|
53
53
|
|
|
54
|
-
const tWaitForMeshes =
|
|
54
|
+
const tWaitForMeshes = ignoreFailureTask(createTaskWaitForMeshesToLoad(scene.dataset, engine, 7000));
|
|
55
55
|
|
|
56
56
|
tWaitForMeshes.addDependencies(tasks);
|
|
57
57
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
-
import
|
|
2
|
+
import sampler2D2Canvas from "../../../../engine/graphics/texture/sampler/sampler2d_to_html_canvas.js";
|
|
3
|
+
import LabelView from "../../../../view/common/LabelView.js";
|
|
3
4
|
import { CanvasView } from "../../../../view/elements/CanvasView.js";
|
|
5
|
+
import EmptyView from "../../../../view/elements/EmptyView.js";
|
|
4
6
|
import { sampler_from_filter } from "./sampler_from_filter.js";
|
|
5
|
-
import sampler2D2Canvas from "../../../../engine/graphics/texture/sampler/Sampler2D2Canvas.js";
|
|
6
|
-
import LabelView from "../../../../view/common/LabelView.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MeshMatcapMaterial } from "three";
|
|
2
|
-
import
|
|
2
|
+
import sampler2d_to_html_canvas from "../engine/graphics/texture/sampler/sampler2d_to_html_canvas.js";
|
|
3
3
|
import { RadialMenuElementDefinition } from "../view/elements/radial/RadialMenuElementDefinition.js";
|
|
4
4
|
import View from "../view/View.js";
|
|
5
5
|
import { makeMaterialIconCached } from "./makeMaterialIconCached.js";
|
|
@@ -34,7 +34,7 @@ export async function makeMatcapSelectionOption(
|
|
|
34
34
|
material.dispose();
|
|
35
35
|
texture_object.dispose();
|
|
36
36
|
|
|
37
|
-
const canvasElement =
|
|
37
|
+
const canvasElement = sampler2d_to_html_canvas(icon, 1, 0);
|
|
38
38
|
|
|
39
39
|
const icon_view = new View();
|
|
40
40
|
icon_view.el = canvasElement;
|
|
@@ -9,8 +9,8 @@ declare class TileView extends View<HTMLElement> {
|
|
|
9
9
|
* @param {Vector2} [size]
|
|
10
10
|
*/
|
|
11
11
|
constructor({ model, spacing, size }: Rectangle);
|
|
12
|
-
model: Rectangle;
|
|
13
12
|
uuid: string;
|
|
13
|
+
model: Rectangle;
|
|
14
14
|
__cellSize: Rectangle;
|
|
15
15
|
__spacing: Rectangle;
|
|
16
16
|
el: Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../../src/view/elements/tiles2d/Tile.js"],"names":[],"mappings":";AAKA;
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../../src/view/elements/tiles2d/Tile.js"],"names":[],"mappings":";AAKA;IA6DI,kFAEC;IAED,0EAMC;IApED;;;;;OAKG;IACH,iDAkBC;IA1BD,aAAqB;IAWjB,iBAAkB;IAElB,sBAAsB;IACtB,qBAAwB;IAExB,YAA6D;IAYjE,uBAGC;IAED,mBAGC;IAED,yBAMC;IAED,qBAOC;IAED,eAGC;CAaJ;iBA1EgB,eAAe"}
|
|
@@ -4,6 +4,8 @@ import dom from "../../DOM.js";
|
|
|
4
4
|
import View from "../../View.js";
|
|
5
5
|
|
|
6
6
|
class TileView extends View {
|
|
7
|
+
uuid = UUID.string();
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
*
|
|
9
11
|
* @param {Rectangle} model
|
|
@@ -14,7 +16,6 @@ class TileView extends View {
|
|
|
14
16
|
super();
|
|
15
17
|
|
|
16
18
|
this.model = model;
|
|
17
|
-
this.uuid = UUID.v1().toString();
|
|
18
19
|
|
|
19
20
|
this.__cellSize = size;
|
|
20
21
|
this.__spacing = spacing;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wrapTaskIgnoreFailure.d.ts","sourceRoot":"","sources":["../../../../../../src/core/process/task/util/wrapTaskIgnoreFailure.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,4CAHW,IAAI,GACF,IAAI,CAwChB;iBA9CgB,YAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GUIDSerializationAdapter.spec.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/guid/GUIDSerializationAdapter.spec.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sampler2D2Canvas.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D2Canvas.js"],"names":[],"mappings":";AAGA;;;;;;;GAOG;AACH,kDANW,SAAS,4CAGT,iBAAiB,GACf,iBAAiB,CA2E7B;0BApFyB,gBAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertSampler2D2DataURL.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/convertSampler2D2DataURL.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,8DAFa,MAAM,CAclB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import convertSampler2D2Canvas from "./Sampler2D2Canvas.js";
|
|
2
|
-
import {
|
|
3
|
-
sampler2d_compute_texel_value_conversion_scale_to_uint8
|
|
4
|
-
} from "./sampler2d_compute_texel_value_conversion_scale_to_uint8.js";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {Sampler2D} sampler
|
|
9
|
-
* @returns {string}
|
|
10
|
-
*/
|
|
11
|
-
export function convertSampler2D2DataURL(sampler) {
|
|
12
|
-
|
|
13
|
-
const canvasElement = document.createElement('canvas');
|
|
14
|
-
|
|
15
|
-
const ctx = canvasElement.getContext("2d");
|
|
16
|
-
|
|
17
|
-
const { scale, offset } = sampler2d_compute_texel_value_conversion_scale_to_uint8(sampler);
|
|
18
|
-
|
|
19
|
-
convertSampler2D2Canvas(sampler, scale, offset, canvasElement);
|
|
20
|
-
|
|
21
|
-
return ctx.canvas.toDataURL('image/png');
|
|
22
|
-
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertSampler2D2DataURL.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/convertSampler2D2DataURL.spec.js"],"names":[],"mappings":""}
|
/package/src/engine/ecs/guid/{GUIDSerializationAdapter.spec.js → UUIDSerializationAdapter.spec.js}
RENAMED
|
File without changes
|