Initial commit

This commit is contained in:
Robert Nasarek 2026-06-25 09:11:23 +02:00
commit 05c65aad4d
155 changed files with 93617 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# Test fixture for OBJ fallback when the referenced material file is missing.
mtllib missing-material.mtl
o Triangle
v 0.000000 0.000000 0.000000
v 1.000000 0.000000 0.000000
v 0.000000 1.000000 0.000000
vn 0.0000 0.0000 1.0000
f 1//1 2//1 3//1

BIN
viewer/examples/box.3ds Normal file

Binary file not shown.

BIN
viewer/examples/box.abc Normal file

Binary file not shown.

70
viewer/examples/box.dae Normal file
View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>DFG Viewer</author>
<authoring_tool>TXT</authoring_tool>
</contributor>
<created>2026-03-13T00:00:00Z</created>
<modified>2026-03-13T00:00:00Z</modified>
<unit name="meter" meter="1"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="Material-effect">
<profile_COMMON>
<technique sid="common">
<lambert>
<diffuse>
<color>0.2 0.5 0.9 1</color>
</diffuse>
</lambert>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_materials>
<material id="Material-material" name="Material">
<instance_effect url="#Material-effect"/>
</material>
</library_materials>
<library_geometries>
<geometry id="Cube-geometry" name="Cube">
<mesh>
<source id="Cube-positions">
<float_array id="Cube-positions-array" count="24">1 2 -1 1 0 -1 1 2 1 1 0 1 -1 2 -1 -1 0 -1 -1 2 1 -1 0 1</float_array>
<technique_common>
<accessor source="#Cube-positions-array" count="8" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="Cube-vertices">
<input semantic="POSITION" source="#Cube-positions"/>
</vertices>
<triangles count="12" material="Material-material">
<input semantic="VERTEX" source="#Cube-vertices" offset="0"/>
<p>0 4 6 0 6 2 3 2 6 3 6 7 7 6 4 7 4 5 5 1 3 5 3 7 1 0 2 1 2 3 5 4 0 5 0 1</p>
</triangles>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="Cube-node" name="Cube" type="NODE">
<instance_geometry url="#Cube-geometry">
<bind_material>
<technique_common>
<instance_material symbol="Material-material" target="#Material-material"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#Scene"/>
</scene>
</COLLADA>

BIN
viewer/examples/box.fbx Normal file

Binary file not shown.

BIN
viewer/examples/box.glb Normal file

Binary file not shown.

43
viewer/examples/box.ifc Normal file
View file

@ -0,0 +1,43 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('box.ifc','2026-03-12T00:00:00',('DFG 3DViewer'),('OpenAI'),'DFG 3DViewer','DFG 3DViewer','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPERSON($,$,'DFG 3DViewer',$,$,$,$,$);
#2=IFCORGANIZATION($,'DFG 3DViewer',$,$,$);
#3=IFCPERSONANDORGANIZATION(#1,#2,$);
#4=IFCAPPLICATION(#2,'1.0','DFG 3DViewer','DFG 3DViewer');
#5=IFCOWNERHISTORY(#3,#4,$,.ADDED.,$,$,$,0);
#10=IFCCARTESIANPOINT((0.,0.,0.));
#11=IFCDIRECTION((0.,0.,1.));
#12=IFCDIRECTION((1.,0.,0.));
#13=IFCAXIS2PLACEMENT3D(#10,#11,#12);
#14=IFCLOCALPLACEMENT($,#13);
#15=IFCDIRECTION((1.,0.));
#16=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,0.00001,#13,$);
#17=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body','Model',*,*,*,*,#16,$,.MODEL_VIEW.,$);
#18=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);
#19=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.);
#20=IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.);
#21=IFCUNITASSIGNMENT((#18,#19,#20));
#22=IFCPROJECT('0$C0D3XPR0J3CT0000001',#5,'Project',$,$,$,$,(#16),#21);
#23=IFCSITE('0$C0D3XS1T30000000001',#5,'Site',$,$,#14,$,$,.ELEMENT.,$,$,$,$,$);
#24=IFCBUILDING('0$C0D3XBUILD1NG000001',#5,'Building',$,$,#14,$,$,.ELEMENT.,$,$,$);
#25=IFCBUILDINGSTOREY('0$C0D3XST0R3Y0000001',#5,'Storey',$,$,#14,$,$,.ELEMENT.,0.);
#26=IFCRELAGGREGATES('0$C0D3XAGRPROJ000001',#5,$,$,#22,(#23));
#27=IFCRELAGGREGATES('0$C0D3XAGRS1TE000001',#5,$,$,#23,(#24));
#28=IFCRELAGGREGATES('0$C0D3XAGRBLDG000001',#5,$,$,#24,(#25));
#30=IFCCARTESIANPOINT((0.,0.));
#31=IFCAXIS2PLACEMENT2D(#30,$);
#32=IFCRECTANGLEPROFILEDEF(.AREA.,'BoxProfile',#31,1.,1.);
#33=IFCAXIS2PLACEMENT3D(#10,#11,#12);
#34=IFCDIRECTION((0.,0.,1.));
#35=IFCEXTRUDEDAREASOLID(#32,#33,#34,1.);
#36=IFCSHAPEREPRESENTATION(#17,'Body','SweptSolid',(#35));
#37=IFCPRODUCTDEFINITIONSHAPE($,$,(#36));
#38=IFCBUILDINGELEMENTPROXY('0$C0D3XPR0XY00000001',#5,'Box',$,$,#14,#37,$,$);
#39=IFCRELCONTAINEDINSPATIALSTRUCTURE('0$C0D3XRELSTR0000001',#5,$,$,(#38),#25);
ENDSEC;
END-ISO-10303-21;

12
viewer/examples/box.mtl Normal file
View file

@ -0,0 +1,12 @@
# Blender 5.0.0 MTL File: 'None'
# www.blender.org
newmtl Material
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.000922 0.000000 0.800016
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2

40
viewer/examples/box.obj Normal file
View file

@ -0,0 +1,40 @@
# Blender 5.0.0
# www.blender.org
mtllib box.mtl
o Cube
v 1.000000 2.000000 -1.000000
v 1.000000 0.000000 -1.000000
v 1.000000 2.000000 1.000000
v 1.000000 0.000000 1.000000
v -1.000000 2.000000 -1.000000
v -1.000000 0.000000 -1.000000
v -1.000000 2.000000 1.000000
v -1.000000 0.000000 1.000000
vn -0.0000 1.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vt 0.625000 0.500000
vt 0.875000 0.500000
vt 0.875000 0.750000
vt 0.625000 0.750000
vt 0.375000 0.750000
vt 0.625000 1.000000
vt 0.375000 1.000000
vt 0.375000 0.000000
vt 0.625000 0.000000
vt 0.625000 0.250000
vt 0.375000 0.250000
vt 0.125000 0.500000
vt 0.375000 0.500000
vt 0.125000 0.750000
s 0
usemtl Material
f 1/1/1 5/2/1 7/3/1 3/4/1
f 4/5/2 3/4/2 7/6/2 8/7/2
f 8/8/3 7/9/3 5/10/3 6/11/3
f 6/12/4 2/13/4 4/5/4 8/14/4
f 2/13/5 1/1/5 3/4/5 4/5/5
f 6/11/6 5/10/6 1/1/6 2/13/6

109
viewer/examples/box.pcd Normal file
View file

@ -0,0 +1,109 @@
# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z
SIZE 4 4 4
TYPE F F F
COUNT 1 1 1
WIDTH 98
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 98
DATA ascii
-1 0 -1
-1 0 -0.5
-1 0 0
-1 0 0.5
-1 0 1
-0.5 0 -1
-0.5 0 -0.5
-0.5 0 0
-0.5 0 0.5
-0.5 0 1
0 0 -1
0 0 -0.5
0 0 0
0 0 0.5
0 0 1
0.5 0 -1
0.5 0 -0.5
0.5 0 0
0.5 0 0.5
0.5 0 1
1 0 -1
1 0 -0.5
1 0 0
1 0 0.5
1 0 1
-1 2 -1
-1 2 -0.5
-1 2 0
-1 2 0.5
-1 2 1
-0.5 2 -1
-0.5 2 -0.5
-0.5 2 0
-0.5 2 0.5
-0.5 2 1
0 2 -1
0 2 -0.5
0 2 0
0 2 0.5
0 2 1
0.5 2 -1
0.5 2 -0.5
0.5 2 0
0.5 2 0.5
0.5 2 1
1 2 -1
1 2 -0.5
1 2 0
1 2 0.5
1 2 1
-1 0.5 -1
-1 0.5 -0.5
-1 0.5 0
-1 0.5 0.5
-1 0.5 1
-1 1 -1
-1 1 -0.5
-1 1 0
-1 1 0.5
-1 1 1
-1 1.5 -1
-1 1.5 -0.5
-1 1.5 0
-1 1.5 0.5
-1 1.5 1
1 0.5 -1
1 0.5 -0.5
1 0.5 0
1 0.5 0.5
1 0.5 1
1 1 -1
1 1 -0.5
1 1 0
1 1 0.5
1 1 1
1 1.5 -1
1 1.5 -0.5
1 1.5 0
1 1.5 0.5
1 1.5 1
-0.5 0.5 -1
0 0.5 -1
0.5 0.5 -1
-0.5 1 -1
0 1 -1
0.5 1 -1
-0.5 1.5 -1
0 1.5 -1
0.5 1.5 -1
-0.5 0.5 1
0 0.5 1
0.5 0.5 1
-0.5 1 1
0 1 1
0.5 1 1
-0.5 1.5 1
0 1.5 1
0.5 1.5 1

BIN
viewer/examples/box.ply Normal file

Binary file not shown.

BIN
viewer/examples/box.stl Normal file

Binary file not shown.

99
viewer/examples/box.xyz Normal file
View file

@ -0,0 +1,99 @@
# Cube surface points matching the GLB example bounds: x,z in [-1,1], y in [0,2]
-1 0 -1
-1 0 -0.5
-1 0 0
-1 0 0.5
-1 0 1
-0.5 0 -1
-0.5 0 -0.5
-0.5 0 0
-0.5 0 0.5
-0.5 0 1
0 0 -1
0 0 -0.5
0 0 0
0 0 0.5
0 0 1
0.5 0 -1
0.5 0 -0.5
0.5 0 0
0.5 0 0.5
0.5 0 1
1 0 -1
1 0 -0.5
1 0 0
1 0 0.5
1 0 1
-1 2 -1
-1 2 -0.5
-1 2 0
-1 2 0.5
-1 2 1
-0.5 2 -1
-0.5 2 -0.5
-0.5 2 0
-0.5 2 0.5
-0.5 2 1
0 2 -1
0 2 -0.5
0 2 0
0 2 0.5
0 2 1
0.5 2 -1
0.5 2 -0.5
0.5 2 0
0.5 2 0.5
0.5 2 1
1 2 -1
1 2 -0.5
1 2 0
1 2 0.5
1 2 1
-1 0.5 -1
-1 0.5 -0.5
-1 0.5 0
-1 0.5 0.5
-1 0.5 1
-1 1 -1
-1 1 -0.5
-1 1 0
-1 1 0.5
-1 1 1
-1 1.5 -1
-1 1.5 -0.5
-1 1.5 0
-1 1.5 0.5
-1 1.5 1
1 0.5 -1
1 0.5 -0.5
1 0.5 0
1 0.5 0.5
1 0.5 1
1 1 -1
1 1 -0.5
1 1 0
1 1 0.5
1 1 1
1 1.5 -1
1 1.5 -0.5
1 1.5 0
1 1.5 0.5
1 1.5 1
-0.5 0.5 -1
0 0.5 -1
0.5 0.5 -1
-0.5 1 -1
0 1 -1
0.5 1 -1
-0.5 1.5 -1
0 1.5 -1
0.5 1.5 -1
-0.5 0.5 1
0 0.5 1
0.5 0.5 1
-0.5 1 1
0 1 1
0.5 1 1
-0.5 1.5 1
0 1.5 1
0.5 1.5 1

View file

@ -0,0 +1 @@
this-is-not-a-valid-glb-file