Skip to content

Commit

Permalink
Remove DataStream.js
Browse files Browse the repository at this point in the history
  • Loading branch information
njibhu committed Sep 15, 2024
1 parent f89e7a3 commit 2736a9f
Show file tree
Hide file tree
Showing 148 changed files with 400 additions and 94,995 deletions.
29 changes: 0 additions & 29 deletions browser/.eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion browser/rollup.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = {
{ src: '../node_modules/three/examples/js/controls/OrbitControls.js', dest: './dist/static' },
{ src: '../node_modules/three/examples/js/exporters/OBJExporter.js', dest: './dist/static' },
{ src: '../node_modules/jquery/dist/jquery.js', dest: './dist/static' },
{ src: '../node_modules/DataStream.js/DataStream.js', dest: './dist/static' },
{ src: '../library/build/T3D.js', dest: './dist/static' },
{ src: '../library/build/T3D.js.map', dest: './dist/static' },
{ src: '../parser/build/t3d-parser.js', dest: './dist/static' },
Expand Down
1 change: 0 additions & 1 deletion browser/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<body>
<div id="layout" style="width: 100%; height: 100%"></div>
<script src="./static/jquery.js"></script>
<script src="./static/DataStream.js"></script>
<script src="./static/three.js"></script>
<script src="./static/PointerLockControls.js"></script>
<script src="./static/OrbitControls.js"></script>
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default [
...globals.node,
Stats: "readonly",
THREE: "readonly",
DataStream: "readonly",
T3D: "writable",
$: "readonly",
w2ui: "readonly",
Expand Down
30 changes: 0 additions & 30 deletions examples/.eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion examples/rollup.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = [
{ src: '../node_modules/three/examples/js/controls/OrbitControls.js', dest: 'dist/static' },
{ src: '../node_modules/three/examples/js/exporters/OBJExporter.js', dest: 'dist/static' },
{ src: '../node_modules/jquery/dist/jquery.js', dest: 'dist/static' },
{ src: '../node_modules/DataStream.js/DataStream.js', dest: 'dist/static' },
{ src: '../library/build/T3D.js', dest: 'dist/static' },
{ src: '../library/build/T3D.js.map', dest: 'dist/static' },
{ src: '../parser/build/t3d-parser.js', dest: 'dist/static' },
Expand Down
2 changes: 1 addition & 1 deletion examples/src/MapExplorer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
<p id="keys">Move: W/A/S/D - Tilt: Q/E - Up: R - Down: F - Look: Press mouse / Arrow keys</p>
</div>
<script src="../static/jquery.js"></script>
<script src="../static/DataStream.js"></script>
<script src="../static/three.js"></script>
<script src="../static/stats.min.js"></script>
<script src="../static/FlyControls.js"></script>
<script src="../static/t3d-parser.js"></script>
<script src="../static/T3D.js"></script>
<script type="text/javascript" src="./index.js"></script>
</body>
Expand Down
3 changes: 1 addition & 2 deletions examples/src/MapExplorer/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ class AppRenderer {
// Cache mapFile for later use
if (parseInt(this.mapData.id)) {
this.localReader.loadFile(this.mapData.id, (arrayBuffer) => {
const ds = new DataStream(arrayBuffer, 0, DataStream.LITTLE_ENDIAN);
this.mapData.mapFile = new T3D.GW2File(ds, 0);
this.mapData.mapFile = new FileParser(arrayBuffer);

Check failure on line 153 in examples/src/MapExplorer/renderer.js

View workflow job for this annotation

GitHub Actions / lint

'FileParser' is not defined
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/MapScan/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<p class="logs"></p>
<p class="fileList"></p>
<script src="../static/jquery.js"></script>
<script src="../static/DataStream.js"></script>
<script src="../static/t3d-parser.js"></script>
<script src="../static/T3D.js"></script>
<script src="./index.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion examples/src/ModelRenderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ <h1>Single Model Render</h1>
</p>
<div id="log"></div>
<script src="../static/jquery.js"></script>
<script src="../static/DataStream.js"></script>
<script src="../static/three.js"></script>
<script src="../static/OrbitControls.js"></script>
<script src="../static/t3d-parser.js"></script>
<script src="../static/T3D.js"></script>
<script type="text/javascript" src="./index.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion examples/src/SimpleMapRenderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ <h1>Simple Map Render</h1>

<div id="log"></div>
<script src="../static/jquery.js"></script>
<script src="../static/DataStream.js"></script>
<script src="../static/three.js"></script>
<script src="../static/OrbitControls.js"></script>
<script src="../static/t3d-parser.js"></script>
<script src="../static/T3D.js"></script>
<script type="text/javascript" src="./index.js"></script>
</body>
Expand Down
3 changes: 1 addition & 2 deletions examples/src/SimpleMapRenderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ function onRendererDone(context) {
function loadMapFile(fileId, callback) {
if (parseInt(fileId)) {
mapRenderer.localReader.loadFile(fileId, function (arrayBuffer) {
const ds = new DataStream(arrayBuffer, 0, DataStream.LITTLE_ENDIAN);
const mapFile = new T3D.GW2File(ds, 0);
const mapFile = new FileParser(arrayBuffer);

Check failure on line 190 in examples/src/SimpleMapRenderer/index.js

View workflow job for this annotation

GitHub Actions / lint

'FileParser' is not defined
callback(mapFile);
});
}
Expand Down
29 changes: 0 additions & 29 deletions experiments/.eslintrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions experiments/rollup.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ module.exports = {
{ src: '../node_modules/three/examples/js/exporters/OBJExporter.js', dest: 'dist/static' },
{ src: '../node_modules/three/examples/js/exporters/GLTFExporter.js', dest: 'dist/static' },
{ src: '../node_modules/jquery/dist/jquery.js', dest: 'dist/static' },
{ src: '../node_modules/DataStream.js/DataStream.js', dest: 'dist/static' },
{ src: '../library/build/T3D.js', dest: 'dist/static' },
{ src: '../library/build/T3D.js.map', dest: 'dist/static' },
{ src: '../parser/build/t3d-parser.js', dest: 'dist/static' },
{ src: '../parser/build/t3d-parser.js.map', dest: 'dist/static' },
],
}),
],
};
};
2 changes: 1 addition & 1 deletion experiments/src/collision-exporter.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ <h1>Maps Collisions GLTF exporter</h1>

<div id="log"></div>
<script src="./static/jquery.js"></script>
<script src="./static/DataStream.js"></script>
<script src="./static/three.js"></script>
<script src="./static/OrbitControls.js"></script>
<script src="./static/GLTFExporter.js"></script>
<script src="./static/t3d-parser.js"></script>
<script src="./static/T3D.js"></script>
<script type="text/javascript" src="./js/collision-exporter.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion experiments/src/js/local-reader-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $("#filePicker").change(function (evt) {
await Promise.all(
myFiles.map((elt) =>
localReader.readFile(elt.mftId).then((r) => {
myFilesData[elt.mftId] = new T3D.GW2File(new DataStream(r.buffer), 0);
myFilesData[elt.mftId] = new FileParser(r.buffer);

Check failure on line 15 in experiments/src/js/local-reader-v2.js

View workflow job for this annotation

GitHub Actions / lint

'FileParser' is not defined
console.log("Done with", elt.mftId);
})
)
Expand Down
2 changes: 1 addition & 1 deletion experiments/src/local-reader-v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<input id="filePicker" type="file" />
</label>
<script src="./static/jquery.js"></script>
<script src="./static/DataStream.js"></script>
<script src="./static/three.js"></script>
<script src="./static/PointerLockControls.js"></script>
<script src="./static/t3d-parser.js"></script>
<script src="./static/T3D.js"></script>
<script src="./js/local-reader-v2.js"></script>
</body>
Expand Down
30 changes: 0 additions & 30 deletions explorer/.eslintrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions explorer/rollup.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module.exports = {
`../node_modules/three/examples/js/controls/PointerLockControls.js`,
`../node_modules/three/examples/js/libs/stats.min.js`,
`../node_modules/jquery/dist/jquery.js`,
`../node_modules/DataStream.js/DataStream.js`,
`../library/build/T3D.js`,
`../library/build/T3D.js.map`,
`../parser/build/t3d-parser.js`,
Expand All @@ -40,4 +39,4 @@ module.exports = {
].map(src => ({ src, dest: 'dist/static' })),
}),
],
};
};
3 changes: 1 addition & 2 deletions explorer/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ <h3>Contacts</h3>
T3D is powered by:
<a href="http://threejs.org/" target="_blank">three.js</a>
<a href="https://jquery.com/" target="_blank">jQuery</a>
<a href="https://github.com/kig/DataStream.js" target="_blank">DataStream.js</a>
</p>
<h3>ArenaNet copyright notice</h3>
<p>
Expand Down Expand Up @@ -183,11 +182,11 @@ <h3 id="loadingValue"></h3>
Third parties
-->
<script src="static/jquery.js"></script>
<script src="static/DataStream.js"></script>
<script src="static/three.js"></script>
<script src="static/FlyControls.js"></script>
<script src="static/OrbitControls.js"></script>
<script src="static/stats.min.js"></script>
<script src="static/t3d-parser.js"></script>
<script src="static/T3D.js"></script>

<!--
Expand Down
1 change: 0 additions & 1 deletion library/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default tseslint.config(
Atomics: "readonly",
SharedArrayBuffer: "readonly",
THREE: "readonly",
DataStream: "readonly",
T3D: "writable",
$: "readonly",
w2ui: "readonly",
Expand Down
1 change: 0 additions & 1 deletion library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"test": "exit 0"
},
"dependencies": {
"DataStream.js": "github:kig/DataStream.js",
"t3d-parser": "*",
"three": "0.123.0",
"vblob": "1.0.2",
Expand Down
7 changes: 5 additions & 2 deletions library/rollup.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ module.exports = {
file: './build/T3D.js',
format: 'iife',
name: 'T3D',
sourcemap: true
sourcemap: true,
globals: {
"t3d-parser": "T3DParser"
}
},
external: ["t3d-parser"],
plugins: [
resolve(),
commonjs(),
typescript(),
]
}
}
Loading

0 comments on commit 2736a9f

Please sign in to comment.