≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
CopperLicht Tutorial: 2D Overlays?
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b]s1mon[/b] wrote: 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) { element.style.left = pos2d.X; element.style.top = 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; } else hide = true; element.style.display = hide ? 'none' : 'block'; } } } main();[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact