Skip to content

Instantly share code, notes, and snippets.

@erichlof
Created May 14, 2025 18:37
Show Gist options
  • Save erichlof/bbb5418a2de4a4ba73d376d8000cd1eb to your computer and use it in GitHub Desktop.
Save erichlof/bbb5418a2de4a4ba73d376d8000cd1eb to your computer and use it in GitHub Desktop.
Making more interesting and complex models using CSG techniques
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js PathTracing Renderer - CSG Model Rendering</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<link href="css/default.css" rel="stylesheet">
<script type="importmap">
{
"imports": {
"three": "./js/three.module.min.js"
}
}
</script>
<script type="module">
import * as THREE from 'three';
window.THREE = THREE;
import Stats from './js/stats.module.js';
window.Stats = Stats;
import GUI from './js/lil-gui.module.min.js';
window.GUI = GUI;
</script>
</head>
<body>
<div id="container"> </div>
<div id="info">three.js PathTracing Renderer - CSG Model Rendering</div>
<div id="cameraInfo" style="position:fixed; left:3%; bottom:2%; font-family:arial; color:rgb(255,255,255);">
</div>
<script defer src="js/BVH_Quick_Builder.js"> </script>
<script defer src="js/MobileJoystickControls.js"> </script>
<script defer src="js/PathTracingCommon.js"> </script>
<script defer src="js/InitCommon.js"> </script>
<script defer src="js/CSG_Model_Rendering.js"> </script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment