diff --git a/rapier3d/build_typescript.sh b/rapier3d/build_typescript.sh index 25e06159..89d0da22 100755 --- a/rapier3d/build_typescript.sh +++ b/rapier3d/build_typescript.sh @@ -1,3 +1,5 @@ +#! /bin/sh + mkdir -p ./pkg/src cp -r ../src.ts/* pkg/src/. rm -f ./pkg/raw.ts diff --git a/testbed3d/package-lock.json b/testbed3d/package-lock.json index f110096f..952b7089 100644 --- a/testbed3d/package-lock.json +++ b/testbed3d/package-lock.json @@ -31,6 +31,7 @@ } }, "../rapier3d": { + "name": "@dimforge/rapier3d", "dependencies": { "wasm-pack": "^0.12.1" }, diff --git a/testbed3d/src/demos/glbToTrimesh.ts b/testbed3d/src/demos/glbToTrimesh.ts index 1d4d00b0..724aabf0 100644 --- a/testbed3d/src/demos/glbToTrimesh.ts +++ b/testbed3d/src/demos/glbToTrimesh.ts @@ -1,6 +1,6 @@ -import type {Testbed} from "../Testbed"; -import {Vector3, Object3D, Mesh, BufferGeometry, BufferAttribute} from "three"; -import {GLTFLoader} from "three/examples/jsm/loaders/GLTFLoader"; +import type { Testbed } from "../Testbed"; +import { Vector3, Object3D, Mesh, BufferGeometry, BufferAttribute } from "three"; +import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; type RAPIER_API = typeof import("@dimforge/rapier3d"); export function initWorld(RAPIER: RAPIER_API, testbed: Testbed) { @@ -19,7 +19,7 @@ export function initWorld(RAPIER: RAPIER_API, testbed: Testbed) { let loader = new GLTFLoader(); - loader.load("./sword.glb", (gltf) => { + loader.load("./suzanne_blender_monkey.glb", (gltf) => { gltf.scene.position.set(0, 1.2, 0); gltf.scene.scale.set(3, 3, 3); testbed.graphics.scene.add(gltf.scene); @@ -61,8 +61,8 @@ export function initWorld(RAPIER: RAPIER_API, testbed: Testbed) { testbed.setWorld(world); let cameraPosition = { - eye: {x: 10.0, y: 5.0, z: 10.0}, - target: {x: 0.0, y: 0.0, z: 0.0}, + eye: { x: 10.0, y: 5.0, z: 10.0 }, + target: { x: 0.0, y: 0.0, z: 0.0 }, }; testbed.lookAt(cameraPosition); } diff --git a/testbed3d/src/demos/glbtoConvexHull.ts b/testbed3d/src/demos/glbtoConvexHull.ts index 75c4d923..8b14aff4 100644 --- a/testbed3d/src/demos/glbtoConvexHull.ts +++ b/testbed3d/src/demos/glbtoConvexHull.ts @@ -1,4 +1,4 @@ -import type {Testbed} from "../Testbed"; +import type { Testbed } from "../Testbed"; import { Vector3, Object3D, @@ -7,7 +7,7 @@ import { BufferAttribute, TriangleStripDrawMode, } from "three"; -import {GLTFLoader} from "three/examples/jsm/loaders/GLTFLoader"; +import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; type RAPIER_API = typeof import("@dimforge/rapier3d"); export function initWorld(RAPIER: RAPIER_API, testbed: Testbed) { @@ -24,7 +24,7 @@ export function initWorld(RAPIER: RAPIER_API, testbed: Testbed) { let loader = new GLTFLoader(); - loader.load("./sword.glb", (gltf) => { + loader.load("./suzanne_blender_monkey.glb", (gltf) => { gltf.scene.position.set(0, 1.2, 0); gltf.scene.scale.set(3, 3, 3); testbed.graphics.scene.add(gltf.scene); @@ -61,8 +61,8 @@ export function initWorld(RAPIER: RAPIER_API, testbed: Testbed) { testbed.setWorld(world); let cameraPosition = { - eye: {x: 10.0, y: 5.0, z: 10.0}, - target: {x: 0.0, y: 0.0, z: 0.0}, + eye: { x: 10.0, y: 5.0, z: 10.0 }, + target: { x: 0.0, y: 0.0, z: 0.0 }, }; testbed.lookAt(cameraPosition); } diff --git a/testbed3d/static/suzanne_blender_monkey.glb b/testbed3d/static/suzanne_blender_monkey.glb new file mode 100644 index 00000000..6b8819b0 Binary files /dev/null and b/testbed3d/static/suzanne_blender_monkey.glb differ diff --git a/testbed3d/static/sword.glb b/testbed3d/static/sword.glb deleted file mode 100644 index e08d1bc0..00000000 Binary files a/testbed3d/static/sword.glb and /dev/null differ