Translate C# Into JavaScript Please?

Hello,

Could you please translate this into JavaScript for me?

using UnityEngine;
using System.Collections;

public class CameraFacingBillboard : MonoBehaviour
{
    public Camera m_Camera;

    void Update()
    {
        transform.LookAt(transform.position + m_Camera.transform.rotation * Vector3.back,
            m_Camera.transform.rotation * Vector3.up);
    }
}

Thanks All!

Ollie

I'd guess:

var m_Camera Camera;

function Update()
{
    transform.LookAt(transform.position + m_Camera.transform.rotation * Vector3.back, m_Camera.transform.rotation * Vector3.up);
}

Try that...

Hello,

I have problems with this code (which is really hard I think) so could you translate this into javascript please?

const int NV = 27;

int i,k;

int cpt[8] = {-1,-1,-1,-1,-1,-1,3,3};

int vg[56][8];

std::vector edges;

int j = 0;

do {

for(i=0;i<8;++i) vg[j] = +cpt*; ++j;*
for(i=0;i<8;++i) vg[j] = -cpt*; ++j;*
}
while( std::next_permutation(cpt,cpt+8) );
int ren[56];
std::fill(ren,ren+56,-1);
int lren = 0;
for(i=0;i<56-1;++i)
for(j=i+1;j<56;++j)
{
int x = 0;
for(k=0;k<8;++k) x += vg_[k]vg[j][k];
if(x==8)
{
if(i==0)
{
ren[j]=lren++;
}_

_else if(ren!=-1 && ren[j]!=-1)_
edges.push_back( edge(ren,ren[j]) );*

}
}
Thank you,
Angeline.