Skip to content

Commit

Permalink
fix: import three/addons directly to avoid issues with vite dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-mason committed Oct 15, 2024
1 parent 46e2367 commit 4141298
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-gifts-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@recast-navigation/three': patch
---

fix: import three/addons directly to avoid issues with vite dev mode
3 changes: 2 additions & 1 deletion packages/recast-navigation-three/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export default [
'@recast-navigation/core',
'@recast-navigation/generators',
'three',
'three/addons',
/three\/addons\/.*/

],
output: [
{
Expand Down
8 changes: 3 additions & 5 deletions packages/recast-navigation-three/src/debug/debug-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ import {
RecastPolyMeshDetail,
} from '@recast-navigation/core';
import * as THREE from 'three';
import {
LineMaterial,
LineSegments2,
LineSegmentsGeometry,
} from 'three/addons';
import { LineMaterial } from 'three/addons/lines/LineMaterial.js';
import { LineSegments2 } from 'three/addons/lines/LineSegments2.js';
import { LineSegmentsGeometry } from 'three/addons/lines/LineSegmentsGeometry.js';

const _color = new THREE.Color();

Expand Down

0 comments on commit 4141298

Please sign in to comment.