[65] Explosion: Ansichtsschraffur auf Wänden, Decken und Dächern folgt dem Geschoss-Versatz
This commit is contained in:
6 files changed
+57
-12
No files matched your search
@@ -225,8 +225,8 @@ export class ProjectDocument {
|
||||
}
|
||||
|
||||
/** Ansichtsschraffur auf den Flächen (Wände, Decken, Dächer) für render3d `set_pattern_lines`. */
|
||||
surfacePatternLines(): Float32Array {
|
||||
return this.handle ? core().doc_surface_pattern_lines(this.handle) : new Float32Array(0);
|
||||
surfacePatternLines(explode = 0): Float32Array {
|
||||
return this.handle ? core().doc_surface_pattern_lines(this.handle, explode) : new Float32Array(0);
|
||||
}
|
||||
|
||||
/** Das Dokument als JSON-Text (Test, Export). */
|
||||
|
||||
@@ -88,8 +88,12 @@ export function explodeFloorOffsets(project: Project, explode: number): Record<s
|
||||
* Ansichtsschraffur ([100]) auf den Flächen als Linien für render3d (`set_pattern_lines`): je Linie
|
||||
* `ax ay az bx by bz r g b maske` (Welt-Meter); die Maske wählt die Ausdünnung nach Abstand.
|
||||
*/
|
||||
export function emitSurfacePatternLines(project: Project): Float32Array {
|
||||
return documentFor(project).surfacePatternLines();
|
||||
export function emitSurfacePatternLines(
|
||||
project: Project,
|
||||
/** Explosionsabstand ([65]): Linien heben sich mit dem Geschoss ihres Bauteils; 0 = aus. */
|
||||
explode = 0,
|
||||
): Float32Array {
|
||||
return documentFor(project).surfacePatternLines(explodeGap(explode));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -253,7 +253,7 @@ export function useWasm3dRenderer(
|
||||
}
|
||||
if (typeof r.set_pattern_lines === "function") {
|
||||
try {
|
||||
r.set_pattern_lines(emitSurfacePatternLines(project));
|
||||
r.set_pattern_lines(emitSurfacePatternLines(project, explode));
|
||||
} catch (e) {
|
||||
console.warn("render3d set_pattern_lines fehlgeschlagen:", e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user