@equinor/videx-3d 2.0.0 → 3.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.
- package/dist/chunk-DKAquGKk.js +2820 -0
- package/dist/chunk-DsUZyEG_.js +16 -0
- package/dist/generators.js +512 -727
- package/dist/main.js +7182 -10552
- package/dist/sdk.js +2 -787
- package/dist/src/sdk/materials/shaderLib/procedural-normal.glsl +274 -0
- package/dist/types/components/Ocean/Ocean.d.ts +333 -0
- package/dist/types/components/Ocean/index.d.ts +6 -0
- package/dist/types/components/Ocean/ocean-bed-material.d.ts +60 -0
- package/dist/types/components/Ocean/ocean-contact.d.ts +39 -0
- package/dist/types/components/Ocean/ocean-material.d.ts +145 -0
- package/dist/types/components/Ocean/ocean-sampler.d.ts +93 -0
- package/dist/types/components/Ocean/ocean-volume-material.d.ts +54 -0
- package/dist/types/components/Tanker/Tanker.d.ts +47 -0
- package/dist/types/components/Tanker/TankerSuperstructure.d.ts +23 -0
- package/dist/types/components/Tanker/tanker-geometry-builder.d.ts +21 -0
- package/dist/types/components/Wellbores/Casings/CasingMaterial.d.ts +229 -1
- package/dist/types/components/Wellbores/Casings/CasingSection.d.ts +6 -1
- package/dist/types/components/Wellbores/Casings/Casings.d.ts +45 -4
- package/dist/types/components/Wellbores/Casings/casings-defs.d.ts +44 -0
- package/dist/types/components/Wellbores/Casings/index.d.ts +2 -1
- package/dist/types/main.d.ts +1 -0
- package/dist/types/rendering/Pass.d.ts +10 -1
- package/dist/types/rendering/RenderingPipeline.d.ts +10 -1
- package/dist/types/rendering/debug/DebugBoxOutputPass.d.ts +22 -0
- package/dist/types/rendering/debug/DebugPatternPass.d.ts +30 -0
- package/dist/types/rendering/fxaa-resolver.d.ts +25 -0
- package/dist/types/rendering/index.d.ts +1 -0
- package/dist/types/rendering/passes/AnnotationsPass.d.ts +1 -0
- package/dist/types/rendering/passes/FXAAPass.d.ts +11 -6
- package/dist/types/rendering/passes/OITRenderPass.d.ts +147 -0
- package/dist/types/rendering/passes/OutputPass.d.ts +9 -0
- package/dist/types/rendering/passes/RenderPass.d.ts +2 -0
- package/dist/types/rendering/passes/index.d.ts +0 -2
- package/dist/types/rendering/smaa-resolver.d.ts +58 -0
- package/dist/types/rendering/taa-resolver.d.ts +161 -0
- package/dist/types/rendering/temporal-resolver.d.ts +152 -0
- package/dist/types/sdk/geometries/boundary-loops.d.ts +38 -0
- package/dist/types/sdk/geometries/geometry-attributes.d.ts +37 -0
- package/dist/types/sdk/geometries/grid-sampling.d.ts +50 -0
- package/dist/types/sdk/geometries/ocean-geometry.d.ts +288 -0
- package/dist/types/sdk/geometries/packing.d.ts +1 -1
- package/dist/types/sdk/geometries/tessellation.d.ts +25 -0
- package/dist/types/sdk/index.d.ts +5 -0
- package/dist/types/sdk/utils/vector-operations.d.ts +7 -0
- package/package.json +11 -18
- package/dist/chunk-61X6qE5N.js +0 -981
- package/dist/chunk-ChG5d4HC.js +0 -675
- package/dist/chunk-DuRASjkF.js +0 -17
- package/dist/chunk-M-Pcc_Yg.js +0 -689
- package/dist/types/rendering/passes/SMAAPass.d.ts +0 -40
- package/dist/types/rendering/passes/TAAPass.d.ts +0 -94
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/color-conversion.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/colors.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/glyphs.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/oit.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/random.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/remap.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/render-number.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/render-text.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/rotation.glsl +0 -0
- /package/dist/{shaderLib → src/sdk/materials/shaderLib}/sdf-functions.glsl +0 -0
- /package/dist/textures/{normal_map.jpg → public/normal_map.jpg} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Vector2, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { Pass } from '../Pass';
|
|
3
|
-
/**
|
|
4
|
-
* Subpixel Morphological Anti-Aliasing (SMAA) post-process pass for use with the
|
|
5
|
-
* {@link RenderingPipeline}. A drop-in alternative to {@link FxaaPass}: it detects
|
|
6
|
-
* edges by colour discontinuity and reconstructs anti-aliased silhouettes using
|
|
7
|
-
* precomputed area/search lookup tables, giving noticeably cleaner long edges on
|
|
8
|
-
* opaque geometry than FXAA, with less detail blurring.
|
|
9
|
-
*
|
|
10
|
-
* SMAA operates in linear space and must run before the {@link OutputPass} (i.e.
|
|
11
|
-
* before tone-mapping / output-encoding), exactly like {@link FxaaPass}.
|
|
12
|
-
*
|
|
13
|
-
* Like all morphological techniques it cannot recover sub-pixel features (e.g.
|
|
14
|
-
* 1px WebGL lines that fall between samples) — use {@link TAAPass} for those.
|
|
15
|
-
*
|
|
16
|
-
* This wraps the well-tested SMAA shaders and lookup textures from `three-stdlib`
|
|
17
|
-
* and drives the three sub-passes (edge detection, blend-weight calculation,
|
|
18
|
-
* neighbourhood blending) through the pipeline's {@link FullscreenRenderer},
|
|
19
|
-
* compositing the result back into the shared buffer in place.
|
|
20
|
-
*
|
|
21
|
-
* @group Rendering
|
|
22
|
-
* @see {@link RenderingPipeline}
|
|
23
|
-
* @see {@link FxaaPass}
|
|
24
|
-
* @see {@link TAAPass}
|
|
25
|
-
*/
|
|
26
|
-
export declare class SMAAPass extends Pass {
|
|
27
|
-
private inner;
|
|
28
|
-
private scratch;
|
|
29
|
-
private blitMaterial;
|
|
30
|
-
private fullscreenRenderer;
|
|
31
|
-
private materialEdges;
|
|
32
|
-
private materialWeights;
|
|
33
|
-
private materialBlend;
|
|
34
|
-
constructor();
|
|
35
|
-
setSize(width: number, height: number): void;
|
|
36
|
-
dispose(): void;
|
|
37
|
-
render(renderer: WebGLRenderer, buffer: WebGLRenderTarget): void;
|
|
38
|
-
/** Resolution uniform helper kept for parity with other passes. */
|
|
39
|
-
get resolution(): Vector2;
|
|
40
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Camera, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { Pass } from '../Pass';
|
|
3
|
-
/**
|
|
4
|
-
* Temporal Anti-Aliasing pass (jittered accumulation) for use with the
|
|
5
|
-
* {@link RenderingPipeline}.
|
|
6
|
-
*
|
|
7
|
-
* Each frame the camera's projection is offset by a sub-pixel jitter from a
|
|
8
|
-
* Halton(2,3) sequence and the freshly rendered buffer is accumulated into a
|
|
9
|
-
* history target as a running average. Because the 1px-line problem with
|
|
10
|
-
* supersampling is that the line stays one device-pixel wide as the buffer
|
|
11
|
-
* grows, jittered accumulation is the technique that *does* anti-alias thin
|
|
12
|
-
* features: the same 1px line lands on slightly different sub-pixel positions
|
|
13
|
-
* each frame, so the average is coverage-weighted without thinning.
|
|
14
|
-
*
|
|
15
|
-
* The accumulation resets whenever the (un-jittered) camera view changes, so an
|
|
16
|
-
* orbit-and-inspect workflow converges to near-supersampled quality within a
|
|
17
|
-
* handful of static frames. Once the full jitter sequence has accumulated the
|
|
18
|
-
* pass freezes (no further jitter or blending) and presents the converged image
|
|
19
|
-
* until the next camera move, so a still camera settles to a stable result.
|
|
20
|
-
* Place it where you would place {@link FxaaPass} — before the {@link OutputPass}.
|
|
21
|
-
*
|
|
22
|
-
* Limitations (no history reprojection / neighbourhood clamping): animated
|
|
23
|
-
* content that moves while the camera is static (e.g. additive jet streams) does
|
|
24
|
-
* not update once the image has converged and frozen, and ghosts before then.
|
|
25
|
-
* Camera motion itself never ghosts because it triggers a reset.
|
|
26
|
-
*
|
|
27
|
-
* @todo Improve TAA. Current trade-offs to address: (1) AA is only present once
|
|
28
|
-
* the camera settles — during motion the image is un-anti-aliased and it takes
|
|
29
|
-
* roughly a second of stillness to converge; (2) because the pass freezes on
|
|
30
|
-
* convergence, content that changes while the camera is static (a highlight
|
|
31
|
-
* toggled on, async geometry finishing loading) does not appear until the next
|
|
32
|
-
* camera move. A proper fix needs motion vectors + history reprojection +
|
|
33
|
-
* neighbourhood colour clamping so the history can be reused under motion and
|
|
34
|
-
* invalidated per-pixel on content change, rather than the all-or-nothing
|
|
35
|
-
* reset-on-camera-move + freeze-on-convergence heuristic used here. Likely
|
|
36
|
-
* revisited as part of the WebGPU/TSL renderer migration.
|
|
37
|
-
*
|
|
38
|
-
* @group Rendering
|
|
39
|
-
* @see {@link RenderingPipeline}
|
|
40
|
-
* @see {@link FxaaPass}
|
|
41
|
-
* @see {@link SMAAPass}
|
|
42
|
-
*/
|
|
43
|
-
export declare class TAAPass extends Pass {
|
|
44
|
-
private camera;
|
|
45
|
-
/**
|
|
46
|
-
* Number of unique jitter samples to cycle through before the average is
|
|
47
|
-
* considered fully converged. Higher = smoother but slower to settle.
|
|
48
|
-
*/
|
|
49
|
-
sampleCount: number;
|
|
50
|
-
private historyRead;
|
|
51
|
-
private historyWrite;
|
|
52
|
-
private resolveMaterial;
|
|
53
|
-
private blitMaterial;
|
|
54
|
-
private fullscreenRenderer;
|
|
55
|
-
private width;
|
|
56
|
-
private height;
|
|
57
|
-
/** Index into the jitter sequence for the current frame. */
|
|
58
|
-
private sampleIndex;
|
|
59
|
-
/** How many frames have been accumulated since the last reset. */
|
|
60
|
-
private accumulated;
|
|
61
|
-
/** Jitter (in clip-space units) currently baked into the camera projection. */
|
|
62
|
-
private appliedJitterX;
|
|
63
|
-
private appliedJitterY;
|
|
64
|
-
/** Snapshot of the previous frame's camera state used to detect motion. The
|
|
65
|
-
* view matrix and the projection are stored separately so the two projection
|
|
66
|
-
* elements we jitter can be excluded from the comparison (see `detectMotion`). */
|
|
67
|
-
private prevView;
|
|
68
|
-
private prevProjection;
|
|
69
|
-
private hasPrev;
|
|
70
|
-
constructor(camera: Camera, sampleCount?: number);
|
|
71
|
-
setSize(width: number, height: number): void;
|
|
72
|
-
dispose(): void;
|
|
73
|
-
/** Force the accumulation to restart on the next frame. */
|
|
74
|
-
reset(): void;
|
|
75
|
-
/** Indices into the projection matrix offset elements for the active camera. */
|
|
76
|
-
private jitterElements;
|
|
77
|
-
private clearJitter;
|
|
78
|
-
private applyJitter;
|
|
79
|
-
/**
|
|
80
|
-
* Compare the current camera against the previous frame and reset the
|
|
81
|
-
* accumulation on any real view change (orbit, pan, zoom, fov).
|
|
82
|
-
*
|
|
83
|
-
* Motion is measured from the camera's view matrix (`matrixWorldInverse`,
|
|
84
|
-
* which we never touch) and its projection matrix *excluding* the two elements
|
|
85
|
-
* we jitter (`ex`/`ey`). This is critical: deriving motion from a quantity that
|
|
86
|
-
* includes our own sub-pixel jitter — or trying to subtract the jitter back out
|
|
87
|
-
* of the projection — couples the test to the jitter and makes every frame look
|
|
88
|
-
* like motion (the jitter delta dwarfs the tolerance), so the accumulation
|
|
89
|
-
* resets forever and the image never settles. By ignoring the jittered slots
|
|
90
|
-
* outright, only genuine camera changes trigger a reset.
|
|
91
|
-
*/
|
|
92
|
-
private detectMotion;
|
|
93
|
-
render(renderer: WebGLRenderer, buffer: WebGLRenderTarget): void;
|
|
94
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|