diff --git a/src/configUIParams/globalSettings.ts b/src/configUIParams/globalSettings.ts index 3f2e6a1..0e9171d 100644 --- a/src/configUIParams/globalSettings.ts +++ b/src/configUIParams/globalSettings.ts @@ -41,19 +41,19 @@ export const globalSettings: ConfigUiParamsCategories[] = [ visible: "position", values: [ [ - -10, - 10, - 0 + -20, + 30, + -2 ], [ - -10, - 10, - 1 - ], - [ - -10, - 10, + -5, + 40, 5 + ], + [ + -20, + 70, + 42 ] ] }, @@ -67,7 +67,7 @@ export const globalSettings: ConfigUiParamsCategories[] = [ [ -360, 360, - 0 + -25 ], [ -360, @@ -99,19 +99,19 @@ export const globalSettings: ConfigUiParamsCategories[] = [ visible: "position", values: [ [ - -10, - 10, - 0 + -20, + 30, + -2 ], [ - -10, - 10, - 1 + -5, + 40, + 6 ], [ - -10, - 10, - 5 + -20, + 70, + 37 ] ] }, @@ -125,7 +125,7 @@ export const globalSettings: ConfigUiParamsCategories[] = [ [ -360, 360, - 0 + -60 ], [ -360, diff --git a/src/controllers/TestSceneC.ts b/src/controllers/TestSceneC.ts index 92f7c33..f41f0b4 100644 --- a/src/controllers/TestSceneC.ts +++ b/src/controllers/TestSceneC.ts @@ -1,10 +1,9 @@ -import { BoxGeometry, Mesh, MeshStandardMaterial, Vector3 } from "three"; import { ThreeC } from "./ThreeC"; import { InputC, JoystickC } from "@hitplay/playable_template"; export class TestSceneC { static init() { - this.createPrimitive(); + this.createMap(); // example of using InputC events InputC.onTouchDown.addDelegate((event) => { @@ -17,26 +16,18 @@ export class TestSceneC { // }); } - private static createPrimitive() { - const geometry = new BoxGeometry(1, 1, 1); - const material = new MeshStandardMaterial({ color: 0xcc0000 }); - const cube = new Mesh(geometry, material); + private static createMap() { + const map = ThreeC.getObject("map"); - const geometryPlane = new BoxGeometry(5, 0.1, 7); - const materialPlane = new MeshStandardMaterial({ color: 0xaaaaaa }); - const plane = new Mesh(geometryPlane, materialPlane); + // physics-only collision proxies exported alongside the visual meshes; hide them + map.traverse((child) => { + if (/collider/i.test(child.name)) { + child.visible = false; + } + }); - let planePosition = plane.position.clone(); + ThreeC.setShadowsStateForChildren(map, true, true); - ThreeC.setShadowsStateForChildren(cube, true, false); - - ThreeC.setShadowsStateForChildren(plane, false, true); - - plane.position.copy( - new Vector3(planePosition.x, planePosition.y - 0.5, planePosition.z - 1.5) - ); - - ThreeC.addToScene(cube); - ThreeC.addToScene(plane); + ThreeC.addToScene(map); } } diff --git a/src/resources/meshes/ZombiePunk_Map.glb b/src/resources/meshes/ZombiePunk_Map.glb new file mode 100644 index 0000000..e733f57 Binary files /dev/null and b/src/resources/meshes/ZombiePunk_Map.glb differ diff --git a/src/resources/meshes/meshes.ts b/src/resources/meshes/meshes.ts index 97c312f..402b258 100644 --- a/src/resources/meshes/meshes.ts +++ b/src/resources/meshes/meshes.ts @@ -1,14 +1,14 @@ -// import { ConvertToBase64WhenRelease } from "@hitplay/ads_common"; +import { ConvertToBase64WhenRelease } from "@hitplay/ads_common"; import { ConvertResourceType, Template3d } from "@hitplay/playable_template"; export const meshes : ConvertResourceType = { type: "mesh", resources: [ - // { - // name: "scene", - // value: ConvertToBase64WhenRelease("./SceneДombo.glb"), - // }, + { + name: "map", + value: ConvertToBase64WhenRelease("./ZombiePunk_Map.glb"), + }, ], loader: Template3d.meshLoader } \ No newline at end of file