Babylon.js: DebugLayer onChange event

Created on 5 Apr 2018  路  5Comments  路  Source: BabylonJS/Babylon.js

Here is the forum's link where I posted the question, but all is in the title.

enhancement inspector

All 5 comments

Hi @devAxeon ,

I don't really understand what you expect. (Maybe because english is not my native language, or because it's getting late here ...)

Can you explain it please ?
Do you have any exemple ?

Thanks :)

Salut @Jaskar,

En fait je pensais 脿 truc dans le genre:
BABYLON.debugLayer.onGlobalPropertyChange.add((result) => { console.log(result.object); // The modified object console.log(result.property); // The proeprty changed (as string) console.log(result.value); // New value after change console.log(result.initialValue); // Value before change });
C'est un Event d茅clench茅 sur les changements dans le debug layer. Si par exemple je me sert du d茅bug layer pour changer la position Z d'un mesh, je voudrais qu'un event me pr茅vienne et me donne le maximium d'info sur cette modification.
{ object: myMeshObj, property: 'position.z', //Il y a peut-锚tre une meilleur fa莽on de repr茅senter 莽a... value: 2, initialValue: 1.7 }

Ping @devAxeon
https://github.com/BabylonJS/Babylon.js/pull/4460

Is this what you're looking for ? :)

Exactly !! Many thanks @Jaskar !!

I tested it on the Inspector test scene, but it must be tested on real scenes to be sure there are no errors.
Ping me if you find one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CadsoftBrianW picture CadsoftBrianW  路  3Comments

aWeirdo picture aWeirdo  路  4Comments

CadsoftBrianW picture CadsoftBrianW  路  3Comments

sebavan picture sebavan  路  4Comments

azukaar picture azukaar  路  5Comments