Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Blender curve threejs export

Used with an UI by Blender_GLTF_Scripts

Will generate an es6 file with all the curves of your Blender scene, already formated for Threejs.

Usage:

import {curveA} from './BlenderFileName.curves'

const points = curveA()
console.log(points) // <-- [THREE.Vector3()]
const path = new CatmullRomCurve3(points)

Template generated:

import * as THREE from 'three';

const format = () => {
  for (var i = 0; i < points.length; i++) {
    var x = points[i][0];
    var y = points[i][1];
    var z = points[i][2];
    points[i] = new THREE.Vector3(x, z, -y);
  }
  return points
}

export const curveA = () => {
  const points = [...] // <-- exported from blender
  return format(points);
}

export const curveB = () => {
  const points = [...] // <-- exported from blender
  return format(points);
}

Releases

Packages

Contributors

Languages