Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New native webgl2 renderer #90

Open
wants to merge 95 commits into
base: next
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
163290d
Stash
sa2urami Mar 1, 2024
1175d3f
Working texture bindings
sa2urami Mar 5, 2024
06b2f3b
degrees_to_radians
sa2urami Mar 6, 2024
b28f69c
nice work by ilya
zardoy Mar 18, 2024
6e84db0
make cubes
zardoy Mar 20, 2024
253fb8a
move code around, +export
zardoy Mar 21, 2024
dee63df
Merge branch 'next' into webgl
zardoy Mar 21, 2024
024891c
add
zardoy Mar 21, 2024
73a5e9d
up render
zardoy Mar 21, 2024
2ee0ef3
pus render
zardoy Mar 21, 2024
027f5c6
up package json
sa2urami Mar 21, 2024
a1db77a
Merge remote-tracking branch 'upstream/next' into webgl
sa2urami Mar 21, 2024
ad5a906
fix things
sa2urami Mar 21, 2024
70c9686
insane instace shading
zardoy Mar 21, 2024
a682d4b
Instanced mashing with indexed texturing
zardoy Mar 21, 2024
b403ed4
fix build
zardoy Mar 22, 2024
c6c4ca8
almost ok for the app
zardoy Mar 22, 2024
9e26f70
add touch
zardoy Mar 24, 2024
c8e6475
fix textures
zardoy Mar 24, 2024
4133eca
dynamic entrypoint
zardoy Mar 24, 2024
b35bc08
Merge remote-tracking branch 'origin/next' into webgl
zardoy Mar 25, 2024
51ba0ea
put renderer into worker! viewerWrapper & perf cypress test
zardoy Mar 25, 2024
a329006
restore singleplayer
zardoy Mar 25, 2024
ce19459
up world
zardoy Mar 25, 2024
00b9683
fix worker output!
zardoy Mar 25, 2024
d0a6941
build workers
zardoy Mar 25, 2024
f329559
build worker correctly
zardoy Mar 25, 2024
a19c9ad
fix cam
zardoy Mar 25, 2024
7d5f1c5
worker part 2
zardoy Mar 27, 2024
506706e
fixed camera, coords, cam, textures, controls
zardoy Mar 28, 2024
a7313b3
insane ilya work by working hard (harder than usual)
zardoy Mar 28, 2024
f168bdb
up tasks
zardoy Mar 29, 2024
61d0ff4
up playground impl
zardoy Mar 29, 2024
5b78000
a bit better performance on blocks update - new struct
zardoy Mar 29, 2024
6275d78
compute index in worker: less lags
zardoy Mar 31, 2024
dc625b5
implement correct cubes update via subdata (faster new chunks add)
zardoy Mar 31, 2024
7b61ff6
fix worker build on win
zardoy Apr 3, 2024
11c04fb
implement removal, small impr
zardoy Apr 3, 2024
61a8a97
Multi textures
sa2urami Apr 3, 2024
e9ae586
Super Performant Multi Textures
sa2urami Apr 3, 2024
a75aeb0
Addon to last commit
sa2urami Apr 3, 2024
86f1b5e
add animation, impl texture indexes, fix perf
zardoy Apr 4, 2024
5951e14
fix stone display
zardoy Apr 5, 2024
d0501d3
atlas now with animated blocks!
zardoy Apr 5, 2024
984a208
almost working texture switch in playground
zardoy Apr 5, 2024
349edd1
undo l
zardoy Apr 5, 2024
16fdd37
better render debug
zardoy Apr 5, 2024
97a9e92
impl basic debug animation
zardoy Apr 5, 2024
8b6e1d2
make worldrenderer extendable and customizable with your own render i…
zardoy Apr 6, 2024
12dfa9f
implement fully working animation in playground
zardoy Apr 6, 2024
4c58f45
copy webgl data!
zardoy Apr 6, 2024
9fe0e34
minor render tweaks
zardoy Apr 6, 2024
17cd4bf
fix critical texture index bug
zardoy Apr 6, 2024
183f8e4
Fix texture buffer data type and usage in webglRendererWorker.ts
sa2urami Apr 6, 2024
7777307
fix critical performance scene render
zardoy Apr 6, 2024
31b419c
add tint
zardoy Apr 6, 2024
9f89af6
Add biome color support to fragment shader
sa2urami Apr 6, 2024
db722db
fix vercel preview deploy
zardoy Mar 25, 2024
c4d65ee
fix warps display for greenfield & click action
zardoy Mar 25, 2024
889987d
three shake three.js (#94)
zardoy Mar 25, 2024
48d3bbe
feat: effects + system indicators in hud! (#95)
gguio Mar 26, 2024
029a717
fix page loadeding indicator showing sometimes
zardoy Mar 27, 2024
dc9f15e
naive transparent
zardoy Apr 9, 2024
5476b39
Merge branch 'next' into webgl
zardoy Apr 9, 2024
484844b
add playground scripts!
zardoy Apr 9, 2024
c5c8f27
allow to override
zardoy Apr 9, 2024
28d55f9
reload on worker change
zardoy Apr 9, 2024
0edf51a
better workarounds!
zardoy Apr 9, 2024
de227f0
Merge remote-tracking branch 'origin/next' into webgl
zardoy Apr 9, 2024
469ef49
[pick] allow to set 0 render distance for debug
zardoy Apr 9, 2024
ed74485
Quad instanced rendreing
sa2urami Apr 9, 2024
2bc8439
Merge branch 'webgl' of https://github.com/sa2urami/prismarine-web-cl…
sa2urami Apr 9, 2024
e3205ed
prev commit fixes, fix bg, add reset
zardoy Apr 9, 2024
ff5ca18
KAVOfasdfasdf
sa2urami Apr 9, 2024
f970397
Merge branch 'webgl' of https://github.com/sa2urami/prismarine-web-cl…
sa2urami Apr 9, 2024
a5f0af8
[deploy] fix singleplayer
zardoy Apr 9, 2024
50efd76
workaround and potential fix
zardoy Apr 10, 2024
33d563c
fix action
zardoy Apr 10, 2024
324f070
fix playground
zardoy Apr 10, 2024
0cebd53
Triangle Strip
sa2urami Apr 10, 2024
40cda86
Merge branch 'webgl' of https://github.com/sa2urami/prismarine-web-cl…
sa2urami Apr 10, 2024
890afee
[pick] creative gamemode for ?singleplayer=1
zardoy Apr 10, 2024
bb8a841
implement buffer extend
zardoy Apr 10, 2024
a313c5f
new stats!
zardoy Apr 10, 2024
a3c414e
commit stats
zardoy Apr 10, 2024
4f9efb4
[wip] fixture export / loading!
zardoy Apr 10, 2024
830424e
[to pick] customize gamemode from menu!
zardoy Apr 11, 2024
a12ab1c
clean fix for image.width is undefined!
zardoy Apr 11, 2024
662c823
[pick] fix alias set
zardoy Apr 11, 2024
e9ca5cf
fix playground and slow cam move in worker
zardoy Apr 12, 2024
4e1257c
fix cam fixtup
zardoy Apr 12, 2024
6c5fdbd
another fixup for cam pos
zardoy Apr 12, 2024
3c4996f
impl removal, fix cam
zardoy Apr 14, 2024
137666c
FIX waitForChunksToRender ! fix a lot of worker issues! implement all…
zardoy Apr 14, 2024
c5e505f
last comments
zardoy May 25, 2024
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
Prev Previous commit
Next Next commit
dynamic entrypoint
zardoy committed Mar 24, 2024
commit 4133eca3a79aee6efe96d63e2d10ec617ac71e3b
6 changes: 4 additions & 2 deletions esbuild.mjs
Original file line number Diff line number Diff line change
@@ -11,7 +11,9 @@ import { build } from 'esbuild'
//@ts-ignore
try { await import('./localSettings.mjs') } catch { }

fs.writeFileSync('dist/index.html', fs.readFileSync('index.html', 'utf8').replace('<!-- inject script -->', '<script src="index.js"></script>'), 'utf8')
const entrypoint = 'index.ts'

fs.writeFileSync('dist/index.html', fs.readFileSync('index.html', 'utf8').replace('<!-- inject script -->', `<script src="${entrypoint.replace(/\.tsx?/, '.js')}"></script>`), 'utf8')

const watch = process.argv.includes('--watch') || process.argv.includes('-w')
const prod = process.argv.includes('--prod')
@@ -30,7 +32,7 @@ const buildingVersion = new Date().toISOString().split(':')[0]
/** @type {import('esbuild').BuildOptions} */
const buildOptions = {
bundle: true,
entryPoints: ['src/index.ts'],
entryPoints: [`src/${entrypoint}`],
target: ['es2020'],
jsx: 'automatic',
jsxDev: dev,