|
@@ -93,10 +93,10 @@ async function createGaussianSurfaceMesh(ctx: VisualContext, unit: Unit, structu
|
|
idField
|
|
idField
|
|
};
|
|
};
|
|
const surface = await computeMarchingCubesMesh(params, mesh).runAsChild(ctx.runtime);
|
|
const surface = await computeMarchingCubesMesh(params, mesh).runAsChild(ctx.runtime);
|
|
- (surface.meta as GaussianSurfaceMeta) = { resolution };
|
|
|
|
|
|
+ (surface.meta.resolution as GaussianSurfaceMeta['resolution']) = resolution;
|
|
|
|
|
|
Mesh.transform(surface, transform);
|
|
Mesh.transform(surface, transform);
|
|
- if (ctx.webgl && !ctx.webgl.isWebGL2) Mesh.uniformTriangleGroup(surface, false);
|
|
|
|
|
|
+ if (ctx.webgl && !ctx.webgl.isWebGL2) Mesh.uniformTriangleGroup(surface);
|
|
|
|
|
|
const sphere = Sphere3D.expand(Sphere3D(), unit.boundary.sphere, props.radiusOffset + getUnitExtraRadius(unit));
|
|
const sphere = Sphere3D.expand(Sphere3D(), unit.boundary.sphere, props.radiusOffset + getUnitExtraRadius(unit));
|
|
surface.setBoundingSphere(sphere);
|
|
surface.setBoundingSphere(sphere);
|
|
@@ -133,7 +133,7 @@ export function GaussianSurfaceMeshVisual(materialId: number): UnitsVisual<Gauss
|
|
const csp = getColorSmoothingProps(props, theme, resolution, webgl);
|
|
const csp = getColorSmoothingProps(props, theme, resolution, webgl);
|
|
if (csp) {
|
|
if (csp) {
|
|
applyMeshColorSmoothing(values, csp.resolution, csp.stride, csp.webgl, colorTexture);
|
|
applyMeshColorSmoothing(values, csp.resolution, csp.stride, csp.webgl, colorTexture);
|
|
- (geometry.meta as GaussianSurfaceMeta).colorTexture = values.tColorGrid.ref.value;
|
|
|
|
|
|
+ (geometry.meta.colorTexture as GaussianSurfaceMeta['colorTexture']) = values.tColorGrid.ref.value;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
dispose: (geometry: Mesh) => {
|
|
dispose: (geometry: Mesh) => {
|
|
@@ -154,10 +154,10 @@ async function createStructureGaussianSurfaceMesh(ctx: VisualContext, structure:
|
|
idField
|
|
idField
|
|
};
|
|
};
|
|
const surface = await computeMarchingCubesMesh(params, mesh).runAsChild(ctx.runtime);
|
|
const surface = await computeMarchingCubesMesh(params, mesh).runAsChild(ctx.runtime);
|
|
- (surface.meta as GaussianSurfaceMeta) = { resolution };
|
|
|
|
|
|
+ (surface.meta.resolution as GaussianSurfaceMeta['resolution']) = resolution;
|
|
|
|
|
|
Mesh.transform(surface, transform);
|
|
Mesh.transform(surface, transform);
|
|
- if (ctx.webgl && !ctx.webgl.isWebGL2) Mesh.uniformTriangleGroup(surface, false);
|
|
|
|
|
|
+ if (ctx.webgl && !ctx.webgl.isWebGL2) Mesh.uniformTriangleGroup(surface);
|
|
|
|
|
|
const sphere = Sphere3D.expand(Sphere3D(), structure.boundary.sphere, props.radiusOffset + getStructureExtraRadius(structure));
|
|
const sphere = Sphere3D.expand(Sphere3D(), structure.boundary.sphere, props.radiusOffset + getStructureExtraRadius(structure));
|
|
surface.setBoundingSphere(sphere);
|
|
surface.setBoundingSphere(sphere);
|
|
@@ -193,7 +193,7 @@ export function StructureGaussianSurfaceMeshVisual(materialId: number): ComplexV
|
|
const csp = getColorSmoothingProps(props, theme, resolution, webgl);
|
|
const csp = getColorSmoothingProps(props, theme, resolution, webgl);
|
|
if (csp) {
|
|
if (csp) {
|
|
applyMeshColorSmoothing(values, csp.resolution, csp.stride, csp.webgl, colorTexture);
|
|
applyMeshColorSmoothing(values, csp.resolution, csp.stride, csp.webgl, colorTexture);
|
|
- (geometry.meta as GaussianSurfaceMeta).colorTexture = values.tColorGrid.ref.value;
|
|
|
|
|
|
+ (geometry.meta.colorTexture as GaussianSurfaceMeta['colorTexture']) = values.tColorGrid.ref.value;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
dispose: (geometry: Mesh) => {
|
|
dispose: (geometry: Mesh) => {
|