Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b62efdf
Add region image source
gkjohnson Dec 19, 2025
ddfb74a
Enable use of region source
gkjohnson Dec 19, 2025
96cd1c6
Updates
gkjohnson Dec 19, 2025
3f716d5
Update all overlays
gkjohnson Dec 19, 2025
877fbb2
Small updates
gkjohnson Dec 19, 2025
81222e3
Simplify ranges so they are always normalized
gkjohnson Dec 19, 2025
01651aa
Cleanup
gkjohnson Dec 19, 2025
326572e
Fixes
gkjohnson Dec 19, 2025
c393d96
Merge remote-tracking branch 'origin/master' into region-source
gkjohnson Dec 19, 2025
d517dbd
Merge remote-tracking branch 'origin/master' into region-source
gkjohnson Dec 19, 2025
e0a81ce
Simplify
gkjohnson Dec 19, 2025
6c40015
Remove renderer
gkjohnson Dec 19, 2025
5ab3e9c
Cleanup
gkjohnson Dec 19, 2025
ada116e
Use resolution
gkjohnson Dec 19, 2025
dab2ec0
Add "TiledImageOverlay"
gkjohnson Dec 19, 2025
4ae8c01
Updates
gkjohnson Dec 19, 2025
ef832f2
Clean up overlay initialization
gkjohnson Dec 19, 2025
716120a
Remove need for "countTilesInRnge"
gkjohnson Dec 20, 2025
722b072
Add support for "none" projection scheme
gkjohnson Dec 20, 2025
b6a22d1
Merge remote-tracking branch 'origin/master' into region-source
gkjohnson Dec 20, 2025
6744f44
Fix lint
gkjohnson Dec 20, 2025
4537002
Steps towards removing use of "tiling
gkjohnson Dec 20, 2025
b8a0118
More simplification
gkjohnson Dec 20, 2025
1c30ddb
Updates
gkjohnson Dec 20, 2025
8a8ba0d
Rearrange some dependencies
gkjohnson Dec 20, 2025
f627e44
Remove unused dispose call
gkjohnson Dec 20, 2025
0147cea
Simplify use of aspect ratio
gkjohnson Dec 20, 2025
314b7bc
Use "processedTiles" where possible
gkjohnson Dec 20, 2025
c5f5cb6
Fix memory leak
gkjohnson Dec 20, 2025
23fe929
Remove parent tile drawing
gkjohnson Dec 20, 2025
18941c5
Defer to "Overlay" implementation for texture fetch
gkjohnson Dec 20, 2025
abb9f62
memory leak fixes
gkjohnson Dec 20, 2025
1c4928a
Update geojson example
gkjohnson Dec 20, 2025
97f1504
Add prepare logic to allow for loading data without creating and comp…
gkjohnson Dec 21, 2025
4d28b92
rearrange
gkjohnson Dec 21, 2025
fce63ff
Fix lint issue
gkjohnson Dec 21, 2025
cc1466e
GeoJSONOverlay: Convert to use "region" directly
gkjohnson Dec 21, 2025
890ca81
Add a separate "lock" and "get" function
gkjohnson Dec 21, 2025
315ecf5
Remove need for "meshRange"
gkjohnson Dec 21, 2025
50e4a53
Remove "rangeMarked" field
gkjohnson Dec 21, 2025
eee946e
Remove prepare functions
gkjohnson Dec 21, 2025
baaf62c
Remove comments
gkjohnson Dec 21, 2025
4a65b7e
Fix geojson overlay
gkjohnson Dec 21, 2025
8b90af2
simplification
gkjohnson Dec 21, 2025
74ef2c2
Remove passing level to the overlay
gkjohnson Dec 21, 2025
baa1377
Lint fix
gkjohnson Dec 21, 2025
a2905ed
lint fix
gkjohnson Dec 21, 2025
9f4ba92
Geojson split update
gkjohnson Dec 21, 2025
a866522
Add pass through for geojson overlay fields
gkjohnson Dec 21, 2025
9aac5c4
Add ability to redraw the geojson
gkjohnson Dec 21, 2025
722b873
Fix up url
gkjohnson Dec 21, 2025
7ec5d31
Add an animation to projection demo
gkjohnson Dec 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 36 additions & 10 deletions example/r3f/projection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,38 @@ import { LineSegmentsGeometry } from 'three/examples/jsm/lines/LineSegmentsGeome

const tilesetUrl = 'https://raw.githubusercontent.com/NASA-AMMOS/3DTilesSampleData/master/msl-dingo-gap/0528_0260184_to_s64o256_colorize/0528_0260184_to_s64o256_colorize/0528_0260184_to_s64o256_colorize_tileset.json';

// construct a shape via geojson
const shape = [];
for ( let i = 0; i < 100; i ++ ) {
// Function to generate animated shape
function generateShape( rotation, amplitudeScale, target = null ) {

const x = Math.sin( Math.PI * 2 * i / 100 );
const y = Math.cos( Math.PI * 2 * i / 100 );
const len = Math.sin( 10 * 2 * Math.PI * i / 100 ) * 10 + 75;
if ( target === null ) {

shape.push( [ x * len, y * len ] );
target = new Array( 100 )
.fill()
.map( () => new Array( 2 ) );

}

for ( let i = 0; i < 100; i ++ ) {

const angle = Math.PI * 2 * i / 100;
const x = Math.sin( angle + rotation );
const y = Math.cos( angle + rotation );
const len = Math.sin( 10 * angle ) * 10 * amplitudeScale + 75;

target[ i ][ 0 ] = x * len;
target[ i ][ 1 ] = y * len;

}

return target;

}

const geojson = {
type: 'Feature',
geometry: {
type: 'Polygon',
coordinates: [ shape ],
coordinates: [ generateShape( 0, 1 ) ],
},
};

Expand Down Expand Up @@ -77,7 +92,7 @@ function Scene() {

}, [ boxMesh ] );

useFrame( () => {
useFrame( state => {

if ( overlay && boxMesh ) {

Expand All @@ -86,6 +101,18 @@ function Scene() {

}

if ( overlay ) {

// animate the geojson shape
const time = state.clock.getElapsedTime();
const rotation = time * Math.PI * 2.0 * 0.1;
const amplitudeScale = Math.sin( time * 5 );

generateShape( rotation, amplitudeScale, geojson.geometry.coordinates[ 0 ] );
overlay.imageSource.redraw();

}

} );

return (
Expand Down Expand Up @@ -127,7 +154,6 @@ function App() {

return (
<Canvas
frameloop='demand'
camera={ {
position: [ 0, 40, 35 ],
} }
Expand Down
56 changes: 43 additions & 13 deletions example/three/geojson.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading