@woosh/meep-engine 2.72.0 → 2.74.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.
- package/build/bundle-worker-image-decoder.js +1 -1
- package/build/meep.cjs +38 -189
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +38 -189
- package/package.json +3 -2
- package/src/engine/asset/loaders/image/codec/NativeImageDecoder.js +2 -1
- package/src/engine/asset/loaders/image/codec/ThreadedImageDecoder.js +4 -5
- package/src/engine/asset/loaders/image/png/PNGReader.js +23 -19
- package/src/engine/graphics/ecs/camera/FrustumProjector.js +31 -182
- package/src/engine/graphics/generate_halton_jitter.js +21 -0
- package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.js +3 -20
- package/src/engine/graphics/texture/virtual/v2/NOTES.md +11 -1
- package/src/engine/graphics/texture/virtual/v2/ShaderUsage.js +7 -5
- package/src/engine/graphics/texture/virtual/v2/SparseTexture.js +291 -0
- package/src/engine/graphics/texture/virtual/v2/TileLoader.js +232 -0
- package/src/engine/graphics/texture/virtual/v2/UsageMetadata.js +118 -134
- package/src/engine/graphics/texture/virtual/v2/VirtualTextureManager.js +73 -9
- package/src/engine/graphics/texture/virtual/v2/debug/ResidencyDebugView.js +58 -0
- package/src/engine/graphics/texture/virtual/v2/debug/UsageDebugView.js +63 -0
- package/src/engine/graphics/texture/virtual/v2/{UsagePyramidDebugView.js → debug/UsagePyramidDebugView.js} +27 -23
- package/src/engine/graphics/texture/virtual/v2/prototype.js +62 -19
- package/src/engine/graphics/texture/virtual/v2/tile/TextureTile.js +31 -0
- package/src/engine/graphics/texture/virtual/v2/tile/compose_finger_print.js +23 -0
- package/src/engine/graphics/texture/virtual/v2/tile/compose_tile_address.js +22 -0
- package/src/engine/graphics/texture/virtual/v2/tile/decompose_finger_print.js +12 -0
- package/src/engine/graphics/texture/virtual/v2/tile/finger_print_to_tile_address.js +16 -0
- package/src/engine/graphics/texture/virtual/v2/tile/tile_address_to_finger_print.js +35 -0
- package/src/view/CSS_ABSOLUTE_POSITIONING.js +5 -0
- package/src/engine/graphics/clouds/MaterialTransformer.js +0 -0
- package/src/engine/graphics/clouds/TerrainCloudsPlugin.js +0 -0
- package/src/engine/graphics/clouds/cs_build_fragment_shader.js +0 -0
- package/src/engine/graphics/clouds/cs_build_vertex_shader.js +0 -0
- package/src/engine/graphics/ecs/camera/TiltCameraController.js +0 -69
- package/src/engine/graphics/ecs/camera/is_valid_distance_value.js +0 -11
- package/src/engine/graphics/texture/virtual/v2/UsageDebugView.js +0 -51
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by Alex on 30/06/2015.
|
|
3
|
-
*/
|
|
4
|
-
import { Object3D, Vector3 as ThreeVector3 } from 'three';
|
|
5
|
-
|
|
6
|
-
import Vector3 from "../../../../core/geom/Vector3.js";
|
|
7
|
-
import Vector2 from '../../../../core/geom/Vector2.js';
|
|
8
|
-
import { DEG_TO_RAD } from "../../../../core/math/DEG_TO_RAD.js";
|
|
9
|
-
|
|
10
|
-
const CC = function () {
|
|
11
|
-
this.target = new Vector3();
|
|
12
|
-
this.rotationAxis = new Vector3(0, 1, 0);
|
|
13
|
-
this.rotationAngle = DEG_TO_RAD * 0;
|
|
14
|
-
//angle between rotation axis and vector from target to position
|
|
15
|
-
this.tiltAngle = DEG_TO_RAD * 10;
|
|
16
|
-
|
|
17
|
-
this.distance = 100;
|
|
18
|
-
this.position = new Vector3();
|
|
19
|
-
this.rotation = new Vector3();
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
CC.prototype.rotate = function (deltaAngle) {
|
|
23
|
-
this.tiltAngle += deltaAngle;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
CC.prototype.pan = function (deltaX, deltaY, cameraRotation) {
|
|
27
|
-
//vector pointing in the direction of travel
|
|
28
|
-
const vector = new ThreeVector3(deltaX, 0, deltaY);
|
|
29
|
-
//var rotationMatrix = new THREE.Matrix4().makeRotationFromQuaternion(cameraRotation);
|
|
30
|
-
//vector.applyMatrix4(rotationMatrix);
|
|
31
|
-
////add to delta vector
|
|
32
|
-
//vector.y = 0;
|
|
33
|
-
this.target.add(vector);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const object = new Object3D();
|
|
37
|
-
|
|
38
|
-
function eulerJSON(o) {
|
|
39
|
-
return { x: o.x, y: o.y, z: o.z };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
CC.prototype.updatePositionAndRotation = function (transform) {
|
|
43
|
-
const distance = this.distance;
|
|
44
|
-
const target = this.target;
|
|
45
|
-
const rotationAngle = this.rotationAngle;
|
|
46
|
-
let rotationAxis = this.rotationAxis;
|
|
47
|
-
const tiltAngle = this.tiltAngle;
|
|
48
|
-
|
|
49
|
-
//position
|
|
50
|
-
const dTilt = new Vector2();
|
|
51
|
-
dTilt.x = Math.sin(tiltAngle) * distance;
|
|
52
|
-
dTilt.y = Math.cos(tiltAngle) * distance;
|
|
53
|
-
|
|
54
|
-
const position = new Vector3();
|
|
55
|
-
position.x = Math.sin(rotationAngle) * dTilt.x;
|
|
56
|
-
position.z = Math.cos(rotationAngle) * dTilt.x;
|
|
57
|
-
position.y = dTilt.y;
|
|
58
|
-
|
|
59
|
-
position.add(target);
|
|
60
|
-
//finally look at the target
|
|
61
|
-
object.position.copy(position);
|
|
62
|
-
object.lookAt(target);
|
|
63
|
-
//console.log(position.toJSON(), target.toJSON());
|
|
64
|
-
|
|
65
|
-
//
|
|
66
|
-
//transform.position.copy(position);
|
|
67
|
-
//transform.rotation.setFromEuler(object.rotation);
|
|
68
|
-
};
|
|
69
|
-
export default CC;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import LabelView from "../../../../../view/common/LabelView.js";
|
|
2
|
-
import EmptyView from "../../../../../view/elements/EmptyView.js";
|
|
3
|
-
|
|
4
|
-
export class UsageDebugView extends EmptyView {
|
|
5
|
-
#tileCount = new LabelView("")
|
|
6
|
-
#tiles = new EmptyView();
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructor(opt) {
|
|
10
|
-
super(opt);
|
|
11
|
-
|
|
12
|
-
this.addChild(this.#tileCount);
|
|
13
|
-
this.addChild(this.#tiles);
|
|
14
|
-
|
|
15
|
-
this.css({
|
|
16
|
-
position: "absolute",
|
|
17
|
-
left: "0",
|
|
18
|
-
top: "0",
|
|
19
|
-
background: "rgba(255,255,255,0.5)",
|
|
20
|
-
fontFamily: "monospace",
|
|
21
|
-
fontSize: "10px"
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param {UsageMetadata} usage
|
|
28
|
-
*/
|
|
29
|
-
set usage(usage) {
|
|
30
|
-
|
|
31
|
-
const tileCount = usage.tile_count;
|
|
32
|
-
|
|
33
|
-
this.#tileCount.updateText(`Tile Count: ${tileCount}`);
|
|
34
|
-
|
|
35
|
-
this.#tiles.removeAllChildren();
|
|
36
|
-
|
|
37
|
-
for (let i = 0; i < tileCount; i++) {
|
|
38
|
-
const finger_print = usage.getTile(i);
|
|
39
|
-
const count = usage.getCount(i);
|
|
40
|
-
|
|
41
|
-
const level = (finger_print >> 24) & 0xFF;
|
|
42
|
-
const x = (finger_print >> 16) & 0xFF;
|
|
43
|
-
const y = (finger_print >> 8) & 0xFF;
|
|
44
|
-
const texture_id = (finger_print) & 0xFF;
|
|
45
|
-
|
|
46
|
-
this.#tiles.addChild(new LabelView(`ID: ${texture_id} Level: ${level} X: ${x} Y: ${y} USAGE: ${count}`));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|