How to implement the ‘.extra’ attributes that I was able to to in as3 (and other generaly typescript info..)

Software: Away3D 4.x

Mr Margaret Scratcher, Sr. Member
Posted: 26 March 2015 01:42 PM   Total Posts: 344

Hi there,

really impressed with everything so far, working my way through converting an old project.

I’ve come up against a problem though, in that previously I used .extra attributes to store a load of extra information on a generated cube, and I’m wondering how to do this in typescript..

p.extra {
    index
:number,
    
target:number,
    
origXnumber,
    
origYnumber,
    
origZnumber,
    
actualX:number,
    
actualY:number,
    
actualZ:number,
    
parentRotnumber,
    
imgQual:number
    
   } 

(‘p’ is a cube.)
But from that I get

error TS2304: Cannot find name ‘number’.

How would I go about this? Or would I have to make a new class which has the attributes I need? (Possibly the ‘correct’ way to go about it anyway…)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X