Coder Social home page Coder Social logo

Adding to Arrays about unreal.js HOT 6 CLOSED

mflux avatar mflux commented on May 18, 2024
Adding to Arrays

from unreal.js.

Comments (6)

mflux avatar mflux commented on May 18, 2024

Also

this.vertices.push({X:0,Y:0,Z:0});
console.log( 'vertices in beginplay', this.vertices.length );

Will reveal

< vertices in beginplay 0

from unreal.js.

mflux avatar mflux commented on May 18, 2024

Assuming arrays are TArrays https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/TArrays/index.html

These will not work either:

        this.vertices.Init( 10, 5 );
        this.vertices.Append( {X:0,Y:0,Z:0} );

from unreal.js.

nakosung avatar nakosung commented on May 18, 2024

Please see https://github.com/ncsoft/Unreal.js/wiki/Dynamic-array:-Limitation. Currently dynamic array isn't fully implemented.

To answer to your question, properties are inherited from their base class.

from unreal.js.

mflux avatar mflux commented on May 18, 2024

Ah thanks! I assume that means the dynamic arrays are also inherited, it's just not working at the moment? According to the wiki it should look something like

this.vertices.ArrayProperty = [ { X: 0, Y: 0, Z: 0 },  { X: 200, Y: 0, Z: 0 }, { X: 200, Y: 200, Z: 0 } ];

Is that correct?

from unreal.js.

mflux avatar mflux commented on May 18, 2024

Oh I got it.

this.vertices = [ { X: 0, Y: 50, Z: 50 }, { X: 200, Y: 0, Z: 0 }, { X: 200, Y: 200, Z: 0 } ];

This works.

from unreal.js.

nakosung avatar nakosung commented on May 18, 2024

Okay, then I'll close this issue. ๐Ÿ‘

from unreal.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.