0.0.19 • Published 11 months ago

dve-plugins-player v0.0.19

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

A player addon for DVE.

Render Thread

import { CreateBox } from "@babylonjs/core/Meshes/Builders/boxBuilder.js";
import { EdgesRenderer } from "@babylonjs/core/Rendering/edgesRenderer.js";
import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial.js";
import { INIT_RENDER_PLAYER } from "dve-plugins-player/Render/";
import { DVER } from "divine-voxel-engine/Render";
//init DVER beforehand

const player = await INIT_RENDER_PLAYER(
  scene,
  camera,
  DVER,
  {
    CreateBox,
    EdgesRenderer,
    StandardMaterial,
  },
  playerModel
);

player.controls.mouse.left.down.add(() => {
//add controls
});
player.controls.mouse.right.down.add(() => {
//add controls
});

World Thread

import { DVEW } from "divine-voxel-engine/World";
import { INIT_WORLD_PLAYER } from "dve-plugins-player/World";
await DVEW.$INIT();
const player = await INIT_WORLD_PLAYER(DVEW);
setInterval(()=>{
    player.update();
},17)

Nexus Thread

import { DVEN } from "divine-voxel-engine/Nexus";
import {INIT_NEXUS_PLAYER} from "dve-plugins-player/Nexus"
await DVEN.$INIT();
const player = await INIT_NEXUS_PLAYER(DVEN);
player.setPosition(0,200,0);
setInterval(()=>{
    player.update();
},17)
0.0.15

11 months ago

0.0.16

11 months ago

0.0.17

11 months ago

0.0.18

11 months ago

0.0.19

11 months ago

0.0.14

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago