Code Monkey home page Code Monkey logo

blender_threejs_template's Introduction

Blender Three.js Template

This is a template for creating Blender project in Three js. It includes a simple example of a cube with a texture and a video playing on a screen.

Requirements

  • Blender Project (glb/glTF Exporter)
  • Texture Cycle Rendered (make sure uv map is correct)

How Customise Objects

  • Replace roomModel.glb in static/assets with your own model
  • Replace bakedDay.png, bakedNight.png and bakedNeutral.png in static/assets with your own textures that have been baked in Blender

How Customise Screens

  • Replace screen.glb in static/assets with your own model
  • Replace video.mp4 in static/assets with your own video

How to Run

  • Run npm install to install dependencies
  • Run npm run dev to start the development server

Advanced Customisation

Customise Assets

  • Import all your assets into asset.js
  • Make sure the texture is labelled correctly
  • In Baked.js you can change the texture of each object by sequentially adding meshes, texture, material, and add to scene one by one

Customise Screens

  • In World.js you can add more screens by adding more screen objects in setScreens() function, by declare the model and video path

Customise Debug

  • You can create your own debug panel by adding more controls with this syntax
    if (this.debug) {
      this.debugFolder = this.debug.addFolder({
        title: 'Title',},
        expanded: [true/false],
      });
    }
    
  • In debug folder you can add more controls with this syntax
    this.debugFolder.addInput(
      this.object,
      'property',
      { label: 'Label', min: 0, max: 1, step: 0.01 }
    );
    

blender_threejs_template's People

Contributors

daf2a avatar

Watchers

 avatar

Forkers

bingqixuan

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.