trillion-widget
Advanced tools
Comparing version 0.39.8-beta.3 to 0.39.8-beta.4
@@ -1,2 +0,2 @@ | ||
import{C as t,F as o,T as a}from"./lib-react-exports.6cff2ef0.js";import"react";import"zustand";import"immer";import"three";import"kalman-filter";import"@tensorflow/tfjs";import"framer-motion";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="38653f46-36a9-4f10-aeee-5912a3e61f7b",e._sentryDebugIdIdentifier="sentry-dbid-38653f46-36a9-4f10-aeee-5912a3e61f7b")}catch{}})();export{t as CAROUSEL_MOCK_LIST,o as FAVORITES_MOCK_LIST,a as TrillionWidget}; | ||
import{C as e,F as o,T as i}from"./lib-react-exports.47495b91.js";import"react";import"zustand";import"immer";import"three";import"kalman-filter";import"@tensorflow/tfjs";import"framer-motion";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="dc9de9a1-7940-4f1b-85ee-9799a9b77999",r._sentryDebugIdIdentifier="sentry-dbid-dc9de9a1-7940-4f1b-85ee-9799a9b77999")}catch{}})();export{e as CAROUSEL_MOCK_LIST,o as FAVORITES_MOCK_LIST,i as TrillionWidget}; | ||
//# sourceMappingURL=trillion-widget-react.js.map |
@@ -1,2 +0,2 @@ | ||
import{C as d,F as t,T as r}from"./lib-exports.017dffe0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="e9d6cd8d-edb5-4273-8f5e-0e60b350c221",e._sentryDebugIdIdentifier="sentry-dbid-e9d6cd8d-edb5-4273-8f5e-0e60b350c221")}catch{}})();export{d as CAROUSEL_MOCK_LIST,t as FAVORITES_MOCK_LIST,r as TrillionWidgetApp}; | ||
import{C as s,F as r,T as t}from"./lib-exports.8ccd8e11.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="aa6d388d-c892-40d4-a716-a87ad7e79622",a._sentryDebugIdIdentifier="sentry-dbid-aa6d388d-c892-40d4-a716-a87ad7e79622")}catch{}})();export{s as CAROUSEL_MOCK_LIST,r as FAVORITES_MOCK_LIST,t as TrillionWidgetApp}; | ||
//# sourceMappingURL=trillion-widget.js.map |
@@ -19,2 +19,16 @@ import { JewelryTypeName } from '../typings/jewelry-type'; | ||
readonly reflectionMap?: ReflectionMapDto; | ||
readonly envMapRotation?: { | ||
x: number; | ||
y: number; | ||
z: number; | ||
}; | ||
readonly backgroundColor?: number; | ||
readonly applyEnvMapOnBackground?: boolean; | ||
readonly environmentIntensity?: number; | ||
readonly backgroundBlurriness?: number; | ||
readonly backgroundRotation?: { | ||
x: number; | ||
y: number; | ||
z: number; | ||
}; | ||
readonly materialColors?: Array<MaterialColorDto>; | ||
@@ -21,0 +35,0 @@ readonly diamondCuts?: Array<DiamondCutDto>; |
export declare class MaterialParams { | ||
color?: string; | ||
color?: number; | ||
roughness?: number; | ||
@@ -12,3 +12,3 @@ metalness?: number; | ||
attenuationDistance?: number; | ||
attenuationColor?: string; | ||
attenuationColor?: number; | ||
iridescence?: number; | ||
@@ -18,5 +18,5 @@ iridescenceIOR?: number; | ||
sheenRoughness?: number; | ||
sheenColor?: string; | ||
sheenColor?: number; | ||
specularIntensity?: number; | ||
specularColor?: string; | ||
specularColor?: number; | ||
scale?: number; | ||
@@ -26,3 +26,10 @@ visible?: boolean; | ||
correctMips?: boolean; | ||
envMapName?: string; | ||
envMapIntensity?: number; | ||
envMapRotation?: { | ||
x: number; | ||
y: number; | ||
z: number; | ||
}; | ||
[key: string]: any; | ||
} |
import * as THREE from 'three'; | ||
import MeshGemMaterial from "../materials/MeshGemMaterial/MeshGemMaterial"; | ||
import { IEnvironmentHelper } from '../materials/environment'; | ||
import { ViewerConfig } from '../objects/viewer-config.object'; | ||
import { EnvironmentHelper } from "../materials/environment"; | ||
export interface IGem { | ||
@@ -14,2 +14,2 @@ name: string; | ||
} | ||
export declare function getMaterialForGem(renderer: THREE.WebGLRenderer, gem: IGem, jewelryMesh: THREE.Mesh, viewerConfig: ViewerConfig, environmentHelper: IEnvironmentHelper, useSimpleShader?: boolean): Promise<MeshGemMaterial | THREE.ShaderMaterial>; | ||
export declare function getMaterialForGem(renderer: THREE.WebGLRenderer, gem: IGem, jewelryMesh: THREE.Mesh, viewerConfig: ViewerConfig, environmentHelper: EnvironmentHelper, useSimpleShader?: boolean): Promise<MeshGemMaterial | THREE.ShaderMaterial>; |
@@ -1,14 +0,29 @@ | ||
import { Texture, WebGLRenderer } from 'three'; | ||
import { LoadingManager, PMREMGenerator, Texture } from 'three'; | ||
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader'; | ||
import { EXRLoader } from 'three/examples/jsm/Addons.js'; | ||
import * as THREE from "three"; | ||
import { ReflectionMapDto } from '../dto/reflection-map.dto'; | ||
export interface IEnvironment { | ||
map: Texture | THREE.DataTexture; | ||
map: Texture | null; | ||
intensity: number; | ||
} | ||
export interface IEnvironmentHelper { | ||
getEnvironmentForMaterial: (materialName: string, progressCallback?: (progress: number) => void) => Promise<IEnvironment | undefined>; | ||
preloadDefaultEnvironment: (progressCallback?: (progress: number) => void) => Promise<IEnvironment>; | ||
loadEnvironmentFromPath: (path: string) => Promise<IEnvironment>; | ||
loadEXREnvironmentFromPath: (path: string) => Promise<IEnvironment>; | ||
getFromCacheOrLoad: (path: string, progressCallback?: (progress: number) => void) => Promise<IEnvironment>; | ||
export declare class EnvironmentHelper { | ||
disposed: boolean; | ||
pmremGenerator: PMREMGenerator; | ||
loadingManager: LoadingManager; | ||
exrLoader: EXRLoader; | ||
rgbeLoader: RGBELoader; | ||
cachedEnvironmentMap: { | ||
[key: string]: IEnvironment; | ||
}; | ||
constructor(renderer: THREE.WebGLRenderer); | ||
dispose(): void; | ||
loadEnvironmentFromPath(path: string, progressCallback?: (progress: number) => void): Promise<IEnvironment>; | ||
loadEXREnvironmentFromPath(path: string, progressCallback?: (e: ProgressEvent) => void): Promise<IEnvironment>; | ||
getFromCacheOrLoad(path: string, progressCallback?: (progress: number) => void): Promise<IEnvironment>; | ||
preloadDefaultEnvironment(progressCallback?: (progress: number) => void): Promise<IEnvironment>; | ||
getEnvironmentForMaterial(materialName: string, progressCallback?: (progress: number) => void): Promise<IEnvironment | undefined>; | ||
} | ||
export declare function getEnvironmentHelper(renderer: WebGLRenderer): IEnvironmentHelper; | ||
export declare function disposeEnvMapsCache(): void; | ||
export declare function getFromCacheOrLoadEnvMapList(): Promise<ReflectionMapDto[] | (ReflectionMapDto & any[])>; | ||
export declare function resolveEnvMapPath(envMapName: string): Promise<string>; |
import { Object3D } from 'three'; | ||
import { IEnvironmentHelper } from "./environment"; | ||
export declare function updateAllMaterials(object: Object3D, environmentHelper: IEnvironmentHelper): void; | ||
import { EnvironmentHelper } from "./environment"; | ||
export declare function updateAllMaterials(object: Object3D, environmentHelper: EnvironmentHelper): void; |
@@ -10,3 +10,2 @@ import * as THREE from "three"; | ||
bvh?: MeshBVHUniformStruct | undefined; | ||
envMapD?: THREE.Texture | THREE.DataTexture | THREE.CubeTexture | undefined; | ||
resolution?: THREE.Vector2 | undefined; | ||
@@ -37,6 +36,5 @@ viewMatrixInverse?: THREE.Matrix4 | undefined; | ||
set fastChroma(v: boolean); | ||
get envMapD(): any; | ||
set envMapD(m: any); | ||
dispose(): void; | ||
copy(source: MeshGemMaterial): this; | ||
} | ||
export default MeshGemMaterial; |
@@ -30,3 +30,17 @@ import { JewelryTypeName } from '../typings/jewelry-type'; | ||
updatedAt?: string; | ||
envMapRotation?: { | ||
x: number; | ||
y: number; | ||
z: number; | ||
}; | ||
backgroundColor: number | undefined; | ||
applyEnvMapOnBackground: boolean | undefined; | ||
environmentIntensity: number | undefined; | ||
backgroundBlurriness: number | undefined; | ||
backgroundRotation: { | ||
x: number; | ||
y: number; | ||
z: number; | ||
} | undefined; | ||
constructor(baseConfigDto: BaseConfigDto); | ||
} |
import * as THREE from "three"; | ||
import { ViewerConfig } from "../objects/viewer-config.object"; | ||
import { IEnvironmentHelper } from "../materials/environment"; | ||
import { IGem } from '../gems/IGem'; | ||
import { EnvironmentHelper } from "../materials/environment"; | ||
export declare const GEM_NAMES_LUT: Record<string, boolean>; | ||
export declare function findChild(sceneNode: THREE.Object3D, comparisonFunc: (c: THREE.Object3D) => boolean): THREE.Object3D | undefined; | ||
export declare function groupGemsBySizes(meshGroup: THREE.Group): Record<string, Record<string, THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[][]>>; | ||
export declare function replaceIndividualGemsWithInstancedMeshes(gemsBySizeLUT: Record<string, Record<string, Array<THREE.Mesh[]>>>, mainMeshGroup: THREE.Group, renderer: THREE.WebGLRenderer, viewerConfig: ViewerConfig, environmentHelper: IEnvironmentHelper, gemsMap: Record<string, IGem>, useSimpleShader: boolean): Promise<void>; | ||
export declare function replaceIndividualGemsWithInstancedMeshes(gemsBySizeLUT: Record<string, Record<string, Array<THREE.Mesh[]>>>, renderer: THREE.WebGLRenderer, viewerConfig: ViewerConfig, gemsMap: Record<string, IGem>, environmentHelper: EnvironmentHelper, useSimpleShader: boolean): Promise<void>; |
import * as THREE from 'three'; | ||
import { Scene, OrthographicCamera } from 'three'; | ||
import { IEnvironmentHelper } from '../../../../../trillion-common/src/materials/environment'; | ||
import { EnvironmentHelper } from '../../../../../trillion-common/src/materials/environment'; | ||
import { IPostEffects } from './posteffects'; | ||
import { IAppPerformanceStats } from '@/modules/AR/hooks/use-performance'; | ||
import { GemBrightnessType } from '../types/gemBrightnessType'; | ||
import * as PostProcessing from 'postprocessing'; | ||
export interface IRenderer3D { | ||
@@ -12,6 +11,5 @@ scene: Scene; | ||
canvas: HTMLCanvasElement; | ||
environmentHelper: IEnvironmentHelper; | ||
composer: PostProcessing.EffectComposer; | ||
render: () => void; | ||
renderer: THREE.WebGLRenderer; | ||
environmentHelper: EnvironmentHelper; | ||
renderDynamicBrightness: (defaultGemsSettings: GemBrightnessType[], canvasBrightness: number) => void; | ||
@@ -18,0 +16,0 @@ dispose: () => void; |
import { WebGLRenderer } from 'three'; | ||
export declare function setupRenderer(canvas: HTMLCanvasElement | undefined, width: number, height: number): WebGLRenderer; | ||
import { EnvironmentHelper } from '../../../../../trillion-common/src/materials/environment'; | ||
export declare function setupRenderer(canvas: HTMLCanvasElement | undefined, width: number, height: number): { | ||
renderer: WebGLRenderer; | ||
environmentHelper: EnvironmentHelper; | ||
}; |
{ | ||
"name": "trillion-widget", | ||
"version": "0.39.8-beta.3", | ||
"version": "0.39.8-beta.4", | ||
"description": "Trillion AR Widget", | ||
@@ -5,0 +5,0 @@ "author": "sp@trillion.jewelry", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
35191772
14978
340