@naniteninja/trait-visual 1.0.3 → 1.0.4

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.
@@ -0,0 +1,61 @@
1
+ import * as THREE from 'three';
2
+ export type DustMode = 'disk' | 'sphere';
3
+ export interface IDustPaletteStop {
4
+ /**
5
+ * Normalized radial position within the dust field (0 = core, 1 = outer edge).
6
+ */
7
+ at: number;
8
+ /**
9
+ * Color at this stop. Accepts any THREE color representation.
10
+ */
11
+ color: THREE.ColorRepresentation;
12
+ /**
13
+ * Optional intensity multiplier applied when lerping between stops.
14
+ * Defaults to 1.0.
15
+ */
16
+ intensity?: number;
17
+ }
18
+ export interface IDustPaletteOptions {
19
+ /**
20
+ * Ordered palette stops that describe the desired color ramp.
21
+ * Values outside [0, 1] will be clamped.
22
+ */
23
+ stops: IDustPaletteStop[];
24
+ /**
25
+ * Strength multiplier for hue bias modulation in the shader.
26
+ * Defaults to 0.65.
27
+ */
28
+ hueBiasScale?: number;
29
+ /**
30
+ * Minimum luminance floor to keep blacks saturated but not crushed.
31
+ * Defaults to 0.06.
32
+ */
33
+ backgroundLift?: number;
34
+ /**
35
+ * Maximum brightness applied to the core (radialT ~ 0).
36
+ * Defaults to 1.4.
37
+ */
38
+ coreIntensity?: number;
39
+ }
40
+ export interface IDustOptions {
41
+ innerRadius?: number;
42
+ outerRadius?: number;
43
+ thickness?: number;
44
+ countMidFar?: number;
45
+ countBokeh?: number;
46
+ minAngularVel?: number;
47
+ maxAngularVel?: number;
48
+ noiseStrength?: number;
49
+ colorInner?: THREE.ColorRepresentation;
50
+ colorMid?: THREE.ColorRepresentation;
51
+ colorOuter?: THREE.ColorRepresentation;
52
+ palette?: IDustPaletteOptions;
53
+ renderOrder?: number;
54
+ }
55
+ export type Cohort = 'disk' | 'diskBokeh' | 'halo' | 'haloBokeh';
56
+ /** @deprecated Use IDustOptions */
57
+ export type DustOptions = IDustOptions;
58
+ /** @deprecated Use IDustPaletteOptions */
59
+ export type DustPaletteOptions = IDustPaletteOptions;
60
+ /** @deprecated Use IDustPaletteStop */
61
+ export type DustPaletteStop = IDustPaletteStop;
@@ -0,0 +1,18 @@
1
+ import * as THREE from 'three';
2
+ export type GlowUniforms = {
3
+ glowColor: {
4
+ value: THREE.Color;
5
+ };
6
+ opacity: {
7
+ value: number;
8
+ };
9
+ c?: {
10
+ value: number;
11
+ };
12
+ p?: {
13
+ value: number;
14
+ };
15
+ base?: {
16
+ value: number;
17
+ };
18
+ };
@@ -0,0 +1,53 @@
1
+ import * as THREE from 'three';
2
+ export interface IParticleFieldOptions {
3
+ coreRadius: number;
4
+ particleCount?: number;
5
+ palette?: 'supermassiveBlackhole' | 'blackhole';
6
+ distribution?: 'surface' | 'banded';
7
+ speedScale?: number;
8
+ particleSizeMax?: number;
9
+ particleSizeScale?: number;
10
+ surfaceRadiusMin?: number;
11
+ surfaceRadiusMax?: number;
12
+ rimMinShellFactor?: number;
13
+ }
14
+ export interface IFlowParticle {
15
+ type: 'topCurve' | 'bottomCurve' | 'orbit' | 'topCap' | 'bottomCap' | 'surface';
16
+ radius: number;
17
+ angle: number;
18
+ angularSpeed: number;
19
+ radialJitterAmp: number;
20
+ radialJitterFreq: number;
21
+ verticalOffset?: number;
22
+ size: number;
23
+ color: THREE.Color;
24
+ opacity: number;
25
+ lifetime: number;
26
+ age: number;
27
+ ellipse: number;
28
+ upBias: number;
29
+ depthBias: number;
30
+ wigglePhase: number;
31
+ wiggleFreqUp: number;
32
+ wiggleFreqDepth: number;
33
+ capRadBias?: number;
34
+ arcUpAmp: number;
35
+ arcDepthAmp: number;
36
+ arcRadAmp: number;
37
+ arcFreq: number;
38
+ angleWanderAmp: number;
39
+ angleWanderFreq: number;
40
+ angleWanderPhase: number;
41
+ tiltUF?: number;
42
+ phi?: number;
43
+ thetaMargin?: number;
44
+ frontCurveAngle?: number;
45
+ phiAmp?: number;
46
+ axis?: THREE.Vector3;
47
+ u?: THREE.Vector3;
48
+ v?: THREE.Vector3;
49
+ dirSign?: 1 | -1;
50
+ precessAxis?: THREE.Vector3;
51
+ precessSpeed?: number;
52
+ baseOmega?: number;
53
+ }
@@ -0,0 +1,6 @@
1
+ export declare function getPhysicsCallsThisFrame(): number;
2
+ export declare function setPhysicsCallsThisFrame(value: number): void;
3
+ export declare function incrementPhysicsCalls(): number;
4
+ export declare function getDebugFrameCount(): number;
5
+ export declare function incrementDebugFrameCount(): number;
6
+ export declare function resetPhysicsCalls(): void;
@@ -0,0 +1,4 @@
1
+ import * as THREE from 'three';
2
+ import { Blackhole } from '../objects/Blackhole';
3
+ import { ElementRef, Renderer2 } from '@angular/core';
4
+ export declare function handleRightClick(event: MouseEvent, mouse: THREE.Vector2, camera: THREE.Camera, raycaster: THREE.Raycaster, cluster: THREE.Object3D, contextMenuRef: ElementRef, renderer2: Renderer2, setSelectedNode: (blackhole: Blackhole) => void, canvas?: HTMLCanvasElement | null, containerEl?: HTMLElement | null): void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Safe access to window.location.search (e.g. for ?debug=1).
3
+ * Use instead of (window as any)?.location?.search to satisfy strict typing.
4
+ */
5
+ export declare function getWindowLocationSearch(): string;
6
+ /** True when URL has debug=1 (enables optional ingest logging). */
7
+ export declare function isDebugIngestEnabled(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naniteninja/trait-visual",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Angular library for visualizing trait-based relationships in 3D space using Three.js",
5
5
  "keywords": [
6
6
  "angular",
@@ -0,0 +1,12 @@
1
+ export * from './lib/trait-visual.component';
2
+ export * from './lib/config-sidenav/config-sidenav.component';
3
+ export * from './lib/app.types';
4
+ export { Cluster } from './lib/objects/Cluster';
5
+ export { Blackhole } from './lib/objects/Blackhole';
6
+ export { StellarDustField } from './lib/services/stellar-dust-field';
7
+ export type { DustMode } from './lib/services/stellar-dust-field';
8
+ export { addNode, removeNode } from './lib/services/node-actions';
9
+ export { BlackHoleParticleField } from './lib/services/black-hole-particle-field';
10
+ export { handleRightClick } from './lib/utils/on-right-click.util';
11
+ export { getWindowLocationSearch } from './lib/utils/window.util';
12
+ export { dynamicCounts, updateCounts, attributeWeights, nodeData } from './lib/data/nodes.data';
Binary file