ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > CopperLicht
CopperLicht Tutorial: 2D Overlays?
Author Text

Registered User
2013-03-06 07:39:48

I can not connect the new 2d overlay?
The lesson is "The origin"
How do I add a lot of these overlays as "The origin"?

I understand it is necessary to add here?

// move 2d overlay to this 3d position every frame
var pos3d = new CL3D.Vect3d(0,0,0);

engine.OnAnimate = function()
var element = document.getElementById('originlabel');
if (element)
// set the position of the label to the 2d position of the 3d point

var pos2d = engine.get2DPositionFrom3DPosition(pos3d);
var hide = false;

if (pos2d)
{ = pos2d.X; = pos2d.Y;

// hide if outside of the border
hide = pos2d.X < 0 || pos2d.Y < 0 ||
pos2d.X > engine.getRenderer().getWidth()-60 ||
pos2d.Y > engine.getRenderer().getHeight()-20;
hide = true; = hide ? 'none' : 'block';

2013-03-06 08:07:17

Not exactly sure what your problem is. It works like this: in that example, the HTML 2d overlays should be at the position of a 3d position. That's why the 2d position is set manually there.

Registered User
2013-03-06 08:14:15

how to add one more "the origin"?
that also spun it's
Very important to me.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "I?ternational" (you are not logged in)




Forum Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Software: Ambiera Light Forum. © 2008-2019 Nikolaus Gebhardt, Ambiera e.U.