
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
babylonjs-mtoon-material
Advanced tools
[](https://badge.fury.io/js/babylon-mtoon-material) [](https://circleci.com/gh/virtual-cast/babylon-mt
Unity Santarh/MToon Shader WebGL porting to babylon.js.
Some settings will be ignored or generates inconsistent lighting.
babylon.js version | babylon-mtoon-material version |
---|---|
~4.0.0 | ^1.0.0 |
~4.1.0 | ^2.0.0 |
~4.2.0 | ^3.0.0 |
~5.0.0-rc.0 | ^4.0.0 |
^5.19.0 | ^5.0.0 |
These are not covered.
This material will be automatically assined to VRM/VCI model within babylon-vrm-loader.
Also you can explicitly assign MToonMaterial to any meshes.
Live preview at CodePen is here.
<!DOCTYPE html>
<html>
<head>
<title>Babylon.js MToon Material</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
</head>
<body>
<main id="wrapper">
<canvas id="renderCanvas"></canvas>
</main>
<script src="https://preview.babylonjs.com/babylon.max.js"></script>
<script src="https://unpkg.com/babylon-mtoon-material/dist/index.js"></script>
<script>
// example usage from https://github.com/BabylonJS/Babylon.js
const canvas = document.getElementById('renderCanvas');
const engine = new BABYLON.Engine(canvas, true, {preserveDrawingBuffer: true, stencil: true});
const scene = new BABYLON.Scene(engine);
const camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0, 5, -10), scene);
camera.setTarget(BABYLON.Vector3.Zero());
camera.attachControl(canvas, false);
new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0, 1, 0), scene);
const sphere = BABYLON.Mesh.CreateSphere('sphere1', 16, 2, scene, false, BABYLON.Mesh.FRONTSIDE);
sphere.position.y = 1;
// Assign MToonMaterial
sphere.material = new MToonMaterial('mat1', scene);
engine.runRenderLoop(function(){
scene.render();
});
window.addEventListener('resize', function(){
engine.resize();
});
</script>
</body>
</html>
$ npm install --save @babylonjs/core babylon-mtoon-material
// in index.js
import { Mesh } from '@babylonjs/core';
import { MToonMaterial } from 'babylon-mtoon-material';
// initializing
const sphere = BABYLON.Mesh.CreateSphere('Sphere', 16, 1, scene);
sphere.material = new MToonMaterial('MtoonMaterial', scene);
See CONTRIBUTING.md.
$ yarn install --frozen-lockfile
$ yarn build
$ yarn install --frozen-lockfile
$ yarn debug
You can see inspector on http://localhost:8080/
# executes tslint
$ yarn lint
# executes jest testing with puppetter
$ yarn test
see LICENSE.
This project uses babylon.js with Apache License, Version 2.0.
This project is based on MToon with MIT License.
FAQs
Refer to https://github.com/virtual-cast/babylon-mtoon-material
The npm package babylonjs-mtoon-material receives a total of 0 weekly downloads. As such, babylonjs-mtoon-material popularity was classified as not popular.
We found that babylonjs-mtoon-material demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.