GithubHelp home page GithubHelp logo

krunkertoglb's Introduction

project is not released (yet)

but is bring worked on atm

bugs

  • positions
  • more...
 isProjectReleased = false
import * as THREE from "https:/threejs.org/build/three.module.js";
import {GLTFExporter} from "https://threejs.org/examples/jsm/exporters/GLTFExporter.js"
import {generateMap} from "https://hoodgail.github.io/krunkerToGlb/build/generateMap.module.js"

let mapJson = {
  name: "Test map",
  ambient: "#97a0a8",
  light: "#f2f8fc",
  sky: "#dce8ed",
  fog: "#8d9aa0",
  fogD: 2000,
  spawns: [[0, 0, 0, 0, 0, 0]],
  objects: [
    { p: [0, -10, 0], s: [100, 10, 100] },
    { p: [0, 0, -16], s: [12, 12, 12], i: 8 },
    { p: [0, 0, 27], s: [51, 15, 20], i: 7 },
    { p: [25, 0, 0], s: [3, 20, 10], i: 21 },
    { p: [-28, 0, 0], s: [5, 5, 5], i: 36 },
    { p: [-24, 0, -34], s: [65, 109, 54], i: 15 },
    { p: [16, 0, -28], s: [5, 5, 5], i: 34, l: 1 },
  ],
}

// to threejs scene
let map = generateMap(mapJson,{
  shadows:true
})

var exporter = new GLTFExporter();

exporter.parse( map, function ( gltb ) {
	console.log( gltb );
}, options );

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.