All Projects → webgl → three-musketeers

webgl / three-musketeers

Licence: other
A simple module to introspect, debug and test any THREE.js application.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to three-musketeers

react-with-threejs-example
An example project integrating React with three.js
Stars: ✭ 27 (-10%)
Mutual labels:  threejs, three-js, three
revit-family-web-viewer
Revit Web Viewer is a Three.js-based project viewer. Revit projects / families must be exported using RvtVa3cExporter (https://github.com/va3c/RvtVa3c)
Stars: ✭ 48 (+60%)
Mutual labels:  threejs, three-js
karate
Test Automation Made Simple
Stars: ✭ 6,384 (+21180%)
Mutual labels:  testing-tools, automated-testing
software-testing-resource-pack
Various files useful for manual testing and test automation etc.
Stars: ✭ 38 (+26.67%)
Mutual labels:  testing-tools, e2e-testing
three-js-fundamentals-r3f
Examples from the Three.js Fundamentals website recreated in react-three-fiber renderer.
Stars: ✭ 84 (+180%)
Mutual labels:  threejs, three-js
THREE.InfiniteGridHelper
Infinite anti-aliased grid.
Stars: ✭ 101 (+236.67%)
Mutual labels:  threejs, three-js
quasar-testing
Testing Harness App Extensions for the Quasar Framework 1.0+
Stars: ✭ 142 (+373.33%)
Mutual labels:  unit-testing, e2e-testing
three-platformize
一个让 THREE 平台化的项目,目前已适配微信,淘宝,头条小程序,微信小游戏
Stars: ✭ 418 (+1293.33%)
Mutual labels:  threejs, three
three-vue-pattern
A biofeedback visualization made with Three.js, Vue, and LUIS (cognitive services), made with Brian Holt
Stars: ✭ 97 (+223.33%)
Mutual labels:  threejs, three
jest-teamcity
Jest Teamcity Reporter
Stars: ✭ 29 (-3.33%)
Mutual labels:  unit-testing, testing-tools
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (+36.67%)
Mutual labels:  unit-testing, testing-tools
gamedex
👾 The code for my game dev + computer graphics experiments on YouTube.
Stars: ✭ 165 (+450%)
Mutual labels:  threejs, three-js
ng-three-examples
three.js examples in Angular 2
Stars: ✭ 24 (-20%)
Mutual labels:  threejs, three-js
spacesvr
A standardized reality for the future of the 3D Web.
Stars: ✭ 135 (+350%)
Mutual labels:  threejs, three
generative-art
🌈🎨 Generative Art is the idea realized as genetic code of artificial events, as construction of dynamic complex systems able to generate endless variations. This is also a nuxt-module (@luxdamore/nuxt-canvas-sketch) - [three.js, tensorflow.js and gsap are not included].
Stars: ✭ 41 (+36.67%)
Mutual labels:  threejs, three-js
EduSmart
It utilizes 3D, Augmented reality to give real-life simulations or feels of various models and make the learning process more impactful and fascinating. With an interactive live feature, students can ask the teacher their doubts instantly and also discuss.
Stars: ✭ 23 (-23.33%)
Mutual labels:  threejs, three-js
lvr
👓 Augmented Reality for everyone - Out of the world experiences
Stars: ✭ 92 (+206.67%)
Mutual labels:  threejs, three-js
three-csg-ts
CSG library for use with THREE.js
Stars: ✭ 312 (+940%)
Mutual labels:  threejs, three-js
Manim.three.js
A web compatible html5 canvas based mathematical rendering engine like the manim by 3b1b
Stars: ✭ 14 (-53.33%)
Mutual labels:  threejs, three-js
api-test
🌿 A simple bash script to test JSON API from terminal in a structured and organized way.
Stars: ✭ 53 (+76.67%)
Mutual labels:  testing-tools, automated-testing

three musketeers

Build Status npm

"All for one. One for all."

This module serves as an intuitive tool to introspect, debug and test any THREE.js application.

GitHubDocumentationExamplesDemo

Demo

IMAGE ALT TEXT HERE

Usage

Download the minified library and include it in your HTML, or install and import it as a npm module.

$ npm i three-musketeers

The code below creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a WebGL renderer for the scene and camera, and it adds that viewport to the document.body element. Finally, it animates the cube within the scene for the camera.

Lastly, we simply pass the necessary resources to the musketeers instance and attach it to our window via the alias $$$ for experimentation:

// sample application
import * as THREE from 'three';
import musketeers from 'three-musketeers';

init();

function init() {
  const { innerWidth, innerHeight } = window;
  const scene = new THREE.Scene();

  const renderer = new THREE.WebGLRenderer({ antialias: true });
  renderer.setSize(innerWidth, innerHeight);
  document.body.appendChild(renderer.domElement);

  const camera = new THREE.PerspectiveCamera(70, innerWidth / innerHeight, 0.01, 10);
  camera.position.z = 1;
  scene.add(camera);

  const mesh = new THREE.Mesh(
    new THREE.BoxGeometry(0.2, 0.2, 0.2),
    new THREE.MeshBasicMaterial({ color: 0xFF0000 })
  );
  // assign a unique name to our mesh to be able to query it later
  mesh.name = 'CUBE_1';
  scene.add(mesh);

  renderer.render(scene, camera);

  // attach $$$ to the window for browser debugging
  window.$$$ = musketeers({ renderer, scene, camera });
}

Now, you can inspect the scene through the window object:

// javascript console in the browser

$$$
.debug() // enable visual debug mode
.isValid(); // true
$$$
.find('Cube_1') // the unique identifier we assigned to our mesh
.exists(); // true
$$$
.findAll((node) => node.geometry.type === 'BoxGeometry') // returns an array of items of this type
$$$
.find('Cube_1')
.click(); // locates the item in the 3D scene and clicks the item
window.addEventListener('click', (event) => {
  // find all intersected items on 'click'
  const intersectedItems = $$$.pickFromEvent(event);
  console.log(intersectedItems); // useful for debugging
});

Check out the documentation for more details. You can also check out the example testing a 3D application with selenium.

# running and testing the example 3d application

$ npm run selenium
$ npm run start
$ npm run test:e2e

Contribute

I welcome contributors. Please contribute if you have ideas to improve this library. Please use GitHub's pull request and issues features. You can also help implement upcoming features from the TODO page. Feel free to reach out if you'd like more context or info for implementation details.

Here are a few scripts to help you get started:

NPM Commands Description
start Runs the examples for development
test Runs unit tests for the module
build Builds the module
docs Updates the documentation
components Updates the component entry points
selenium Runs selenium
test:e2e Runs e2e automated testing for the examples as an example

Other Resources

Three.js QuestionsThree.js ForumThree.js GitterThree.js Slack

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].