Skip to content

Commit

Permalink
replace webpack dev by vite
Browse files Browse the repository at this point in the history
  • Loading branch information
frading committed Nov 6, 2023
1 parent 25064f1 commit 4e7577e
Show file tree
Hide file tree
Showing 25 changed files with 74,279 additions and 295 deletions.
19 changes: 19 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Polygonjs Dev</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.18.0.css" />
</head>
<body>
<div style="position: relative; background-color: white; padding: 5px; z-index: 999">
<a href="/?testBatchId=0&hidepassed">BATCH 0</a>
<a href="/?testBatchId=1&hidepassed">BATCH 1</a>
</div>
<div id="app"></div>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script type="module" src="/tests/index.ts"></script>
</body>
</html>
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"main": "./dist/src/engine/index_all.js",
"sideEffects": false,
"scripts": {
"start": "webpack-dev-server --env NODE_ENV=development --env production=false --config config/webpack/dev.js",
"start": "vite",
"build": "export NODE_OPTIONS='--max-old-space-size=32768' yarn build_folder_delete && yarn build_with_webpack && yarn build_with_esbuild && yarn build_folder_remove_unneeded && yarn copy_threejs_examples_to_dist && yarn copy_occt_wasm_to_dist && yarn copy_xatlas_wasm_to_dist",
"build_fast": "export NODE_OPTIONS='--max-old-space-size=32768' yarn build_folder_delete && yarn build_with_webpack_fast && yarn build_with_esbuild && yarn build_folder_remove_unneeded && yarn copy_threejs_examples_to_dist",
"build_with_webpack": "webpack --env NODE_ENV=production --env production --progress --config config/webpack/prod.js && yarn renameMJS",
Expand Down Expand Up @@ -84,8 +84,8 @@
"three-subdivide": "1.1.2",
"tone": "14.7.77",
"web-ifc-three": "0.0.125",
"xatlas-web": "0.1.0",
"xatlas-three": "0.2.0",
"xatlas-web": "0.1.0",
"yuka": "^0.7.8"
},
"devDependencies": {
Expand Down Expand Up @@ -118,6 +118,8 @@
"ts-shader-loader": "2.0.2",
"tslib": "2.6.2",
"typescript": "5.2.2",
"vite": "4.4.5",
"vite-plugin-string": "1.2.2",
"webpack": "5.76.0",
"webpack-bundle-analyzer": "4.5.0",
"webpack-cli": "4.9.2",
Expand Down
49 changes: 26 additions & 23 deletions public/three/js/libs/draco/draco_decoder.js

Large diffs are not rendered by default.

Binary file modified public/three/js/libs/draco/draco_decoder.wasm
Binary file not shown.
246 changes: 117 additions & 129 deletions public/three/js/libs/draco/draco_wasm_wrapper.js

Large diffs are not rendered by default.

36 changes: 19 additions & 17 deletions public/three/js/libs/draco/gltf/draco_decoder.js

Large diffs are not rendered by default.

Binary file modified public/three/js/libs/draco/gltf/draco_decoder.wasm
Binary file not shown.
235 changes: 116 additions & 119 deletions public/three/js/libs/draco/gltf/draco_wasm_wrapper.js

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions public/three/js/libs/ktx2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Basis Universal GPU Texture Compression

Basis Universal is a "[supercompressed](http://gamma.cs.unc.edu/GST/gst.pdf)"
GPU texture and texture video compression system that outputs a highly
compressed intermediate file format (.basis) that can be quickly transcoded to
a wide variety of GPU texture compression formats.

[GitHub](https://github.com/BinomialLLC/basis_universal)

## Transcoders

Basis Universal texture data may be used in two different file formats:
`.basis` and `.ktx2`, where `ktx2` is a standardized wrapper around basis texture data.

For further documentation about the Basis compressor and transcoder, refer to
the [Basis GitHub repository](https://github.com/BinomialLLC/basis_universal).

The folder contains two files required for transcoding `.basis` or `.ktx2` textures:

* `basis_transcoder.js` — JavaScript wrapper for the WebAssembly transcoder.
* `basis_transcoder.wasm` — WebAssembly transcoder.

Both are dependencies of `THREE.KTX2Loader` and `THREE.BasisTextureLoader`:

```js
var ktx2Loader = new THREE.KTX2Loader();
ktx2Loader.setTranscoderPath( 'examples/js/libs/basis/' );
ktx2Loader.detectSupport( renderer );
ktx2Loader.load( 'diffuse.ktx2', function ( texture ) {

var material = new THREE.MeshStandardMaterial( { map: texture } );

}, function () {

console.log( 'onProgress' );

}, function ( e ) {

console.error( e );

} );
```

## License

[Apache License 2.0](https://github.com/BinomialLLC/basis_universal/blob/master/LICENSE)
21 changes: 21 additions & 0 deletions public/three/js/libs/ktx2/basis_transcoder.js

Large diffs are not rendered by default.

Binary file added public/three/js/libs/ktx2/basis_transcoder.wasm
Binary file not shown.
Binary file added public/three/js/libs/manifold/manifold.wasm
Binary file not shown.
Binary file added public/three/js/libs/occt/polygonjs-occt.wasm
Binary file not shown.

0 comments on commit 4e7577e

Please sign in to comment.