GUI not working in PG's any more
Compilation error
dat is not defined
GUI not working in PG's any more
dat is not defined
Hello
I get an error in the playgroud that says:
ReferenceError: monaco is not defined : index.js 577
I tried the loading of some of gltf models by babyon.js.
https://cx20.github.io/gltf-test/
However, Orientation of some of glTF models for Skinning is incorrect.
For example,
https://cx20.github.io/gltf-test/examples/babylonjs/index.html?model=RiggedSimple&scale=0.2
https://cx20.github.io/gltf-test/examples/babylonjs/index.html?model=RiggedFigure&scale=1
https://cx20.github.io/gltf-test/examples/babylonjs/index.html?model=CesiumMan&scale=1
Please confirm whether there is a problem.
The gamepad attachControl uses: new BABYLON.Gamepads((pad: BABYLON.Gamepad) => { this.onGamepadConnected(pad); });
but this.onGamepadConnected ONLY gets fired ONCE per browser session... If you refresh the page page it never gets fired thus the game pad no longer works... If i totally close down the browser and restart it works again because new instance of browser... What can we do about that???
that work befor
importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse
I'm getting a bunch of these errors with babylon 2.3, 2.4 and 2.4 preview on iOS 10 Safari
[Error] IndexSizeError (DOM Exception 1): The index is not in the allowed range.
drawImage (babylon.2.3.core.js:4:16784)
(anonymous function) (babylon.2.3.core.js:4:16784)
o (babylon.2.3.core.js:3:23232)
y (babylon.2.3.core.js:4:16330)
onerror (babylon.2.3.core.js:3:8265)
[Error] BJS - [19:23:18]: Error while trying to load texture: 3D/diffuse_sml.jpg
_ErrorEnabled (babylon.2.3.core.js:3:14459)
onerror (babylon.2.3.core.js:3:4384)
[Error] Cross-origin image load denied by Cross-Origin Resource Sharing policy.
onerror (babylon.2.3.core.js:3:4450)
You can see them pop up here www.punkoffice.com/dizingof
The result is that my mesh does not show. I don't know why its complaining about cross-origin because the image and mesh are all on the same domain.
In a scene add an ActionManager to a mesh.
Register an action triggered by BABYLON.ActionManager.OnIntersectionEnterTrigger
serialize the scene
try to convert the serialized object to string
you will get the following error
"Line 46:28 - Converting circular structure to JSON"
see playground example
http://www.babylonjs-playground.com/#1UTZEV#10
if you comment out line 42
"sphere.actionManager.registerAction(action);"
then it works fine.
Please check
scene.onPointerDown and ActionManager do not work well with each other.
When an ActionManager is added to a mesh, the mesh becomes unpickable by the onPointerDown function
see playground example
http://www.babylonjs-playground.com/#1UTZEV#13
with lines 42 to 53 commented out everything works fine. The sphere is pickable.
Click the sphere and check the console message. It shows it was picked
un-comment only line 42.The sphere is no longer pickable.
un-comment line 42 to 47. sphere becomes pickable.
un-comment line 42 to 53. sphere becomes unpickable.
Please check.
When using CreateGroundFromHeightmap... When i use the camera to move around on ground IS VERY SLOW and VERY CHOPPY... AND LOWERS FPS down to 15fps.
This is my code for creating Ground:
// Parse scene native mesh and heightmap terrains
var terrains:BABYLON.Mesh[] = this._scene.getMeshesByTags("[TERRAIN]");
if (terrains != null) {
terrains.forEach((terrain)=>{
console.log(terrain.metadata);
if (terrain.metadata != null && terrain.metadata.properties != null) {
if (terrain.metadata.properties.heightmapBase64) {
var tempBase64:string = terrain.metadata.properties.heightmapBase64;
var terrainWidth:number = terrain.metadata.properties.width;
var terrainLength:number = terrain.metadata.properties.length;
var terrainHeight:number = terrain.metadata.properties.height;
var minimumHeightLevel:number = terrain.metadata.properties.minimumHeightLevel;
var maximumHeightLevel:number = terrain.metadata.properties.maximumHeightLevel;
var groundTessellation:number = terrain.metadata.properties.groundTessellation;
var surfaceMaterialId:string = terrain.metadata.properties.surfaceMaterialId;
var surfaceMaterialInst:BABYLON.Material = null;
if (surfaceMaterialId != null && surfaceMaterialId !== "") {
var material:BABYLON.Material = this._scene.getMaterialByID(surfaceMaterialId);
surfaceMaterialInst = material;
}
BABYLON.MeshBuilder.CreateGroundFromHeightMap((terrain.name + "_Mesh"), tempBase64, {
width: terrainWidth,
height: terrainLength,
subdivisions: groundTessellation,
minHeight: minimumHeightLevel,
maxHeight: maximumHeightLevel,
updatable: true,
onReady: (mesh:BABYLON.Mesh) => {
mesh.parent = terrain;
mesh.scaling = terrain.scaling.clone();
mesh.position.x -= terrain.position.x;
mesh.position.z -= terrain.position.z;
mesh.checkCollisions = true;
if (surfaceMaterialInst != null) {
mesh.material = surfaceMaterialInst;
}
}
}, this._scene);
} else {
// TODO: Native Mesh - Note should try do all c# editor side
}
}
});
}
Any help would be awesome... as always
Hello,
I can't access to the classes description in the documentation :
http://doc.babylonjs.com/classes/2.4/AbstractMesh
error 404 for the moment
When beta value is around 0, alpha values become a little bit erratic...
Test PG : http://www.babylonjs-playground.com/#NA4OQ#43
Move your mouse horizontally while trying to not move it too much up and down, and you'll see the bug. It looks like kind of a gimbal problem, but not fully...
This bug wasn't in BJS 2.4 and previous.
I think there might be a bug in the 3dmax exporter. The "babylon properties" option disappears permanently and gets rewritten as "file exporter" whenever I make my own workspace. To check this, I reinstalled the plugin and the "babylonjs properties" option was showing in the default workspace (as it should). I created a non default workspace and the "properties" option disappeared and changed to "file export" again. The option was irredeemable until the plugin was reinstalled.
Hello
I am trying to serialize the scene with
BABYLON.SceneSerializer.Serialize(scene)
and am getting a "mesh.rotation.asArray is not a function".
Serialization works fine when meshes are not rotated.
On further exploration, I realised that that mesh.rotation was not a Vector3 object but an object with getters, setters and __op__: Observer. Could this be the issue?
Can you please help me fix this.
Please let me know if you need more details.
Thank you
Hi all,
Apparently points are not considered to be in a triangle when they are on the edges - is that "expected behavior"? It isn't to me...
BABYLON.Vector2.PointInTriangle(new BABYLON.Vector2(0, 0), new BABYLON.Vector2(0, 0), new BABYLON.Vector2(0, 1), new BABYLON.Vector2(1, 1))
Thanks
Are we no longer serializing ArcRotateCamera's target?
See playground example
http://www.babylonjs-playground.com/#I9AVT#1
line 29 sets the target
click the large box to serialize and reload the scene .
After the scene is loaded you will see the target is zero.
(Also notice the line mesh disappears on reload)
The CDN links in readme.md don't work for me. I get a 404 when clicking on them as well as when used in a script tag:
Quote<script src="http://cdn.babylonjs.com/2-5/babylon.js"></script>
Am I doing something wrong?
camera.target= xyz; doesn't work anymore.
Hello,
If use this :
var myAnalyser = new BABYLON.Analyser(scene);
BABYLON.Engine.audioEngine.connectToAnalyser(myAnalyser);
myAnalyser.drawDebugCanvas();
The frame is not positioned in the canvas :
http://www.babylonjs-playground.com/#PTV7W#8
And this causes a bug : ( connectToAnalyser is not a function )
var myAnalyser = new BABYLON.Analyser(scene);
music.connectToAnalyser(myAnalyser);
myAnalyser.drawDebugCanvas();
http://www.babylonjs-playground.com/#PTV7W#9
Hi !
I noticed a bug with the hightlight layer and the sprite transparency, if the sprite overlapse the highlight object, the sprite take the color of the layer.
I tried to add the sprite to another renderingId but it was the same !
I attach a screen and a playground ( http://www.babylonjs-playground.com/#1UJAM6 ) to test !
Thanks for the answers !
Hello,
I don't know if this is something that could be merged into github but we had some projects (and therefore customers) that
were highly loaded with objects, thus a bit slow in rendering.
The camera inertia was then to long lasting to control the camera if you know what I mean.
This is what I've changed to handle this:
// Inertia
var engineDelta = Math.min(this.getEngine().deltaTime,100), inertiaFactor = Math.min(1,16.66666 / engineDelta);
if (this.inertialAlphaOffset !== 0 || this.inertialBetaOffset !== 0 || this.inertialRadiusOffset !== 0) {
this.alpha += (this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset) / inertiaFactor;
this.beta += this.inertialBetaOffset / inertiaFactor;
this.radius -= this.inertialRadiusOffset / inertiaFactor;
this.inertialAlphaOffset *= this.inertia * inertiaFactor;
this.inertialBetaOffset *= this.inertia * inertiaFactor;
this.inertialRadiusOffset *= this.inertia * inertiaFactor;
if (Math.abs(this.inertialAlphaOffset) < BABYLON.Engine.Epsilon)
this.inertialAlphaOffset = 0;
if (Math.abs(this.inertialBetaOffset) < BABYLON.Engine.Epsilon)
this.inertialBetaOffset = 0;
if (Math.abs(this.inertialRadiusOffset) < BABYLON.Engine.Epsilon)
this.inertialRadiusOffset = 0;
}
// Panning inertia
if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) {
if (!this._localDirection) {
this._localDirection = BABYLON.Vector3.Zero();
this._transformedDirection = BABYLON.Vector3.Zero();
}
this.inertialPanningX *= this.inertia * inertiaFactor;
this.inertialPanningY *= this.inertia * inertiaFactor;
if (Math.abs(this.inertialPanningX) < BABYLON.Engine.Epsilon)
this.inertialPanningX = 0;
if (Math.abs(this.inertialPanningY) < BABYLON.Engine.Epsilon)
this.inertialPanningY = 0;
this._localDirection.copyFromFloats(this.inertialPanningX / inertiaFactor, this.inertialPanningY / inertiaFactor, 0);
this._viewMatrix.invertToRef(this._cameraTransformMatrix);
BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection);
this.target.addInPlace(this._transformedDirection);
}
It rotates by the given inertia amount depending on the time that proceeded during the renderings.
The
var engineDelta = Math.min(this.getEngine().deltaTime,100)
is to avoid big camera jumps on frames that last longer than 100ms. In our project the render loop doesn't run continuesly.
If someone likes to test this and/or push it into babylon I would be glad to have contributed a small thing :-)
If not it's also completely okay as it's only needed in our project(s)! ;-)
Best regards
Kevin