• Stars
    star
    198
  • Rank 196,898 (Top 4 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

chrome devtool extension to debug three.js

Three.js Inspector

three.js inspector is an extension for chrome devtool. It allows you to inspect the three.js scene in a web page. You can install three.js Inspector from chrome webstore.

It is a fork from WebGL GLSL Shader Editor Extension for Google Chrome by the excelent @thespite. Check it out!

How to be sure the extension find your scene

  • export your THREE.Scene as a scene global variable
    • typically window.scene = scene;
  • export THREE as a THREE global variable when using module bundler
    • typically window.THREE = THREE
  • press 'refresh' button to refresh the scene

YES we are looking for a better way to do it :)

How to install three.js inspector locally

You can install the extensions directly from the chrome store

three.js inspector chrome extension

copy the repo files to your computer and launch the extension as a developer. Follow those steps:

  • copy the repository files - zip
  • Goto the Chrome's Extensions page : Settings -> More tools -> Extensions
  • Enable Developer Mode
  • Click on "Load unpacked extension"...
  • Select the folder /src in the checked out project

History 1.9.12

  • Support of AFrame page (thanks @msfeldstein)
  • Added inspection for uniforms when using THREE.ShaderMaterial
  • inspector able to display canvas/video texture

History 1.9.10

  • Fixed bug in texture drapdrop/file: just a typo in a varname
  • added a 'Examples' tab to easily access three.js examples
    • nice for discovery and learning
  • Added notification when devtools is open and three.js inspector is reloaded
    • thus developper knows and don't assume the inspector will be working
    • But it is very useful when developping three.js inspector :)
    • This case doesn't happen for the actual user

History 1.9.8

  • recapture the scene automatically if object are added to it
    • overloading Object3D.prototype.add/Object3D.prototype.remove
  • Handle large image texture
    • no more issue with "too long url"

History 1.9.6

  • better detection of the inspected window
    • detect when the inspected window is reloaded, and reinject the script
  • added a timer to count the time since the last scene update
  • detect when running in production and disable debug feature when not in development
  • reenabled shadermaterial with uniforms tuning
  • reenable texture image tunning, export+drag drop from desktop

History 1.9.0

This version is all about a total refactor of the devtools <-> extension part.

the previous version was copied and was quite messy. It had race-conditions issues during the start. So the extension would not start on some computers.

i rewrote the whole devtool <-> extension. It is quite a chalenge in itself :) more details at https://developer.chrome.com/extensions/devtools .

To give you an idea,

  • threejs-inspector needs 4 webpages, and establish messages communication between them.
  • It handle 2 javascript VM in the inspected page
  • Chosen quote from the docs: "Your message will now flow from the injected script, to the content script, to the background script, and finally to the DevTools page."
    • and this is how every message is going thru all this :)

Yeah definitly, to code a devtools extension could be simpler. i hope this version will be more manageable. Dont hesitate to report any issue on github.

History 1.2.9

  • better css for inline link to three.js help
  • added console.dir when exporting objects to console
  • added export-to-console for texture
  • added support for texture in uniforms

History 1.2.8

  • added support material.magFilter and material.minFilter
  • added support for spriteMaterial.rotation
  • support for material.uniforms texture and integer
  • handled material.bumpScale
  • pointCloudmaterial material.size/material.sizeAttenuation
  • able to fully stop requestAnimationFrame in setting tabs

History 1.2.7

  • started refactoring the scene grabbing
  • added requestAnimationFrame force rate in setting tabs
  • added 'purge obsolete objects' in treeview popup menu - better scene capture
  • source cleanup

History 1.2.5

  • added a popup menu in scene-brower
  • ability to manually content scripts - more robust
  • improved tab css for visibility
  • added 'inject in three.js' in treeview popup menu - better scene capture
    • find a demo without working well
  • massive cleanup of the scene capture code
  • added range limit to material.opacity
  • added ability to create a texture from material popup menu
  • added export-in-console for material and geometry
  • added upload support for texture
  • added dragdrop support for texture
  • added "about" tab
  • added texture.sourceFile it is now possible to change texture
    • texture needs to be on a CORS server
  • added 'visibility toggle'/'export to console' and better css on treeview
  • added an object is now relative to the selected parent
    • better controls over the scene tree when you build something
  • added support for face material
    • take the lightmap example in three.js
  • added texture.anisotropy
    • take the anisotropy demo
  • added texture handling
    • demo: move texture repeat + offset + wrapS/wrapT. find a good demo for that
  • added help button linking to three.js documentation
    • good for learning
  • added object3d.castShadow / receiveShadow
  • added material.shadding
  • added left/right/top/bottom for ortho camera
  • fixed Sprites crash + castShadow support
  • added viewVertices + viewFaces in geometry menu
  • added a Config.js and save autoRefresh
  • added bounding sphere in geometry
  • added linewidth, dashSize in material
    • demo of a line example
  • added auto refresh to on by default
  • fixed bug in case of typedGeometry, PointCloud
  • 'export in console' in object3d inspector popup menu
    • demo: show an object, move it thru inspector, then export it, and change $3js position in console
  • implemented a tab for setting
    • show it
  • added autoRefresh setting to periodically refresh the inspector
  • added the 'no' panels for a better visibility in the UI
    • simply show it with a object3d selected and without
  • uniform live tuning for shader material
    • demo bubble fresnel
  • implemented better number tuning with the mouse.
    • if shift is pressed, it goes 10 times faster
    • it meta is pressed, it goes 100 times faster
    • if shift+meta are pressed, it goes 1000 times faster

How To Release

  • search /src for the previous version number
  • change the version number to even patch number e.g. 1.2.2
  • do make packageExtension to build the src.zip
  • upload the src.zip at https://chrome.google.com/webstore/developer/edit/dnhjfclbfhcbcdfpjaeacomhbdfjbebi?hl=en
  • click 'Publish Changes'
  • do make cleanExtension to build the src.zip
  • make the patch number as odd in /src, by replacing all instance of version number
  • add a line in README.md Changelog

More Repositories

1

AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
HTML
15,786
star
2

jquery-qrcode

qrcode generation standalone (doesn't depend on external services)
JavaScript
4,801
star
3

microevent.js

event emitter microlibrary - 20lines -for node and browser
JavaScript
832
star
4

tquery

extension system for three.js
AGS Script
651
star
5

webaudiox

helpers for WebAudio API
JavaScript
440
star
6

threejsboilerplate

Boilerplate for three.js on desktop and mobile
418
star
7

virtualjoystick.js

a virtual joystick library to emulate a joystick on touch screen in javascript
JavaScript
409
star
8

threex

Game Extensions for three.js
HTML
330
star
9

threex.webar

three.js extensions for Augmented Reality
JavaScript
313
star
10

threex.planets

three.js extension for planets from
JavaScript
251
star
11

threex.domevents

three.js extension which provide dom events inside your 3d scene.
JavaScript
245
star
12

threex.geometricglow

a three.js extension to make any object glow at geometric level
JavaScript
203
star
13

jquery-mobile-960

960 grid on jquery-mobile
JavaScript
172
star
14

better.js

a better javascript in javascript
JavaScript
156
star
15

EasyWebsocket

like Websocket but no server setup and available in any browser
JavaScript
150
star
16

fireworks.js

Particles engine in javascript
JavaScript
147
star
17

threex.proceduralcity

a procedural city generator for three.js based on mrdoob demo
JavaScript
138
star
18

threex.htmlmixer

three.js extension to seemlessly integrate dom elements in your webgl
JavaScript
119
star
19

threex.volumetricspotlight

three.js extension to provide a volumetric spot light
HTML
117
star
20

arplayerforthreejs

Augmented Reality Player For Three.js
HTML
115
star
21

electron-threejs-example

Transparent three.js examples on top of electron
HTML
104
star
22

MicroCache.js

micro library to handle in-memory cache (works in node+browser)
JavaScript
100
star
23

webaudio.js

web audio library for games
JavaScript
98
star
24

augmentedgesture.js

augmented gesture in javascript
JavaScript
96
star
25

microphysics.js

micro physics 3D engine from Florian Bösch
JavaScript
95
star
26

threex.videotexture

three.js helper to display video texture.
JavaScript
84
star
27

threex.badtvpproc

three.js extension for a bad tv postprocessing
JavaScript
74
star
28

threex.rendererstats

get stats from three.js renderer
JavaScript
68
star
29

gowiththeflow.js

Async flow control micro library for node and browser
JavaScript
68
star
30

threex.laser

three.js extension provide a laser-like display
JavaScript
66
star
31

threex.dynamictexture

three.js helper to handle dynamically generated texture.
HTML
61
star
32

threex.terrain

three.js extension to generate perlin terrain
JavaScript
58
star
33

threex.grass

three.js game extensions for fast grass.
JavaScript
55
star
34

threex.keyboardstate

three.js extension to keep the current state of the keyboard
HTML
53
star
35

threex.oimo

three.js extension for iomo.js physic library
JavaScript
47
star
36

AR.js-docs

documentation for AR.js
JavaScript
47
star
37

threex.windowresize

three.js extension to help you handle window resize
JavaScript
47
star
38

sparkseditor

editor for sparks.js with three.js
JavaScript
43
star
39

threex.bubble

three.js extension to easily create bubble
JavaScript
40
star
40

webglvideochat

WebGL Video Chat - a video chat in WebGL with WebRTC
JavaScript
37
star
41

threex.text

three.js extension to provide text
JavaScript
37
star
42

jsdoced.js

Test your javascript with jsdoc!
JavaScript
36
star
43

threex.md2character

three.js game extension for ratmahatta md2 character
JavaScript
34
star
44

demo.hatsunemiku-augmentedreality

hatsune mike dancing in augmented reality
HTML
33
star
45

threex.cloudgaming

cheap easy cloud gaming for three.js
JavaScript
33
star
46

threex.sslensflare

three.js extension to get screen space lens flare
JavaScript
31
star
47

threex.daynight

three.js extension for a day-night cycle
JavaScript
31
star
48

threejsboilerplatebuilder

boilerplate builder
HTML
30
star
49

threex.colliders

Three.js Game Extension to Handle Colliders
JavaScript
30
star
50

blockly-threex

a blockly able to do webgl thru three.js
JavaScript
29
star
51

threex.solidwireframe

three.js extension to have solid wireframe
JavaScript
29
star
52

dropinrequire.js

dropin replacement for require() in browser
JavaScript
28
star
53

threex.objcoord

three.js module to convert coordinates for 3d objects
HTML
28
star
54

console4Worker

console.* API for WebWorker
26
star
55

learningthreejs.com

blog about learning three.js
JavaScript
26
star
56

threex.vertexanimation

three.js extension to do vertex animation
JavaScript
26
star
57

tunnelgl

experimentation for a webgl tunnel
25
star
58

threex.spaceships

three.js extension to get spaceships
JavaScript
24
star
59

threex.transparency

extension to easily handle transparency in three.js
JavaScript
23
star
60

threex.ammo

library integrating three.js and ammo.js - to easily put physics in your 3d project
JavaScript
23
star
61

threex.cannonjs

a wrapper to ease access between cannon.js and three.js
JavaScript
22
star
62

learningthreejs.com-backup

blog about learning three.js
JavaScript
22
star
63

threex.universalloader

universal model loader for three.js
JavaScript
22
star
64

phantomjs-deb

deb for phantomjs
Shell
21
star
65

imageprocessing.js

Simple Image Processing in javascript
JavaScript
21
star
66

tquery.jsartoolkit

port of jsartoolkit on tquery
JavaScript
21
star
67

marbleSoccer

marble game for learningthreejs
JavaScript
19
star
68

startupthree.js

To easily start up three.js - perfect to get started on a three.js demo
JavaScript
19
star
69

threex.nyancat

three.js extension to make nyancat
JavaScript
18
star
70

threex.cubecamera

three.js extension for cube cameras
JavaScript
18
star
71

threex.minecraft

Build and animate characters with minecraft compatible skin
JavaScript
18
star
72

threex.depthoffield

three.js extension to provide a depth of field
17
star
73

threex-v0

old version of jeromeetienne/threex
JavaScript
17
star
74

webvr-experiments

experimenting with webvrv
JavaScript
16
star
75

threex.skymap

three.js extension to use the use of skymaps
JavaScript
16
star
76

slides

repo with my slides
JavaScript
15
star
77

stellar7

stellar7 game on top of three.js games
JavaScript
15
star
78

threex.grassground

three.js module to display a ground of grass
JavaScript
15
star
79

webglmeeting0

Simple WebGL application to do webrtc call.
JavaScript
14
star
80

threex.coloradjust

three.js extension which provides an color adjustement based on a 3d texture.
JavaScript
14
star
81

shorttag.js

javascript template engine - micro framework - 20 lines
JavaScript
14
star
82

acewidget

a widget which make ace trivial to embed in your pages
JavaScript
13
star
83

generator-threejs-boilerplate

yeoman generator for three.js boilerplate
JavaScript
13
star
84

threex.noiseshadermaterial

provides a THREE.ShaderMaterial preconfigured to display 3d noise.
JavaScript
13
star
85

threex.poolball

three.js extension to provide pool ball
JavaScript
13
star
86

threex.sportballs

three.js extension for sport balls model
12
star
87

phoneasdaydreamcontroller.js

Use your phone as a daydream controller
JavaScript
12
star
88

jsartoolkit-experiments

Example of jsartoolkit and three.js
HTML
12
star
89

babel-plugin-jsdoced

babel plugin which use jsdoc to implement strong typing in javascript
JavaScript
11
star
90

flying-spaceship-minigame

minigame to learn three.js
JavaScript
10
star
91

ammojs-demos

Playing with three.js and ammo.js
JavaScript
10
star
92

threex.basiclighting

three.js extension which provides various standard ligthings
JavaScript
10
star
93

qrcode-reader

qrcode-reader webapp to scan qrcode from the browser
JavaScript
10
star
94

threex.toxicpproc

three.js extension for a postprocessing of intoxicated player
9
star
95

githubAPI.js

Wrapper on top of github api v3 - works in browser and node.js
JavaScript
9
star
96

poker-hand.js

Poker Hand Analysis in javascript
JavaScript
9
star
97

demo.videovr360

experimentation with 360 video/images
HTML
9
star
98

threex.domevents2

three.js extension which provide dom events inside your 3d scene
JavaScript
9
star
99

pongGL

a pong in 3D
CSS
9
star
100

networked-qrcode-pairing

Proof of concept to show how to pair 2 phones thru qrCode
HTML
9
star