{"id":8357,"date":"2026-10-13T19:12:24","date_gmt":"2026-10-13T19:12:24","guid":{"rendered":"https:\/\/robertjwallace.com\/?p=8357"},"modified":"2026-10-13T19:12:25","modified_gmt":"2026-10-13T19:12:25","slug":"celtic-cross-from-my-cad-program","status":"publish","type":"post","link":"https:\/\/robertjwallace.com\/es\/celtic-cross-from-my-cad-program\/","title":{"rendered":"Celtic cross from my CAD program"},"content":{"rendered":"<div id=\"rjw-3d-eLkQVobn\" class=\"rjw-stl-wrapper\" style=\"width: 100%; height: 500px; background-color: #1a1a1a; border-radius: 8px; position: relative; overflow: hidden;\"><\/div>\n\n\t\t\t<script>\n\t\t\tdocument.addEventListener(\"DOMContentLoaded\", function() {\n\t\t\t\tconst container = document.getElementById(\"rjw-3d-eLkQVobn\");\n\t\t\t\tif(!container) return;\n\t\t\t\tconst width = container.clientWidth;\n\t\t\t\tconst height = container.clientHeight;\n\n\t\t\t\tconst scene = new THREE.Scene();\n\t\t\t\tscene.background = new THREE.Color(\"#1a1a1a\");\n\n\t\t\t\tconst camera = new THREE.PerspectiveCamera(45, width \/ height, 0.1, 1000);\n\t\t\t\t\n\t\t\t\tconst renderer = new THREE.WebGLRenderer({ antialias: true });\n\t\t\t\trenderer.setSize(width, height);\n\t\t\t\trenderer.setPixelRatio(window.devicePixelRatio);\n\t\t\t\trenderer.shadowMap.enabled = true;\n\t\t\t\tcontainer.appendChild(renderer.domElement);\n\n\t\t\t\tconst controls = new THREE.OrbitControls(camera, renderer.domElement);\n\t\t\t\tcontrols.enableDamping = true;\n\n\t\t\t\tconst ambientLight = new THREE.AmbientLight(0xffffff, 0.6);\n\t\t\t\tscene.add(ambientLight);\n\n\t\t\t\tconst dirLight1 = new THREE.DirectionalLight(0xffffff, 0.8);\n\t\t\t\tdirLight1.position.set(1, 1, 1).normalize();\n\t\t\t\tscene.add(dirLight1);\n\n\t\t\t\tconst dirLight2 = new THREE.DirectionalLight(0x555555, 0.5);\n\t\t\t\tdirLight2.position.set(-1, -1, -1).normalize();\n\t\t\t\tscene.add(dirLight2);\n\n\t\t\t\tconst loader = new THREE.STLLoader();\n\t\t\t\tloader.load(\"https:\/\/robertjwallace.com\/wp-content\/uploads\/rjw-3d-models\/celtic-cross-knot.stl\", function (geometry) {\n\t\t\t\t\tconst material = new THREE.MeshStandardMaterial({ \n\t\t\t\t\t\tcolor: \"#d4af37\", \n\t\t\t\t\t\troughness: 0.4, \n\t\t\t\t\t\tmetalness: 0.2 \n\t\t\t\t\t});\n\t\t\t\t\tconst mesh = new THREE.Mesh(geometry, material);\n\n\t\t\t\t\tgeometry.computeBoundingBox();\n\t\t\t\t\tconst boundingBox = geometry.boundingBox;\n\t\t\t\t\tgeometry.center();\n\n\t\t\t\t\tconst size = new THREE.Vector3();\n\t\t\t\t\tboundingBox.getSize(size);\n\t\t\t\t\tconst maxDim = Math.max(size.x, size.y, size.z);\n\t\t\t\t\t\n\t\t\t\t\tcamera.position.set(maxDim * 1.5, maxDim * 1.5, maxDim * 2);\n\t\t\t\t\tcamera.lookAt(0, 0, 0);\n\t\t\t\t\tcontrols.update();\n\n\t\t\t\t\tscene.add(mesh);\n\t\t\t\t}, undefined, function (error) {\n\t\t\t\t\tconsole.error(\"Error loading STL file:\", error);\n\t\t\t\t});\n\n\t\t\t\twindow.addEventListener('resize', function() {\n\t\t\t\t\tconst w = container.clientWidth;\n\t\t\t\t\tconst h = container.clientHeight;\n\t\t\t\t\tcamera.aspect = w \/ h;\n\t\t\t\t\tcamera.updateProjectionMatrix();\n\t\t\t\t\trenderer.setSize(w, h);\n\t\t\t\t});\n\n\t\t\t\tfunction animate() {\n\t\t\t\t\trequestAnimationFrame(animate);\n\t\t\t\t\tcontrols.update();\n\t\t\t\t\trenderer.render(scene, camera);\n\t\t\t\t}\n\t\t\t\tanimate();\n\t\t\t});\n\t\t\t<\/script>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_eb_attr":"","footnotes":""},"categories":[143],"tags":[],"class_list":["post-8357","post","type-post","status-publish","format-standard","hentry","category-computer-stuff"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Bob","author_link":"https:\/\/robertjwallace.com\/es\/author\/admin\/"},"_links":{"self":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/8357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/comments?post=8357"}],"version-history":[{"count":1,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/8357\/revisions"}],"predecessor-version":[{"id":8358,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/8357\/revisions\/8358"}],"wp:attachment":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/media?parent=8357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/categories?post=8357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/tags?post=8357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}