All Projects → drawcall → Threejs Mesh Modifiers

drawcall / Threejs Mesh Modifiers

A Three.js mesh morph modifier

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Threejs Mesh Modifiers

Zalo.github.io
A home for knowledge that is hard to find elsewhere
Stars: ✭ 143 (-15.38%)
Mutual labels:  threejs
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-10.06%)
Mutual labels:  threejs
Vue Displacement Slideshow
A Vue.js 2.0 slideshow component working with Three.js
Stars: ✭ 165 (-2.37%)
Mutual labels:  threejs
Andromeda
This is a WebGL recreation of the popular music video Gorillaz - Andromeda.
Stars: ✭ 145 (-14.2%)
Mutual labels:  threejs
Geo Three
Tile based geographic world map visualization library for threejs
Stars: ✭ 146 (-13.61%)
Mutual labels:  threejs
Stickyimageeffect
A sticky image effect for a slideshow inspired by ultanoir's website.
Stars: ✭ 158 (-6.51%)
Mutual labels:  threejs
Ego
A lightweight decision making library for game AI.
Stars: ✭ 145 (-14.2%)
Mutual labels:  threejs
React Globe
Create beautiful and interactive React + ThreeJS globe visualizations with ease.
Stars: ✭ 167 (-1.18%)
Mutual labels:  threejs
Interactivelandscape
An exploration of an animated interactive landscape built with three.js.
Stars: ✭ 150 (-11.24%)
Mutual labels:  threejs
Patches
Patches is a visual programming editor for building WebVR and WebGL experiences.
Stars: ✭ 164 (-2.96%)
Mutual labels:  threejs
Jeelizfacefilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 2,042 (+1108.28%)
Mutual labels:  threejs
Three Ui
UI solution for Three.js
Stars: ✭ 149 (-11.83%)
Mutual labels:  threejs
Altspacesdk
Software Development Kit for AltspaceVR
Stars: ✭ 159 (-5.92%)
Mutual labels:  threejs
Ng Three Template
This is a basic template project to start with Angular 11.x and ThreeJS
Stars: ✭ 144 (-14.79%)
Mutual labels:  threejs
Threejs Sandbox
Set of experiments and extensions to THREE.js.
Stars: ✭ 163 (-3.55%)
Mutual labels:  threejs
Svelthree
Svelte components library for declarative construction of reactive and reusable three.js scene graphs utilizing three.js source in a slightly modified version.
Stars: ✭ 144 (-14.79%)
Mutual labels:  threejs
Texture Compressor
CLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in a KTX container.
Stars: ✭ 156 (-7.69%)
Mutual labels:  threejs
Expo Voxel
🎮🌳 Voxel Terrain made in React Native. ∛
Stars: ✭ 169 (+0%)
Mutual labels:  threejs
Threejs Path Flow
🐬🐟 ↶Mesh Deformation / Bending / Following on a Curve
Stars: ✭ 165 (-2.37%)
Mutual labels:  threejs
Portfolio
My personal portfolio website built using React and three js
Stars: ✭ 160 (-5.33%)
Mutual labels:  threejs

Threejs mesh modifiers

A Three.js mesh morph modifier, including nearly ten modifiers, such as Bend, Bloat, Noise, Skew and Taper, etc. It is very lightweight and simple to use, using it can give you unexpected results.

npm install three three.modifiers --save

Demo

These demos are real, you can click them! They contain the full code, too.

Modifiers

  • Bend – bends on object along an axis
  • Bloat – Bloats the mesh by forcing vertices out of specified sphere
  • Break
  • Cloth - displaces object vertices giving the effects of wind and gravity.
  • Noise – deforms an object in a random manner
  • Pivot - Pivot is a modifier that changes an object's pivot point.
  • Skew – skews an object along one or more axes
  • Taper - displaces object vertices on two axes in proportion to their position on the third axis.
  • Twist – twists the mesh around it’s center point
  • Wheel
  • UserDefined - the custom modifier

Installing

Insert script

Download the build at dist/modifiers.min.js and include it as a script tag in a web page. You must include three.js as well.

<script src="./js/three.min.js"></script>
<script src="./js/modifiers.min.js"></script>

Use npm package

Note you must also have three installed via npm.

import * as THREE from "three";
import {
  ModifierStack,
  Twist,
  Noise,
  Cloth,
  UserDefined,
  Taper,
  Break,
  Bloat,
  Vector3,
  ModConstant
} from "three.modifiers";

Usage

const modifier = new ModifierStack(mesh);

const bend = new Bend(1.5, 0.2, 0);
bend.constraint = ModConstant.LEFT;

const cloth = new Cloth(1, 0);
cloth.setForce(0.2, -0.2, -0.2);

const twist = new Twist(0);
twist.vector = new Vector3(0, 1, 0);

const taper = new Taper(1);
taper.setFalloff(0.1, 0.5);

modifier.addModifier(bend);
modifier.addModifier(cloth);
modifier.addModifier(twist);
modifier.addModifier(taper);

// animate func
function animate() {
  requestAnimationFrame(animate);
  renderer.render(scene, camera);
  // modifier.apply
  modifier && modifier.apply();
}

Document

It is the typescript version of the ActionScript engine AS3Dmod. You can find the documentation here.

Development and Build

// DEVELOPMENT MODE
npm install
npm run demo
// (vist http://localhost:8888/)

// PRODUCTION MODE
npm run build

License

This library is under the BSD License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].