initial commit

This commit is contained in:
Mykyta Slobodianiuk
2026-06-02 18:10:09 +03:00
parent 34122811dd
commit 0003919f4c
25 changed files with 298 additions and 63 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.
Binary file not shown.
+9 -5
View File
@@ -1,14 +1,18 @@
// import { ConvertToBase64WhenRelease } from "@24tools/ads_common";
import { ConvertToBase64WhenRelease } from "@24tools/ads_common";
import { ConvertResourceType, Template3d } from "@24tools/playable_template";
export const meshes : ConvertResourceType = {
type: "mesh",
resources: [
// {
// name: "scene",
// value: ConvertToBase64WhenRelease("./SceneСombo.glb"),
// },
{
name: "scene",
value: ConvertToBase64WhenRelease("./ZombiePunk_Map.glb"),
},
{
name: "character",
value: ConvertToBase64WhenRelease("./ZombiePunk_Character.glb"),
},
],
loader: Template3d.meshLoader
}
+62
View File
@@ -0,0 +1,62 @@
import { BatchedRenderer, QuarksLoader, QuarksUtil } from "three.quarks";
import { Object3D, Euler, Vector3 } from "three";
import { ResourcesC, UpdateController } from "@24tools/playable_template";
import { ThreeC } from "../../ThreeC";
import { TimeC } from "../Timers/TimeC";
import { VFXType } from "../Enums/VFXType";
import { ResourcesType } from "../Enums/ResourcesType";
import { vfxTest } from "./RunTimeTest";
export class VfxManager {
static batchRenderer: BatchedRenderer;
static loader: QuarksLoader;
static Init() {
this.batchRenderer = new BatchedRenderer();
this.loader = new QuarksLoader();
ThreeC.addToScene(this.batchRenderer);
const updateDelegate = UpdateController.Instance.onUpdate.addDelegate(this.update.bind(this));
// GameTimer.onDelayGameEnd.addDelegate(() => UpdateController.Instance.onUpdate.removeListeners(updateDelegate));
// initTrailEffect();
}
static Remove(vfx: Object3D) {
vfx.removeFromParent();
vfx.parent = null;
}
static update(delta: number) {
delta *= TimeC.TimeScale;
this.batchRenderer.update(delta);
}
static Play(type: VFXType|string, parent: Object3D | null = null, position: Vector3 | null = null, rotation: Euler | null = null, scale: Vector3 | null = null, odred: number | null = null) {
let loaded = (ResourcesC.getResource(ResourcesType.VFX, type.toString()) as { obj: any }).obj;
if (!loaded) return new Object3D();
// console.error("Type non loaded " + loaded);
const effect = loaded.clone(true) as Object3D;
QuarksUtil.setAutoDestroy(effect, true);
QuarksUtil.addToBatchRenderer(effect, this.batchRenderer);
if (parent) parent.add(effect)
else ThreeC.addToScene(effect);
if (position) effect.position.copy(position);
if (rotation) effect.rotation.copy(rotation);
if (scale) effect.scale.copy(scale);
if (odred) effect.renderOrder = odred;
return effect;
}
static StopEmision(effect: Object3D) {
QuarksUtil.stop(effect);
}
static Restart(effect: Object3D) {
QuarksUtil.play(effect);
}
static Pause(effect: Object3D) {
QuarksUtil.pause(effect);
}
}
File diff suppressed because one or more lines are too long