Search the Community
Showing results for tags 'createbox'.
-
Hi, I created stairs using CreateBox , i'm asking if it's the right way ! And i'm asking also , how can i make the camera go upstairs ! Thank you for your answers.
-
Hello guys, I'm new to BJS, and I find it is a great Framework - many thanks for your work @all. Note: please excuse my english, I'm a german people, I hope the wrong words i use are less. I have an situation, where the frame rate will be enormously reduced after some more boxes are created on an scene. The created PG is http://www.babylonjs-playground.com/#1AFQPV#1 on lines 21-23 ... activate one line and move short the field, than wait for the real frame rate (any seconds @ 50^2 fields) ... here it is about 6fps With an old babylon-version from 2016-09-17 (2.5 prerelease) and before this is not the same fail (file attached): - index_2.5.html (with local babylon.2.5.js [minified] - i have no other version from this time) - index.html with online BJS ... the *.html's are downloaded from PG and modified for test with local file, the frame-rate is not shown, but the smoothing move is apparent. Thanks for your help, ask me if more details are needed. fps_on_CreateBox.zip
- 6 replies
-
- frame rate
- createbox
-
(and 1 more)
Tagged with:
-
Hi all New to this Babylon.js malarky and trying to develop a 3D mini-app that will allow user to manipulate building blocks of some sort (e.g. add more blocks. move/rotate them and join them together). Whilst prototyping this, the blocks (ie meshes) are all cubes created using createBox and with different coloured faces (top and bottom are red and other sides are blue). I have used the new faceColor option on createBox to do this on creation. However I want to add behaviour that will temporarily change colour of blocks (e.g. turn them green) as user clicks on them to effectively show that is the selected block, reverting to standard colours when "deselected" (ie when another block is selected). Is there an easy way to reference the box faces in a similar way to faceColors when constructing using createBox? e.g. currentBox.faceColors[0]=new BABYLON.color3.red() ... I am guessing not. If no, then is there a technique for easily identifying the vertices that make up the 2 triangles for each face and changing those vertex colors independently? Note: I read the debate on naming convention for box sides/faces. For avoidance of doubt when I say "face" here I am referring to a real-world face or side of the cube rather than the individual triangles that make up that side. Note2: I will want to add some additional behaviour that allows a user to conjoin 2 cubes when in close proximity to each other (a kind of snap-to if you like) but only allow that behaviour on certain sides (imagine a crude Lego (TM) block that can only be connected on top of each other not side to side). So with one eye to the future, any mechanism for identifying individual faces needs to work for that to. Thanks muchly Richard
-
Hello, I want to create a box with 3 rows and 3 columns on each face. I got a tiledGround working but I want to apply this feature to each of the face of a box. Can anyone guide me in doing it ? Thanks.