https://github.com/utsuboco/blender_curve_export
https://github.com/utsuboco/blender_curve_export
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/utsuboco/blender_curve_export
- Owner: utsuboco
- Created: 2021-08-29T02:12:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-06T09:34:03.000Z (over 4 years ago)
- Last Synced: 2025-10-22T11:57:56.686Z (6 months ago)
- Language: Python
- Homepage: https://codesandbox.io/s/blender-threejs-curves-demo-c1fbh?file=/src/index.js
- Size: 14.6 KB
- Stars: 17
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blender curve threejs export
Used with an UI by [Blender_GLTF_Scripts](https://github.com/utsuboco/blender_gltf_scripts)
Will generate an es6 file with all the curves of your Blender scene, already formated for Threejs.
## Usage:
```jsx
import {curveA} from './BlenderFileName.curves'
const points = curveA()
console.log(points) // <-- [THREE.Vector3()]
const path = new CatmullRomCurve3(points)
```
## Template generated:
```jsx
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);
}
```