@ifc-lite/renderer 1.3.0 → 1.4.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/camera.d.ts +4 -0
- package/dist/camera.d.ts.map +1 -1
- package/dist/camera.js +6 -0
- package/dist/camera.js.map +1 -1
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -2
- package/dist/index.js.map +1 -1
- package/dist/section-2d-overlay.d.ts +104 -0
- package/dist/section-2d-overlay.d.ts.map +1 -0
- package/dist/section-2d-overlay.js +437 -0
- package/dist/section-2d-overlay.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
// Fill colors by IFC type (architectural convention)
|
|
5
|
+
const IFC_TYPE_FILL_COLORS = {
|
|
6
|
+
IfcWall: [0.69, 0.69, 0.69, 0.95],
|
|
7
|
+
IfcWallStandardCase: [0.69, 0.69, 0.69, 0.95],
|
|
8
|
+
IfcColumn: [0.56, 0.56, 0.56, 0.95],
|
|
9
|
+
IfcBeam: [0.56, 0.56, 0.56, 0.95],
|
|
10
|
+
IfcSlab: [0.78, 0.78, 0.78, 0.95],
|
|
11
|
+
IfcRoof: [0.82, 0.82, 0.82, 0.95],
|
|
12
|
+
IfcFooting: [0.50, 0.50, 0.50, 0.95],
|
|
13
|
+
IfcPile: [0.44, 0.44, 0.44, 0.95],
|
|
14
|
+
IfcWindow: [0.91, 0.96, 0.99, 0.7],
|
|
15
|
+
IfcDoor: [0.96, 0.90, 0.83, 0.95],
|
|
16
|
+
IfcStair: [0.85, 0.85, 0.85, 0.95],
|
|
17
|
+
IfcStairFlight: [0.85, 0.85, 0.85, 0.95],
|
|
18
|
+
IfcRailing: [0.75, 0.75, 0.75, 0.95],
|
|
19
|
+
IfcPipeSegment: [0.63, 0.82, 1.0, 0.95],
|
|
20
|
+
IfcDuctSegment: [0.75, 1.0, 0.75, 0.95],
|
|
21
|
+
IfcFurnishingElement: [1.0, 0.88, 0.75, 0.95],
|
|
22
|
+
IfcSpace: [0.94, 0.94, 0.94, 0.5],
|
|
23
|
+
default: [0.82, 0.82, 0.82, 0.95],
|
|
24
|
+
};
|
|
25
|
+
function getFillColor(ifcType) {
|
|
26
|
+
return IFC_TYPE_FILL_COLORS[ifcType] || IFC_TYPE_FILL_COLORS.default;
|
|
27
|
+
}
|
|
28
|
+
export class Section2DOverlayRenderer {
|
|
29
|
+
device;
|
|
30
|
+
fillPipeline = null;
|
|
31
|
+
linePipeline = null;
|
|
32
|
+
bindGroupLayout = null;
|
|
33
|
+
uniformBuffer = null;
|
|
34
|
+
bindGroup = null;
|
|
35
|
+
format;
|
|
36
|
+
sampleCount;
|
|
37
|
+
initialized = false;
|
|
38
|
+
// Cached geometry buffers
|
|
39
|
+
fillVertexBuffer = null;
|
|
40
|
+
fillIndexBuffer = null;
|
|
41
|
+
fillIndexCount = 0;
|
|
42
|
+
lineVertexBuffer = null;
|
|
43
|
+
lineVertexCount = 0;
|
|
44
|
+
constructor(device, format, sampleCount = 4) {
|
|
45
|
+
this.device = device;
|
|
46
|
+
this.format = format;
|
|
47
|
+
this.sampleCount = sampleCount;
|
|
48
|
+
}
|
|
49
|
+
init() {
|
|
50
|
+
if (this.initialized)
|
|
51
|
+
return;
|
|
52
|
+
// Create bind group layout
|
|
53
|
+
this.bindGroupLayout = this.device.createBindGroupLayout({
|
|
54
|
+
entries: [
|
|
55
|
+
{
|
|
56
|
+
binding: 0,
|
|
57
|
+
visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT,
|
|
58
|
+
buffer: { type: 'uniform' },
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
});
|
|
62
|
+
const pipelineLayout = this.device.createPipelineLayout({
|
|
63
|
+
bindGroupLayouts: [this.bindGroupLayout],
|
|
64
|
+
});
|
|
65
|
+
// Shader for filled polygons (with vertex colors)
|
|
66
|
+
const fillShader = this.device.createShaderModule({
|
|
67
|
+
code: `
|
|
68
|
+
struct Uniforms {
|
|
69
|
+
viewProj: mat4x4<f32>,
|
|
70
|
+
planeOffset: vec4<f32>, // Small offset to render slightly in front of section plane
|
|
71
|
+
}
|
|
72
|
+
@binding(0) @group(0) var<uniform> uniforms: Uniforms;
|
|
73
|
+
|
|
74
|
+
struct VertexInput {
|
|
75
|
+
@location(0) position: vec3<f32>,
|
|
76
|
+
@location(1) color: vec4<f32>,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
struct VertexOutput {
|
|
80
|
+
@builtin(position) position: vec4<f32>,
|
|
81
|
+
@location(0) color: vec4<f32>,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@vertex
|
|
85
|
+
fn vs_main(input: VertexInput) -> VertexOutput {
|
|
86
|
+
var output: VertexOutput;
|
|
87
|
+
let offsetPos = input.position + uniforms.planeOffset.xyz;
|
|
88
|
+
output.position = uniforms.viewProj * vec4<f32>(offsetPos, 1.0);
|
|
89
|
+
output.color = input.color;
|
|
90
|
+
return output;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@fragment
|
|
94
|
+
fn fs_main(input: VertexOutput) -> @location(0) vec4<f32> {
|
|
95
|
+
return input.color;
|
|
96
|
+
}
|
|
97
|
+
`,
|
|
98
|
+
});
|
|
99
|
+
// Shader for lines (uniform color)
|
|
100
|
+
const lineShader = this.device.createShaderModule({
|
|
101
|
+
code: `
|
|
102
|
+
struct Uniforms {
|
|
103
|
+
viewProj: mat4x4<f32>,
|
|
104
|
+
planeOffset: vec4<f32>,
|
|
105
|
+
}
|
|
106
|
+
@binding(0) @group(0) var<uniform> uniforms: Uniforms;
|
|
107
|
+
|
|
108
|
+
struct VertexInput {
|
|
109
|
+
@location(0) position: vec3<f32>,
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
struct VertexOutput {
|
|
113
|
+
@builtin(position) position: vec4<f32>,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@vertex
|
|
117
|
+
fn vs_main(input: VertexInput) -> VertexOutput {
|
|
118
|
+
var output: VertexOutput;
|
|
119
|
+
let offsetPos = input.position + uniforms.planeOffset.xyz;
|
|
120
|
+
output.position = uniforms.viewProj * vec4<f32>(offsetPos, 1.0);
|
|
121
|
+
return output;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@fragment
|
|
125
|
+
fn fs_main(input: VertexOutput) -> @location(0) vec4<f32> {
|
|
126
|
+
return vec4<f32>(0.0, 0.0, 0.0, 1.0); // Black lines
|
|
127
|
+
}
|
|
128
|
+
`,
|
|
129
|
+
});
|
|
130
|
+
// Pipeline for filled polygons
|
|
131
|
+
this.fillPipeline = this.device.createRenderPipeline({
|
|
132
|
+
layout: pipelineLayout,
|
|
133
|
+
vertex: {
|
|
134
|
+
module: fillShader,
|
|
135
|
+
entryPoint: 'vs_main',
|
|
136
|
+
buffers: [
|
|
137
|
+
{
|
|
138
|
+
arrayStride: 28, // 3 position + 4 color = 7 floats
|
|
139
|
+
attributes: [
|
|
140
|
+
{ shaderLocation: 0, offset: 0, format: 'float32x3' },
|
|
141
|
+
{ shaderLocation: 1, offset: 12, format: 'float32x4' },
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
fragment: {
|
|
147
|
+
module: fillShader,
|
|
148
|
+
entryPoint: 'fs_main',
|
|
149
|
+
targets: [{
|
|
150
|
+
format: this.format,
|
|
151
|
+
blend: {
|
|
152
|
+
color: {
|
|
153
|
+
srcFactor: 'src-alpha',
|
|
154
|
+
dstFactor: 'one-minus-src-alpha',
|
|
155
|
+
operation: 'add',
|
|
156
|
+
},
|
|
157
|
+
alpha: {
|
|
158
|
+
srcFactor: 'one',
|
|
159
|
+
dstFactor: 'one-minus-src-alpha',
|
|
160
|
+
operation: 'add',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
}],
|
|
164
|
+
},
|
|
165
|
+
primitive: {
|
|
166
|
+
topology: 'triangle-list',
|
|
167
|
+
cullMode: 'none',
|
|
168
|
+
},
|
|
169
|
+
depthStencil: {
|
|
170
|
+
format: 'depth24plus',
|
|
171
|
+
depthWriteEnabled: false,
|
|
172
|
+
depthCompare: 'always', // Always draw - overlay is positioned with fixed offset
|
|
173
|
+
},
|
|
174
|
+
multisample: {
|
|
175
|
+
count: this.sampleCount,
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
// Pipeline for lines
|
|
179
|
+
this.linePipeline = this.device.createRenderPipeline({
|
|
180
|
+
layout: pipelineLayout,
|
|
181
|
+
vertex: {
|
|
182
|
+
module: lineShader,
|
|
183
|
+
entryPoint: 'vs_main',
|
|
184
|
+
buffers: [
|
|
185
|
+
{
|
|
186
|
+
arrayStride: 12, // 3 position floats
|
|
187
|
+
attributes: [
|
|
188
|
+
{ shaderLocation: 0, offset: 0, format: 'float32x3' },
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
fragment: {
|
|
194
|
+
module: lineShader,
|
|
195
|
+
entryPoint: 'fs_main',
|
|
196
|
+
targets: [{
|
|
197
|
+
format: this.format,
|
|
198
|
+
}],
|
|
199
|
+
},
|
|
200
|
+
primitive: {
|
|
201
|
+
topology: 'line-list',
|
|
202
|
+
cullMode: 'none',
|
|
203
|
+
},
|
|
204
|
+
depthStencil: {
|
|
205
|
+
format: 'depth24plus',
|
|
206
|
+
depthWriteEnabled: false,
|
|
207
|
+
depthCompare: 'always', // Always draw - overlay is positioned with fixed offset
|
|
208
|
+
},
|
|
209
|
+
multisample: {
|
|
210
|
+
count: this.sampleCount,
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
// Create uniform buffer
|
|
214
|
+
this.uniformBuffer = this.device.createBuffer({
|
|
215
|
+
size: 80, // mat4x4 (64) + vec4 (16)
|
|
216
|
+
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
|
|
217
|
+
});
|
|
218
|
+
// Create bind group
|
|
219
|
+
this.bindGroup = this.device.createBindGroup({
|
|
220
|
+
layout: this.bindGroupLayout,
|
|
221
|
+
entries: [
|
|
222
|
+
{ binding: 0, resource: { buffer: this.uniformBuffer } },
|
|
223
|
+
],
|
|
224
|
+
});
|
|
225
|
+
this.initialized = true;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Transform 2D coordinates to 3D coordinates on the section plane
|
|
229
|
+
*
|
|
230
|
+
* The 2D projection in drawing-2d/math.ts uses:
|
|
231
|
+
* - Y axis (down): 2D (x, y) = 3D (x, z) - looking down at XZ plane
|
|
232
|
+
* - Z axis (front): 2D (x, y) = 3D (x, y) - looking along Z at XY plane
|
|
233
|
+
* - X axis (side): 2D (x, y) = 3D (z, y) - looking along X at ZY plane
|
|
234
|
+
*
|
|
235
|
+
* When flipped: x is negated in the 2D projection
|
|
236
|
+
*/
|
|
237
|
+
transform2Dto3D(x2d, y2d, axis, planePosition, flipped = false) {
|
|
238
|
+
// Handle flipped - the 2D x coordinate was negated during projection
|
|
239
|
+
const x = flipped ? -x2d : x2d;
|
|
240
|
+
switch (axis) {
|
|
241
|
+
case 'down': // Y axis - horizontal cut (floor plan)
|
|
242
|
+
// 2D.x = 3D.x, 2D.y = 3D.z -> 3D (x, planeY, y)
|
|
243
|
+
return [x, planePosition, y2d];
|
|
244
|
+
case 'front': // Z axis - vertical cut (section view)
|
|
245
|
+
// 2D.x = 3D.x, 2D.y = 3D.y -> 3D (x, y, planeZ)
|
|
246
|
+
return [x, y2d, planePosition];
|
|
247
|
+
case 'side': // X axis - vertical cut (side elevation)
|
|
248
|
+
// 2D.x = 3D.z, 2D.y = 3D.y -> 3D (planeX, y, x)
|
|
249
|
+
return [planePosition, y2d, x];
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Upload 2D drawing data to GPU buffers
|
|
254
|
+
*/
|
|
255
|
+
uploadDrawing(polygons, lines, axis, planePosition, flipped = false) {
|
|
256
|
+
this.init();
|
|
257
|
+
// Clean up old buffers and reset counts
|
|
258
|
+
if (this.fillVertexBuffer) {
|
|
259
|
+
this.fillVertexBuffer.destroy();
|
|
260
|
+
this.fillVertexBuffer = null;
|
|
261
|
+
}
|
|
262
|
+
if (this.fillIndexBuffer) {
|
|
263
|
+
this.fillIndexBuffer.destroy();
|
|
264
|
+
this.fillIndexBuffer = null;
|
|
265
|
+
}
|
|
266
|
+
if (this.lineVertexBuffer) {
|
|
267
|
+
this.lineVertexBuffer.destroy();
|
|
268
|
+
this.lineVertexBuffer = null;
|
|
269
|
+
}
|
|
270
|
+
this.fillIndexCount = 0;
|
|
271
|
+
this.lineVertexCount = 0;
|
|
272
|
+
// Build fill geometry (triangulated polygons)
|
|
273
|
+
const fillVertices = [];
|
|
274
|
+
const fillIndices = [];
|
|
275
|
+
let vertexOffset = 0;
|
|
276
|
+
for (const polygon of polygons) {
|
|
277
|
+
const color = getFillColor(polygon.ifcType);
|
|
278
|
+
const outer = polygon.polygon.outer;
|
|
279
|
+
if (outer.length < 3)
|
|
280
|
+
continue;
|
|
281
|
+
// KNOWN LIMITATION: Simple fan triangulation for convex polygons only.
|
|
282
|
+
// This produces correct results for most architectural elements (walls, slabs, etc.)
|
|
283
|
+
// but may render incorrectly for:
|
|
284
|
+
// - Concave polygons (e.g., L-shaped openings)
|
|
285
|
+
// - Polygons with holes (e.g., windows in walls)
|
|
286
|
+
// For production use with complex geometry, consider implementing ear clipping
|
|
287
|
+
// (e.g., using earcut library) or constrained Delaunay triangulation.
|
|
288
|
+
// Note: The 2D canvas/SVG rendering in Section2DPanel handles holes correctly.
|
|
289
|
+
const baseVertex = vertexOffset;
|
|
290
|
+
for (const point of outer) {
|
|
291
|
+
const [x3d, y3d, z3d] = this.transform2Dto3D(point.x, point.y, axis, planePosition, flipped);
|
|
292
|
+
fillVertices.push(x3d, y3d, z3d, color[0], color[1], color[2], color[3]);
|
|
293
|
+
vertexOffset++;
|
|
294
|
+
}
|
|
295
|
+
// Fan triangulation from first vertex
|
|
296
|
+
for (let i = 1; i < outer.length - 1; i++) {
|
|
297
|
+
fillIndices.push(baseVertex, baseVertex + i, baseVertex + i + 1);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
// Create fill buffers
|
|
301
|
+
if (fillVertices.length > 0) {
|
|
302
|
+
const fillVertexData = new Float32Array(fillVertices);
|
|
303
|
+
this.fillVertexBuffer = this.device.createBuffer({
|
|
304
|
+
size: fillVertexData.byteLength,
|
|
305
|
+
usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST,
|
|
306
|
+
});
|
|
307
|
+
this.device.queue.writeBuffer(this.fillVertexBuffer, 0, fillVertexData);
|
|
308
|
+
const fillIndexData = new Uint32Array(fillIndices);
|
|
309
|
+
this.fillIndexBuffer = this.device.createBuffer({
|
|
310
|
+
size: fillIndexData.byteLength,
|
|
311
|
+
usage: GPUBufferUsage.INDEX | GPUBufferUsage.COPY_DST,
|
|
312
|
+
});
|
|
313
|
+
this.device.queue.writeBuffer(this.fillIndexBuffer, 0, fillIndexData);
|
|
314
|
+
this.fillIndexCount = fillIndices.length;
|
|
315
|
+
}
|
|
316
|
+
// Build line geometry
|
|
317
|
+
const lineVertices = [];
|
|
318
|
+
// Polygon outlines
|
|
319
|
+
for (const polygon of polygons) {
|
|
320
|
+
const outer = polygon.polygon.outer;
|
|
321
|
+
for (let i = 0; i < outer.length; i++) {
|
|
322
|
+
const p1 = outer[i];
|
|
323
|
+
const p2 = outer[(i + 1) % outer.length];
|
|
324
|
+
const [x1, y1, z1] = this.transform2Dto3D(p1.x, p1.y, axis, planePosition, flipped);
|
|
325
|
+
const [x2, y2, z2] = this.transform2Dto3D(p2.x, p2.y, axis, planePosition, flipped);
|
|
326
|
+
lineVertices.push(x1, y1, z1, x2, y2, z2);
|
|
327
|
+
}
|
|
328
|
+
// Hole outlines
|
|
329
|
+
for (const hole of polygon.polygon.holes) {
|
|
330
|
+
for (let i = 0; i < hole.length; i++) {
|
|
331
|
+
const p1 = hole[i];
|
|
332
|
+
const p2 = hole[(i + 1) % hole.length];
|
|
333
|
+
const [x1, y1, z1] = this.transform2Dto3D(p1.x, p1.y, axis, planePosition, flipped);
|
|
334
|
+
const [x2, y2, z2] = this.transform2Dto3D(p2.x, p2.y, axis, planePosition, flipped);
|
|
335
|
+
lineVertices.push(x1, y1, z1, x2, y2, z2);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
// Additional drawing lines (hatching, etc.)
|
|
340
|
+
for (const line of lines) {
|
|
341
|
+
const [x1, y1, z1] = this.transform2Dto3D(line.line.start.x, line.line.start.y, axis, planePosition, flipped);
|
|
342
|
+
const [x2, y2, z2] = this.transform2Dto3D(line.line.end.x, line.line.end.y, axis, planePosition, flipped);
|
|
343
|
+
lineVertices.push(x1, y1, z1, x2, y2, z2);
|
|
344
|
+
}
|
|
345
|
+
// Create line buffer
|
|
346
|
+
if (lineVertices.length > 0) {
|
|
347
|
+
const lineVertexData = new Float32Array(lineVertices);
|
|
348
|
+
this.lineVertexBuffer = this.device.createBuffer({
|
|
349
|
+
size: lineVertexData.byteLength,
|
|
350
|
+
usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST,
|
|
351
|
+
});
|
|
352
|
+
this.device.queue.writeBuffer(this.lineVertexBuffer, 0, lineVertexData);
|
|
353
|
+
this.lineVertexCount = lineVertices.length / 3; // Each vertex is 3 floats
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Clear uploaded geometry
|
|
358
|
+
*/
|
|
359
|
+
clearGeometry() {
|
|
360
|
+
if (this.fillVertexBuffer) {
|
|
361
|
+
this.fillVertexBuffer.destroy();
|
|
362
|
+
this.fillVertexBuffer = null;
|
|
363
|
+
}
|
|
364
|
+
if (this.fillIndexBuffer) {
|
|
365
|
+
this.fillIndexBuffer.destroy();
|
|
366
|
+
this.fillIndexBuffer = null;
|
|
367
|
+
}
|
|
368
|
+
if (this.lineVertexBuffer) {
|
|
369
|
+
this.lineVertexBuffer.destroy();
|
|
370
|
+
this.lineVertexBuffer = null;
|
|
371
|
+
}
|
|
372
|
+
this.fillIndexCount = 0;
|
|
373
|
+
this.lineVertexCount = 0;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Check if there is geometry to draw
|
|
377
|
+
*/
|
|
378
|
+
hasGeometry() {
|
|
379
|
+
return this.fillIndexCount > 0 || this.lineVertexCount > 0;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Draw the 2D overlay on the section plane
|
|
383
|
+
*/
|
|
384
|
+
draw(pass, options) {
|
|
385
|
+
this.init();
|
|
386
|
+
if (!this.fillPipeline || !this.linePipeline || !this.uniformBuffer || !this.bindGroup) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
if (!this.hasGeometry()) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
const { axis, viewProj } = options;
|
|
393
|
+
// Fixed offset to render overlay clearly above the section plane
|
|
394
|
+
// Use 0.3m offset for clear visibility at any camera angle
|
|
395
|
+
const offsetAmount = 0.3; // 0.3m offset in world units
|
|
396
|
+
let offset = [0, 0, 0];
|
|
397
|
+
switch (axis) {
|
|
398
|
+
case 'down':
|
|
399
|
+
offset = [0, offsetAmount, 0]; // Y axis
|
|
400
|
+
break;
|
|
401
|
+
case 'front':
|
|
402
|
+
offset = [0, 0, offsetAmount]; // Z axis
|
|
403
|
+
break;
|
|
404
|
+
case 'side':
|
|
405
|
+
offset = [offsetAmount, 0, 0]; // X axis
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
// Update uniforms
|
|
409
|
+
const uniforms = new Float32Array(20);
|
|
410
|
+
uniforms.set(viewProj, 0);
|
|
411
|
+
uniforms[16] = offset[0];
|
|
412
|
+
uniforms[17] = offset[1];
|
|
413
|
+
uniforms[18] = offset[2];
|
|
414
|
+
uniforms[19] = 0; // padding
|
|
415
|
+
this.device.queue.writeBuffer(this.uniformBuffer, 0, uniforms);
|
|
416
|
+
// Note: Skip filled polygons in 3D overlay - they create visual artifacts
|
|
417
|
+
// The fills are rendered properly in the 2D panel canvas instead
|
|
418
|
+
// Draw lines only
|
|
419
|
+
if (this.lineVertexBuffer && this.lineVertexCount > 0) {
|
|
420
|
+
pass.setPipeline(this.linePipeline);
|
|
421
|
+
pass.setBindGroup(0, this.bindGroup);
|
|
422
|
+
pass.setVertexBuffer(0, this.lineVertexBuffer);
|
|
423
|
+
pass.draw(this.lineVertexCount);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Dispose of GPU resources
|
|
428
|
+
*/
|
|
429
|
+
dispose() {
|
|
430
|
+
this.clearGeometry();
|
|
431
|
+
if (this.uniformBuffer) {
|
|
432
|
+
this.uniformBuffer.destroy();
|
|
433
|
+
this.uniformBuffer = null;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
//# sourceMappingURL=section-2d-overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-2d-overlay.js","sourceRoot":"","sources":["../src/section-2d-overlay.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAwC/D,qDAAqD;AACrD,MAAM,oBAAoB,GAAqD;IAC7E,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACjC,mBAAmB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAC7C,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EA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YACrC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5B,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/renderer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "WebGPU renderer for IFC-Lite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@ifc-lite/geometry": "^1.3.0",
|
|
15
16
|
"@ifc-lite/spatial": "^1.2.1",
|
|
16
|
-
"@ifc-lite/wasm": "^1.3.0"
|
|
17
|
-
"@ifc-lite/geometry": "^1.3.0"
|
|
17
|
+
"@ifc-lite/wasm": "^1.3.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@webgpu/types": "^0.1.69",
|