Сообщения, созданные пользователем nivnoiman
14 сентября 2017 14:35
now my problem is ( after I merged the little faces to one face ) I get distorted image on the canvas.
and the original image is
this is my code
I'll tell you what I want to do.
In the end I want to create an object (ring).
Inside the ring (as in the experiments I try to do here) I want to have a text ( dynamic, that i could change it via js ).
something like this - link ( Ref )
and the original image is
this is my code
img = new Image();
img.src = image_src;
img.onload = function() {
ctx_image.drawImage(img, 500, 500, ctx_image.canvas.width,
ctx_image.canvas.height);
ctx_image.fillStyle = "rgba(255,255,255,1)";
ctx_image.font = "250px Arial";
ctx_image.fillText( imageText , 300, 300); // 300 300
m_tex.update_canvas_ctx(cube, "Image");
}
I'll tell you what I want to do.
In the end I want to create an object (ring).
Inside the ring (as in the experiments I try to do here) I want to have a text ( dynamic, that i could change it via js ).
something like this - link ( Ref )
13 сентября 2017 13:45
How do I stretch the small blocks to the size of the whole block I marked ?
In the end I want the Image to be the size of the big block I marked.
At the moment it consists of filling small blocks.
* In your example the entire side of the cube is marked as material.
** In my scene ( the ring ) it consists of small cubes.
In the end I want the Image to be the size of the big block I marked.
At the moment it consists of filling small blocks.
* In your example the entire side of the cube is marked as material.
** In my scene ( the ring ) it consists of small cubes.
07 сентября 2017 12:35
Hi :)
This is my scene
https://www.screencast.com/t/bBbkhs9S8
I marked the place I want the text to appear.
This is my code
I want to place the text inside the red block ( in the screen shoot )
As you can see :
1. The text very small.
2. The text appear every block.
Thanks,
Niv.
This is my scene
https://www.screencast.com/t/bBbkhs9S8
I marked the place I want the text to appear.
This is my code
cube = m_scs.get_object_by_name("Cube");
ctx_image = m_tex.get_canvas_ctx(cube, "Image");
var inline_text = location.search.split('name=')[1];
if( inline_text !== undefined && inline_text.length ){
imageText = inline_text;
} else {
imageText = "Hello World";
}
if (ctx_image) {
img = new Image();
img.src = "image.jpg";
img.onload = function() {
ctx_image.drawImage(img, 0, 0, ctx_image.canvas.width,
ctx_image.canvas.height);
ctx_image.fillStyle = "rgba(255 ,255 ,255 ,1)";
ctx_image.font = "250px Arial";
ctx_image.fillText( imageText , 300, 300); // 300 300
m_tex.update_canvas_ctx(cube, "Image");
}
}
I want to place the text inside the red block ( in the screen shoot )
As you can see :
1. The text very small.
2. The text appear every block.
Thanks,
Niv.
06 сентября 2017 09:43
Hey Again :)
First - Thank you for the help.
I created the scene with the image and the text.
I wonder now, how can i change dynamic the text "Hello World" through JavaScript ?
When I tried to change it ( after the init function ) I got error "not defined"
even though I made the variable global.
Thanks,
Niv.
First - Thank you for the help.
I created the scene with the image and the text.
I wonder now, how can i change dynamic the text "Hello World" through JavaScript ?
When I tried to change it ( after the init function ) I got error "not defined"
even though I made the variable global.
Thanks,
Niv.
04 сентября 2017 08:04
03 сентября 2017 15:28
Hi,
I'm trying to set up a scene with simple dynamic text.
* What I mean by "dynamic" is that I could change the text on the fly in my website.
Like text input that'll change the text on the scene.
Have anyone try it already ?
There any document that you guys can refer to me please ?
Thanks !
I'm trying to set up a scene with simple dynamic text.
* What I mean by "dynamic" is that I could change the text on the fly in my website.
Like text input that'll change the text on the scene.
Have anyone try it already ?
There any document that you guys can refer to me please ?
Thanks !