|
@@ -11,7 +11,7 @@ TresJS fundamentally changes how you create 3D scenes by transforming Three.js's
|
|
|
|
|
|
In traditional Three.js development, you write **imperative code** - explicit instructions telling the computer exactly what to do step by step:
|
|
|
|
|
|
-```javascript [three-js-scene.js]
|
|
|
+```js [three-js-scene.js]
|
|
|
import * as THREE from 'three'
|
|
|
|
|
|
// Create scene, camera, and renderer
|
|
@@ -92,7 +92,7 @@ Let's compare how common 3D operations are handled in both approaches:
|
|
|
|
|
|
::code-group
|
|
|
|
|
|
-```javascript [Three.js (Imperative)]
|
|
|
+```js [Three.js (Imperative)]
|
|
|
// Setup scene, camera, renderer
|
|
|
const scene = new THREE.Scene()
|
|
|
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)
|